SSM packets null pointer test unit

ssm unit tests reported null pointer solve
1. Database data is empty, there is no judgment
2. database data, configuration files are normal as the following:
Here Insert Picture Descriptiondebug time has been reported that a null pointer, to view the configuration file there web.xml are correct, Finally, only to find forgotten plus @RunWith (SpringJUnit4ClassRunner.class)
@ContextConfiguration (locations = "the CLASSPATH: application.xml")
both added a comment to forget
this comment is to support the Spring testing. So after carefully ah!
(Novice, do not like do not spray. Thank Gangster mercy)

Released three original articles · won praise 1 · views 115

Guess you like

Origin blog.csdn.net/Lee_XCSDN/article/details/104719414