导入commons-logging-1.2.jar辅助类包即可。
报错提示:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.springframework.jdbc.support.JdbcAccessor.(JdbcAccessor.java:43) at org.springframework.jdbc.core.JdbcTemplate. (JdbcTemplate.java:164) at DemoJDBCTemplate.Templatedemo1.main(Templatedemo1.java:13)Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496) ... 3 more