弹簧引导 别名'Int'已映射到值'java.lang.Integer'



当我重命名应用程序包名称并尝试启动springboot时,我收到一条错误消息。错误消息如下:

17:36:19.198[restartedMain]WARN o.s.b.w.s.c.AnnationConfigServlet WebServerApplicationContext-[log,87]-上下文初始化期间遇到异常-取消刷新尝试:org.springframework.beans.factory.BeanCreationException:创建类路径资源中定义了名称为"objectMapperConfigurer"的bean时出错[springfox/documentation/spring/web/SpringfoxWebMvcConfiguration.class]:bean实例化前的BeanPostProcessor失败;嵌套异常为org.springframework.beans.factory.UnsatisfiedDependencyException:创建类路径资源[net/changhai/framework/config/ShiroConfig.class]中定义的名称为"authorizationAttributeSourceAdvisor"的bean时出错:通过方法"authorizationsAttributeSourceAdvisor"参数0表示的不满足依赖关系;嵌套异常为org.springframework.beans.factory.UnsatisfiedDependencyException:创建类路径资源[net/changhai/framework/config/ShiroConfig.class]中定义的名称为"shiroFilterFactoryBean"的bean时出错:通过方法"shiroFilter FactoryBBean"参数0表示的不满足依赖关系;嵌套异常为org.springframework.beans.factory.UnsatisfiedDependencyException:创建类路径资源[net/changhai/framework/config/ShiroConfig.class]中定义的名称为"securityManager"的bean时出错:通过方法"securityManager"参数0表示的不满足依赖关系;嵌套异常为org.springframework.beans.factory.UnsatisfiedDependencyException:创建名为"userRealm"的bean时出错:通过字段"menuService"表示的不满足依赖项;嵌套异常为org.springframework.beans.factory.UnsatisfiedDependencyException:创建名为"sysMenuServiceImpl"的bean时出错:通过字段"menuMapper"表示的不满足依赖项;嵌套异常为org.springframework.beans.factory.不满足依赖项异常:创建文件[D:\dev\cube2\ch system\target\classes\net\changhai\system\mapper\sysMenuMapper.class]中定义的名称为"sysMenuMapper"的bean时出错:通过bean属性"sqlSessionFactory"表示的不满足依赖关系;嵌套异常为org.springframework.beans.factory.BeanCreationException:创建类路径资源[org/mybatis/spring/boot/autoconfig/MybatisAutoConfiguration.class]中定义的名称为"sqlSessionFactory"的bean时出错:通过工厂方法实例化bean失败;嵌套异常为org.springframework.beans.BeanInstanceException:未能实例化[org.apache.ibatis.session.SqlSessionFactory]:工厂方法"SqlSessionFactory"引发异常;嵌套异常为org.apache.ibatis.type.TypeException:别名"Int"已映射到值"java.lang.Integer"。

您似乎正在将别名"Int"绑定到某个类。默认情况下,它绑定到java.lang.Integer,因此它由MyBatis保留,您不应该将它重新绑定到另一个。

最新更新