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)
我尝试使用谷歌搜索,但我发现的一切都太难以开始了.
谢谢.
| 归档时间: |
|
| 查看次数: |
30959 次 |
| 最近记录: |