java.lang.NoClassDefFoundError: org/springframework/jdbc/core/RowMapper


1. Error message

Use Druid+ Spring JdbcTemplate+ to Servletwrite a small project, but keep reporting 500errors:
Insert picture description here

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:
Insert picture description here
Wipe, it turned out to be a WEB-INFOmistake, it should be WEB-INF...

In the JavaWebproject, 依赖jar包it must be placed in the directory web/WEB-INF/libunder

3. Solve

Just change the name directly. If it still doesn't work, re-import the package to solve the problem.

Guess you like

Origin blog.csdn.net/lesileqin/article/details/112525146