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");
}
}
我尝试了谷歌搜索,但发现的所有内容都太难了。
谢谢。
问题答案: