After the class file is modified, Tomcat cannot be restarted automatically. Manual restart cannot identify the changed class.
With the help of the project team lead, I found that Maven is not properly configured and some errors are still reported. So I just used the command, after MVN clean MVN package, the compilation error is modified, which is not found in the eclipse compiling environment.
Refresh again, clean and tomcat restart, and then modify the class file. This is the recovery from normal. The modified class file is automatically published to Tomcat and automatically restarted.
But it is still a null pointer error.
The reason is the code writing problem:
Correct code writing should be like this,
@ Resource (name = "activityservice ")
Private iactivityservice activityservice;
@ Resource (name = "partnerservice ")
Private ipartnerservice partnerservice;
@ Resource
Private webservicecontext context;
The original incorrect syntax is:
@ Resource
Private iactivityservice activityservice;
@ Resource
Private ipartnerservice partnerservice;
@ Resource
Private webservicecontext context;