qq_慕UI0414813
2019-08-17 00:08
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisDao': Lookup method resolution failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [org.seckill.dao.cache.RedisDao] from ClassLoader [ParallelWebappClassLoader context: ROOT delegate: false ----------> Parent Classloader: java.net.URLClassLoader@564fabc8 ] Caused by: java.lang.NoClassDefFoundError: com/dyuproject/protostuff/Schema at java.base/java.lang.Class.getDeclaredMethods0(Native Method) at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3167) at java.base/java.lang.Class.getDeclaredMethods(Class.java:2310) at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:489) ... 41 common frames omitted
怎么解决啊?包也全导入了
<!-- redis客户端:Jedis --> <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> <version>2.7.3</version> </dependency> <!-- protostuff序列化依赖 --> <dependency> <groupId>com.dyuproject.protostuff</groupId> <artifactId>protostuff-core</artifactId> <version>1.0.8</version> </dependency> <dependency> <groupId>com.dyuproject.protostuff</groupId> <artifactId>protostuff-runtime</artifactId> <version>1.0.8</version> </dependency> <!-- 自己注入RedisDao --> <bean id="redisDao" class="org.seckill.dao.cache.RedisDao"> <constructor-arg index="0" value="localhost"/> <constructor-arg index="1" value="6379"/> </bean>
我找到问题所在了,就是自己的File->Project Structure->Artifacts的后面导入的包未导入lib文件下,所以手动导入自己报错为空的包即可!
Java高并发秒杀API之高并发优化
78600 学习 · 170 问题
相似问题