Issue
I am quite new to spring coding.. I asked a question earlier but no one replied so I am asking it the other way..!! I need to move my application from simple Java to Spring MVC.
Is there any good Spring MVC tutorials that gives info from scratch??
My simple code is below.
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");
}
}
I tried googling, but everything I found was too tough to start from.
Solution
UPDATE: Due to amazing effort by the Spring team links posted here stands as sort of outdated. I will advice anyone looking to learn spring from scratch to head over to new awesome guides created by spring team.
Sample codes for the same can be found at Github
Original Answer :
try these links.. hope they are useful. mkyong and vanilla
and ofcourse Spring's own site
ADDED : found this new awesome blog do try this also.. its thorough. :)
Answered By - Anuj Patel