I went through web for this question but could not be clear about the concern.
String someVariable;
@RequestMapping(value = "/home",method = RequestMethod.GET)
public String home(Model model)
{
MyClass ob = new MyClass();
// using 'someVariable'
int r = ob.method1();
//.........
//........
return "something"
}
MyClass
public class MyClass{
int i=0;
public int method1(){
// some operations on i
return i;
}
}
Will this Spring MVC work fine in multi user environment? Is MyClass thread safe in multi user environment?
I just want to make my spring MVC application work fine for multi user access. Can I get some brief about this?