在AbstractCouchbaseConfiguration Java
中 protected FieldNamingStrategy fieldNamingStrategy() {
return abbreviateFieldNames() ? new CamelCaseAbbreviatingFieldNamingStrategy() : PropertyNameFieldNamingStrategy.INSTANCE;
}
Intelij无法解决:FieldNamingStrategy和 CamelCaseAbbreviatingFieldNamingStrategy():PropertyNameFieldNamingStrategy.INSTANCE;
因此我得到了Folloing Stack Trace:
Caused by: java.lang.NoClassDefFoundError: org/springframework/data/mapping/model/FieldNamingStrategy
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2398)
at java.lang.Class.getDeclaredConstructors(Class.java:1838)
at org.springframework.cglib.proxy.Enhancer.generateClass(Enhancer.java:447)
at org.springframework.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
at org.springframework.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
at org.springframework.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
at org.springframework.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
at org.springframework.context.annotation.ConfigurationClassEnhancer.createClass(ConfigurationClassEnhancer.java:125)
at org.springframework.context.annotation.ConfigurationClassEnhancer.enhance(ConfigurationClassEnhancer.java:98)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:358)
... 48 more
Caused by: java.lang.ClassNotFoundException: org.springframework.data.mapping.model.FieldNamingStrategy
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
... 59 more
我的POM如下:
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-couchbase</artifactId>
<version>1.4.2.RELEASE</version>
</dependency>
可以做什么?