SpringBoot 报错Caused by: org.apache.ibatis.type.TypeException: Could not resolve type alias ‘*****‘

Posted 悟能的师兄

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SpringBoot 报错Caused by: org.apache.ibatis.type.TypeException: Could not resolve type alias ‘*****‘相关的知识,希望对你有一定的参考价值。

错误发生内容:
Caused by: org.apache.ibatis.type.TypeException: Could not resolve type alias '***'.  Cause: java.lang.ClassNotFoundException: Cannot find class: ***

解决方法:

方式一:找到对应的xml文件,将xml文件内的对象名称改为完整限定名。【个别文件修改

<resultMap type="BCompanyBrand" id="BCompanyBrandResult">
	<result property="companyId"    column="company_id"    />
	<result property="brandId"    column="brand_id"    />
	<result property="sort"    column="sort"    />
	<result property="brandType"    column="brand_type"    />
</resultMap>

<resultMap type="com.material.domain.BCompanyBrand" id="BCompanyBrandResult">
	<result property="companyId"    column="company_id"    />
	<result property="brandId"    column="brand_id"    />
	<result property="sort"    column="sort"    />
	<result property="brandType"    column="brand_type"    />
</resultMap>			

方式二:找配置文件,修改对应的配置文件路径。【N多文件需要修改】springboot项目

 方式三:找配置文件,修改对应的配置文件路径。【N多文件需要修改】springcloud项目

登录nacos,找到配置中心的配置,修改配置信息。

 改成自己的实体对象的限定名即可。

本文部分引用:Could not resolve type alias '****'. Cause: java.lang.ClassNotFoundException

以上是关于SpringBoot 报错Caused by: org.apache.ibatis.type.TypeException: Could not resolve type alias ‘*****‘的主要内容,如果未能解决你的问题,请参考以下文章

springboot项目下的Caused by: org.apache.ibatis.binding.BindingException: Invalid bound statement (not fo

Caused by: java.lang.NoClassDefFoundError: com/google/common/base/MoreObjects

elaseticsearchelaseticsearch启动报错Caused by: org.elasticsearch.transport.BindTransportException: Fai(代

idea连接spark集群报错解析:Caused by: java.lang.ClassCastException

异常Caused by: java.lang.IllegalStateException: Zip64 archives are not supported

解决sqoop导入报错:Caused by: java.sql.SQLException: Protocol violation