如何解决蒲公英数据表NoClassDefFoundError
我试图在Spring Boot + Thymeleaf + Java 15 + Maven项目上使用Dandelion数据表... 不断地抛出错误...最后一个是:
由于:java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException:错误 创建在类路径中定义的名称为“ dataTablesDialect”的bean 资源[co / com / activacredito / DandelionConfig.class]:Bean 通过工厂方法实例化失败;嵌套异常为 org.springframework.beans.BeanInstantiationException:失败 实例化 [com.github.dandelion.datatables.thymeleaf.dialect.DataTablesDialect]: 工厂方法'dataTablesDialect'抛出异常;嵌套异常 是java.lang.NoClassDefFoundError: org / thymeleaf / processor / IElementNameProcessorMatcher
POM.xml具有所有com.github.dandelion,org.springframework.boot和thymeleaf依赖性。 有时会引发AbstractDialect错误。
蒲公英的配置类为:
@Configuration
public class DandelionConfig {
@Bean
public DataTablesDialect dataTablesDialect() {
return new DataTablesDialect();
}
@Bean
public DandelionDialect dandelionDialect() {
return new DandelionDialect();
}
@Bean
public FilterRegistrationBean<DandelionFilter> dandelionFilterRegistrationBean() {
return new FilterRegistrationBean<DandelionFilter>(new DandelionFilter());
}
@Bean
public FilterRegistrationBean<DatatablesFilter> datatableFilterRegistrationBean() {
return new FilterRegistrationBean<DatatablesFilter>(new DatatablesFilter());
}
@Bean
public ServletRegistrationBean<DandelionServlet> dandelionServletRegistrationBean() {
return new ServletRegistrationBean<DandelionServlet>(new DandelionServlet(),"/dandelion-assets/*");
}
}
请帮助!!!
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。