Spring MVC教程从零开始


问题内容

我对Spring编码很陌生。.我早些时候问了一个问题,但没有人回答,所以我反过来问了.. !! 我需要将应用程序从简单的Java迁移到Spring MVC。

有没有很好的Spring MVC 教程,可以从头开始提供信息

我的简单代码如下。

public void run()
{
    try
    {
        DataInputStream din = new DataInputStream (
            m_connection.getInputStream() );

        PrintStream pout = new PrintStream (
            m_connection.getOutputStream() );

        // Read line from client
        String data = din.readLine();

        // Check to see if we should simulate a stalled server
        if (shallWeStall)
        {
            // Yes .. so reset flag and stall
            shallWeStall = false;

            try
            {
                Thread.sleep (20000);
            } catch (InterruptedException ie ) {}
        }
        else
        {
            // No.... but we will next time
            shallWeStall = true;
        }

        // Echo data back to clinet
        pout.println (data);

        // Close connection
        m_connection.close();
    }
    catch (IOException ioe) 
    {
        System.err.println ("I/O error");
    }
}

我尝试了谷歌搜索,但发现的所有内容都太难了。

谢谢。


问题答案:

更新:
由于Spring团队的巨大努力,此处发布的链接有些过时了。我会为任何想从头开始学习弹簧的人提供建议,并逐步推荐由弹簧团队创建的全新出色指南

可以在Github上找到相同的示例代码

原始答案:

尝试这些链接..希望它们有用。 麦京香草

当然还有Spring自己的网站

添加 :发现这个新的很棒的博客也可以尝试一下。:)