从头开始的Spring MVC教程

28 java spring-mvc

我对弹簧编码很新.我之前问了一个问题,但是没有人回答所以我问其他方式.. !! 我需要将我的应用程序从简单的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");
    }
}
Run Code Online (Sandbox Code Playgroud)

我尝试使用谷歌搜索,但我发现的一切都太难以开始了.

谢谢.

Anu*_*tel 22

更新:由于Spring团队的惊人努力,这里发布的链接就像过时一样.我会建议任何想要从头开始学习泉水的人去接受春季团队创造的新的精彩指南.

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

原答案:

尝试这些链接..希望它们有用. mkyongvanilla

当然还有Spring自己的网站

添加:发现这个新的精彩博客也尝试这个..它彻底.:)


Anu*_*tel 6

嘿,我还找到了一个新的优秀网站,你可以使用那个...

krams教程

希望它有用...... :)