Article Directory
1. Error message
Use Druid
+ Spring JdbcTemplate
+ to Servlet
write a small project, but keep reporting 500
errors:
2. Analysis
Look directly at the root cause:
java.lang.NoClassDefFoundError: org/springframework/jdbc/core/RowMapper
A brief translation, it seems that the package is not imported, take a screenshot:
Wipe, it turned out to be a WEB-INFO
mistake, it should be WEB-INF
...
In the JavaWeb
project, 依赖jar包
it must be placed in the directory web/WEB-INF/lib
under
3. Solve
Just change the name directly. If it still doesn't work, re-import the package to solve the problem.