500错误
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-mapper.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error registering typeAlias for 'Books'. Cause: java.lang.ClassNotFoundException: Cannot find class: com.OCTDN.pojo.Books
org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error registering typeAlias for 'Books'. Cause: java.lang.ClassNotFoundException: Cannot find class: com.OCTDN.pojo.Books
org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error registering typeAlias for 'Books'. Cause: java.lang.ClassNotFoundException: Cannot find class: com.OCTDN.pojo.Books
org.apache.ibatis.builder.BuilderException: Error registering typeAlias for 'Books'. Cause: java.lang.ClassNotFoundException: Cannot find class: com.OCTDN.pojo.Books
java.lang.ClassNotFoundException: Cannot find class: com.OCTDN.pojo.Books
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="configLocation" value="classpath:mybatis-config.xml"/>
</bean>
package com.OCTDN.pojo;
public class Books {
private int id;
private String bookname;
private int bookCounts;
private String detail;
public Books() {
}
public Books(int id, String bookname, int bookCounts, String detail) {
this.id = id;
this.bookname = bookname;
this.bookCounts = bookCounts;
this.detail = detail;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getBookname() {
return bookname;
}
public void setBookname(String bookname) {
this.bookname = bookname;
}
public int getBookCounts() {
return bookCounts;
}
public void setBookCounts(int bookCounts) {
this.bookCounts = bookCounts;
}
public String getDetail() {
return detail;
}
public void setDetail(String detail) {
this.detail = detail;
}
@Override
public String toString() {
return "Books{" +
"id=" + id +
", bookname='" + bookname + '\'' +
", bookCounts=" + bookCounts +
", detail='" + detail + '\'' +
'}';
}
}
有没有大佬能指点指点
清除一下idea的缓存