org.springframework.aop.framework.AopConfigException: Could not generate CGLIB subclass of class [c
来源:互联网 发布:儿童阅读打卡软件 编辑:程序博客网 时间:2024/06/04 23:29
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'forumService': FactoryBean threw exception on object creation; nested exception is org.springframework.aop.framework.AopConfigException: Could not generate CGLIB subclass of class [class java.lang.String]: Common causes of this problem include using a final class or a non-visible class; nested exception is java.lang.IllegalArgumentException: Cannot subclass final class class java.lang.Stringat org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:149)at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1443)at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:249)at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1117)at com.dhcc.advice.TestIntroduction.main(TestIntroduction.java:31)Caused by: org.springframework.aop.framework.AopConfigException: Could not generate CGLIB subclass of class [class java.lang.String]: Common causes of this problem include using a final class or a non-visible class; nested exception is java.lang.IllegalArgumentException: Cannot subclass final class class java.lang.Stringat org.springframework.aop.framework.CglibAopProxy.getProxy(CglibAopProxy.java:217)at org.springframework.aop.framework.ProxyFactoryBean.getProxy(ProxyFactoryBean.java:362)at org.springframework.aop.framework.ProxyFactoryBean.getSingletonInstance(ProxyFactoryBean.java:316)at org.springframework.aop.framework.ProxyFactoryBean.getObject(ProxyFactoryBean.java:242)at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)... 6 moreCaused by: java.lang.IllegalArgumentException: Cannot subclass final class class java.lang.Stringat org.springframework.cglib.proxy.Enhancer.generateClass(Enhancer.java:446)at org.springframework.cglib.transform.TransformingClassGenerator.generateClass(TransformingClassGenerator.java:33)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.create(Enhancer.java:285)at org.springframework.aop.framework.CglibAopProxy.getProxy(CglibAopProxy.java:205)... 10 more
这就是 sting value="forumSrviceTarget" 报错,这里,不能用value要用ref
Could not generate CGLIB subclass of class [class java.lang.String]
<?xml version="1.0" encoding="UTF-8" ?><beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"><bean id="pmonitor" class="com.baobaotao.introduce.ControllablePerformaceMonitor" /><bean id="forumServiceTarget" class="com.baobaotao.introduce.ForumService" /><bean id="forumService" class="org.springframework.aop.framework.ProxyFactoryBean"><property name="interfaces" value="com.baobaotao.introduce.Monitorable"></property><!-- <property name="target" value="forumServiceTarget"></property> --><!-- 注意这里是ref而不是 value --><property name="target" value="forumServiceTarget"></property><property name="interceptorNames" value="pmonitor"></property><property name="proxyTargetClass" value="true"></property></bean></beans>
0 0
- org.springframework.aop.framework.AopConfigException: Could not generate CGLIB subclass of class [c
- Could not generate CGLIB subclass of class编译时出错
- Could not generate CGLIB subclass of class [class com.sun.proxy.$Proxy22]
- Could not load org.springframework.aop.framework.AdvisedSupport$MethodCacheKey
- class not found org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator
- Class org.apache.struts2.json.JSONWriter can not access a member of class org.springframework.aop.in
- NoClassDefFoundError: Could not initialize class org.springframework.web.client.RestTemplate
- 【ssh学习笔记】struts处理json异常之JSONWriter can not access a member of class org.springframework.aop.TruePoin
- Spring 异常 Couldn't generate CGLIB subclass of class [class spring.dao.UserDAO]: Common causes of this problem include using a f
- org.apache.cxf.interceptor.Fault: Could not initialize class org.springframework.jdbc.core.Statement
- Could not instantiate bean class [org.springframework.web.multipart.MultipartFile]: Specified class
- Could not instantiate bean class [org.springframework.web.multipart.MultipartFile]: Specified class
- Could not instantiate bean class [org.springframework.web.multipart.MultipartFile]: Specified class
- Spring -- org.springframework.aop.framework.ProxyFactoryBean
- org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator
- Initialization of bean failed; nested exception is org.springframework.aop.framework.AopConfigExcep
- springmvc+fileuploader上传报错 Could not instantiate bean class [org.springframework.web.multipart.Multi
- java.lang.NoClassDefFoundError: Could not initialize class org.springframework.beans.factory.BeanCre
- iptables设置安全策略
- 欢迎使用CSDN-markdown编辑器
- 开源APP项目代码分析(1)- OpenEyes、Plaid、GitHot
- java再复习——通过反射读取注解
- linux学习
- org.springframework.aop.framework.AopConfigException: Could not generate CGLIB subclass of class [c
- :hover选择器知识点
- 2017年书单
- linux系统下使用wget工具安装mysql数据库
- ArcGIS Server文本检索性能低下一例
- JQuery的使用方法汇总(1)——认识并学习JQuery
- cocos-Lua中的三目运算符
- mysql基本语法
- 现今的土地与房产(农民 老板-政府银行 )