org.springframework.aop.framework.Cglib2AopProxy WARN - 无法代理方法

时间:2017-09-08 08:12:57

标签: spring hibernate tomcat cglib

我在tomcat中部署了我的web项目并且在最终方法上出现了一些关于spring和hibernate代理的警告,是什么导致了这个问题?

2017-09-08 16:01:32,548 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final org.hibernate.SessionFactory org.springframework.orm.hibernate3.support.HibernateDaoSupport.getSessionFactory()] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:32,548 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final void org.springframework.orm.hibernate3.support.HibernateDaoSupport.setSessionFactory(org.hibernate.SessionFactory)] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:32,548 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final org.springframework.orm.hibernate3.HibernateTemplate org.springframework.orm.hibernate3.support.HibernateDaoSupport.getHibernateTemplate()] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:32,548 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final void org.springframework.orm.hibernate3.support.HibernateDaoSupport.setHibernateTemplate(org.springframework.orm.hibernate3.HibernateTemplate)] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:32,548 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final void org.springframework.dao.support.DaoSupport.afterPropertiesSet() throws java.lang.IllegalArgumentException,org.springframework.beans.factory.BeanInitializationException] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:32,995 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final org.hibernate.SessionFactory org.springframework.orm.hibernate3.support.HibernateDaoSupport.getSessionFactory()] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:32,995 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final void org.springframework.orm.hibernate3.support.HibernateDaoSupport.setSessionFactory(org.hibernate.SessionFactory)] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:32,995 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final org.springframework.orm.hibernate3.HibernateTemplate org.springframework.orm.hibernate3.support.HibernateDaoSupport.getHibernateTemplate()] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:32,995 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final void org.springframework.orm.hibernate3.support.HibernateDaoSupport.setHibernateTemplate(org.springframework.orm.hibernate3.HibernateTemplate)] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:32,995 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final void org.springframework.dao.support.DaoSupport.afterPropertiesSet() throws java.lang.IllegalArgumentException,org.springframework.beans.factory.BeanInitializationException] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:33,049 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final org.hibernate.SessionFactory org.springframework.orm.hibernate3.support.HibernateDaoSupport.getSessionFactory()] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:33,049 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final void org.springframework.orm.hibernate3.support.HibernateDaoSupport.setSessionFactory(org.hibernate.SessionFactory)] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:33,049 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final org.springframework.orm.hibernate3.HibernateTemplate org.springframework.orm.hibernate3.support.HibernateDaoSupport.getHibernateTemplate()] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:33,049 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final void org.springframework.orm.hibernate3.support.HibernateDaoSupport.setHibernateTemplate(org.springframework.orm.hibernate3.HibernateTemplate)] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:33,049 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final void org.springframework.dao.support.DaoSupport.afterPropertiesSet() throws java.lang.IllegalArgumentException,org.springframework.beans.factory.BeanInitializationException] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:33,112 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final org.hibernate.SessionFactory org.springframework.orm.hibernate3.support.HibernateDaoSupport.getSessionFactory()] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:33,112 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final void org.springframework.orm.hibernate3.support.HibernateDaoSupport.setSessionFactory(org.hibernate.SessionFactory)] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:33,112 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final org.springframework.orm.hibernate3.HibernateTemplate org.springframework.orm.hibernate3.support.HibernateDaoSupport.getHibernateTemplate()] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:33,113 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final void org.springframework.orm.hibernate3.support.HibernateDaoSupport.setHibernateTemplate(org.springframework.orm.hibernate3.HibernateTemplate)] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:33,113 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final void org.springframework.dao.support.DaoSupport.afterPropertiesSet() throws java.lang.IllegalArgumentException,org.springframework.beans.factory.BeanInitializationException] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:35,073 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final org.hibernate.SessionFactory org.springframework.orm.hibernate3.support.HibernateDaoSupport.getSessionFactory()] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:35,073 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final void org.springframework.orm.hibernate3.support.HibernateDaoSupport.setSessionFactory(org.hibernate.SessionFactory)] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:35,073 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final org.springframework.orm.hibernate3.HibernateTemplate org.springframework.orm.hibernate3.support.HibernateDaoSupport.getHibernateTemplate()] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:35,073 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final void org.springframework.orm.hibernate3.support.HibernateDaoSupport.setHibernateTemplate(org.springframework.orm.hibernate3.HibernateTemplate)] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:35,073 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final void org.springframework.dao.support.DaoSupport.afterPropertiesSet() throws java.lang.IllegalArgumentException,org.springframework.beans.factory.BeanInitializationException] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:35,678 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final org.hibernate.SessionFactory org.springframework.orm.hibernate3.support.HibernateDaoSupport.getSessionFactory()] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:35,678 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final void org.springframework.orm.hibernate3.support.HibernateDaoSupport.setSessionFactory(org.hibernate.SessionFactory)] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:35,678 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final org.springframework.orm.hibernate3.HibernateTemplate org.springframework.orm.hibernate3.support.HibernateDaoSupport.getHibernateTemplate()] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:35,679 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final void org.springframework.orm.hibernate3.support.HibernateDaoSupport.setHibernateTemplate(org.springframework.orm.hibernate3.HibernateTemplate)] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:35,679 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final void org.springframework.dao.support.DaoSupport.afterPropertiesSet() throws java.lang.IllegalArgumentException,org.springframework.beans.factory.BeanInitializationException] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:35,700 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final org.hibernate.SessionFactory org.springframework.orm.hibernate3.support.HibernateDaoSupport.getSessionFactory()] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:35,700 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final void org.springframework.orm.hibernate3.support.HibernateDaoSupport.setSessionFactory(org.hibernate.SessionFactory)] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:35,700 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final org.springframework.orm.hibernate3.HibernateTemplate org.springframework.orm.hibernate3.support.HibernateDaoSupport.getHibernateTemplate()] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:35,700 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final void org.springframework.orm.hibernate3.support.HibernateDaoSupport.setHibernateTemplate(org.springframework.orm.hibernate3.HibernateTemplate)] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2017-09-08 16:01:35,700 org.springframework.aop.framework.Cglib2AopProxy WARN  - Unable to proxy method [public final void org.springframework.dao.support.DaoSupport.afterPropertiesSet() throws java.lang.IllegalArgumentException,org.springframework.beans.factory.BeanInitializationException] because it is final: All calls to this method via a proxy will be routed directly to the proxy.

1 个答案:

答案 0 :(得分:0)

请参阅此处。 Spring boot - Unable to proxy interface-implementing method - WARN message

造成这种情况的常见原因之一是在类级别而不是接口上使用Springs @Transactional注释。