Spring Boot集成flyway中遇到的问题

问题一

使用flyway中总是提示flyway插件为引入,但pom中已经放入了
最后在网上找了一圈没发现需要放入数据库连接的各种信息
如果在URL后不加入

?serverTimezone=UTC

则会出现错误:

The server time zone value '???ú±ê×??±??' is unrecognized or represents more than one time zone.

完整代码:

<plugin>
	<groupId>org.flywaydb</groupId>
	<artifactId>flyway-maven-plugin</artifactId>
	<configuration>
		<user>root</user>
		<password>password</password>
		<driver>com.mysql.cj.jdbc.Driver</driver>
		<url>jdbc:mysql://127.0.0.1:3306/db?serverTimezone=UTC</url>
		<baselineOnMigrate>true</baselineOnMigrate>
		<!-- //sql脚本位置,flyway会自动去找到这个目录并且执行里面的sql脚本 -->
		<locations>classpath:db/migration/</locations>
	</configuration>
</plugin>

问题二

flyway成功运行了,数据库也出现了相应的table
但控制台出现这个错误,虽然看着好像不会有什么影响

[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.example.SimpleSystem:mall:jar:0.0.1-SNAPSHOT
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: net.sf.json-lib:json-lib:jar:jdk15 -> duplicate declaration of version 2.4 @ line 110, column 15
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: commons-beanutils:commons-beanutils:jar -> duplicate declaration of version 1.7.0 @ line 116, column 15
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: commons-collections:commons-collections:jar -> duplicate declaration of version 3.1 @ line 121, column 15
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: commons-lang:commons-lang:jar -> duplicate declaration of version 2.5 @ line 126, column 15
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: net.sf.ezmorph:ezmorph:jar -> duplicate declaration of version 1.0.3 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值