赞
踩
mybatisplus在本地做测试的时候,启动就报错:Error creating bean with name 'dataSourceScriptDatabaseInitializer' ..... Error creating bean with name 'spring.sql.init-org.springframework.boot.autoconfigure.sql.init.SqlInitializationProperties': Lookup method resolution failed;
我的pom文件
- <dependencies>
-
- <dependency>
- <groupId>org.postgresql</groupId>
- <artifactId>postgresql</artifactId>
- <version>42.2.20</version>
- </dependency>
-
-
- <dependency>
- <groupId>com.baomidou</groupId>
- <artifactId>mybatis-plus-boot-starter</artifactId>
- <version>3.5.1</version>
- </dependency>
-
- <dependency>
- <groupId>org.mybatis.spring.boot</groupId>
- <artifactId>mybatis-spring-boot-starter</artifactId>
- <version>2.2.2</version>
- </dependency>
-
- <dependency>
- <groupId>org.projectlombok</groupId>
- <artifactId>lombok</artifactId>
- <version>1.18.20</version>
- </dependency>
-
- <!-- https://mvnrepository.com/artifact/junit/junit -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.12</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-test</artifactId>
- <version>2.4.5</version>
- </dependency>
-
- </dependencies>
这里为什么报错呢?是因为jar包冲突问题,mybatis-plus-boot-starter 和
mybatis-spring-boot-starter 版本有冲突,我上面贴的是正确的,我原来的mybatis-spring-boot-starter版本是2.2.0, 反正有冲突,改一下就好了,就没有报错了。
临时写的,比较潦草,如果解决了你的问题,别忘了点个赞哦,多谢!!!
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。