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:
debug 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)
SSM packets null pointer test unit
Guess you like
Origin blog.csdn.net/Lee_XCSDN/article/details/104719414
Ranking