Caused by: java.lang.ClassNotFoundException: Cannot find class: User

Posted zjulanjian

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Caused by: java.lang.ClassNotFoundException: Cannot find class: User相关的知识,希望对你有一定的参考价值。

源代码: 

    <select id="selectAll" resultType="User">
        select user_id uid,user_name username,user_password password,user_gender gender, user_birthday birthday, user_status status  from users
    </select>

正确代码: 

    <select id="selectAll" resultType="com.bj186.crm.entity.User">
        select user_id uid,user_name username,user_password password,user_gender gender, user_birthday birthday, user_status status  from users
    </select>

原因分析: 这个问题的原因是在使用resultType的时候, 没有正确的指定返回的类型

以上是关于Caused by: java.lang.ClassNotFoundException: Cannot find class: User的主要内容,如果未能解决你的问题,请参考以下文章

Mathematical Problems Caused by CCD

Caused by SSLError

Caused by: java.lang.NoClassDefFoundError:

caused by a circular import.

异常Caused by: java.lang.ClassNotFoundException: org.springframework.dao.DataIntegrityViolationExcep

Caused by org hibernate DuplicateMappingException Duplicat