春季MVC教程从头开始[已关闭]
2022-09-01 13:13:49
我对弹簧编码很陌生。我之前问了一个问题,但没有人回答,所以我以另一种方式问它..!!我需要将我的应用程序从简单的Java移动到Spring MVC。
有没有好的春季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");
}
}
我尝试谷歌搜索,但我发现的一切都太难开始了。