Hi All,
As i interation with spring boot 2, hibernate 5, shiro 1.4, some exception
was happend as below:
/Caused by: org.springframework.beans.BeanInstantiationException: Failed to
instantiate [org.apache.shiro.session.mgt.SessionManager]: Factory method
'sessionManager' threw exception; nested exception is
java.lang.ClassCastException:
org.springframework.orm.hibernate5.LocalSessionFactoryBean$$EnhancerBySpringCGLIB$$d6b39340
cannot be cast to org.apache.shiro.session.mgt.SessionFactory/
means spring used the hibernate's sessionFactory, i guess that the reason
@Bean
@ConditionalOnMissingBean
@Override
protected SessionFactory sessionFactory() {
return super.sessionFactory();
}
The above issue happened when used the configuration
/shiro.userNativeSessionManager = true./
anyone can help me a little tips?
thanks
--
Sent from: http://shiro-user.582556.n2.nabble.com/