druid-1.0.28版本使用filter后报NoClassDefFoundError错误

6yt4nkrj  于 4个月前  发布在  Druid
关注(0)|答案(1)|浏览(55)

druid-1.0.28版本添加以下配置项:

...

报以下错误:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in URL [file:/app/jetty/server/docker_jetty/work/jetty-10.203.123.91-8080-claim.war-_claim-any-/webapp/WEB-INF/classes/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'filters' threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.alibaba.druid.filter.FilterManager
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1444)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
... 81 more

7hiiyaii

7hiiyaii1#

添加的配置项:
<property name="filters" value="config" /> <property name="connectionProperties" value="config.decrypt=true;config.decrypt.key=${mysql.jdbc.publickey}" />

相关问题