近段时间在研究springboot,过程中集成beelsql时,发现启动项目的时候会报nested exception is java.lang.IllegalArgumentException: interface ghost.springboot.dao.ghost.springboot.BookDao is not visible from class loader的异常,一直找不到解决办法。
后来把项目pom.xml文件中beetlsql的版本换成2.9.12(最新),beetl的版本换成2.7.23后,然后在对应的接口中加上@SqlResource("ghost.springboot")的注解,问题顺利解决。
pom.xml:
<dependency>
<groupId>com.ibeetl</groupId>
<artifactId>beetl</artifactId>
<version>2.7.23</version>
</dependency>
<dependency>
<groupId>com.ibeetl</groupId>
<artifactId>beetlsql</artifactId>
<version>2.9.12</version>
</dependency>BookDao.java:
本文介绍了一种SpringBoot项目中集成BeetlSQL遇到的异常问题及其解决方案。通过更新BeetlSQL和Beetl版本,并在DAO接口上使用@SqlResource注解,成功解决了接口不可见的问题。
3671

被折叠的 条评论
为什么被折叠?



