geekidea / spring-boot-plus

:fire: Spring-Boot-Plus is an easy-to-use, high-speed, high-efficient,feature-rich, open source spring boot scaffolding. :rocket:
https://springboot.plus
MIT License
2.46k stars 722 forks source link

类型转换错误异常ClassCastException #170

Closed XrazYang closed 3 months ago

XrazYang commented 1 year ago
jdk: 11
branch: master
file:src\test\java\io\geekidea\boot\generator\config\GeneratorConfig.java
// 274行,抛类型转换异常
String password = (String) datasource.get("password");
//是否可以考虑修改为:
String password = String.valueOf(datasource.get("password"));
springboot-plus commented 1 year ago

目前只在jdk8上测试稳定,未在其它版本测试

XrazYang commented 1 year ago

看到文档说明,支持JDK1.8及以上。如果做这样修改,就能避免这个问题。