springboot集成beetlsql时Dao接口无法识别的异常解决

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/Ghost_chou/article/details/78433761

   近段时间在研究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:


猜你喜欢

转载自blog.csdn.net/Ghost_chou/article/details/78433761