it is said that springmvc is thread-safe. I know that stateless objects must be thread-safe. But when Service is injected into Controller, it becomes a stateful object . Is it still thread-safe?
//
public class UserController {
}
//
public class UserController {
int a;
}
//?????
public class UserController {
@AutoWired
private UserService userService;
}
I hope the person who knows it will solve the problem for my younger brother. Thank you!
add: I know about ThreadLocal and single-case multiple cases (scope=prototype). I just want to know the stateless and stateless situations I described above.