1. Post the complete exception information of the NullPointerException report. 2. Post the execute method in LoginAction. It seems that you use JDK reflection in your code.
Generally, the problem of null pointers can be easily solved. Find the location of the null pointer, and then apply an outer layer of judgment. If it is not a null pointer, you can enter the code. But if reflection is used, you have to find the place where the reflection code is mapped by reflection. If a null pointer is passed in, then you need to regulate it at the entrance~~
1. Post the complete exception information of the NullPointerException report.
2. Post the execute method in LoginAction. It seems that you use JDK reflection in your code.
Generally, the problem of null pointers can be easily solved. Find the location of the null pointer, and then apply an outer layer of judgment. If it is not a null pointer, you can enter the code. But if reflection is used, you have to find the place where the reflection code is mapped by reflection. If a null pointer is passed in, then you need to regulate it at the entrance~~
You should use reflection injection. adminDao may be null and not injected. See if there is a setter method
It should be that adminDao is null, and it was not injected successfully during injection. You can check the problem of dependency injection
It should be that adminDao is null. Check to see if there are set and get methods, and whether adminDao is declared in applicationContext.xml