1.添加引用,
mybatis-enhance-actable:1.0.1的版本存在问题,比如需要先存在表才能进行建表操作(我遇到的)
![](https://i-blog.csdnimg.cn/blog_migrate/add7b081525feff097b703f8f2ee8522.png)
2.添加config,以下两个配置类需要分开写
@Configuration
@ComponentScan(basePackages = {"com.gitee.sunchenbin.mybatis.actable.manager.*"})
public class ActableConfig {
@Value("${spring.datasource.driver-class-name}")
private String driver;
@Value("${spring.datasource.url}")
private String url;
@Value("${spring.datasource.username}")
private String username;
@Value("${spring.datasource.password}")
private String password;
@Bean
public PropertiesFactoryBean configProperties() throws Exception{
PropertiesFactoryBean propertiesFactoryBean = new PropertiesFactoryBean();
Path