Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't compatible spring boot 2.x #13602

Closed
SirMin opened this issue Nov 15, 2021 · 6 comments · Fixed by #14729
Closed

can't compatible spring boot 2.x #13602

SirMin opened this issue Nov 15, 2021 · 6 comments · Fixed by #14729
Milestone

Comments

@SirMin
Copy link
Contributor

SirMin commented Nov 15, 2021

Bug Report

For English only, other languages will not accept.

Before report a bug, make sure you have:

Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot reproduce it on current information, we will close it.

Please answer these questions before submitting your issue. Thanks!

Which version of ShardingSphere did you use?

5.0.0

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

ShardingSphere-JDBC

Expected behavior

Actual behavior

upgrade spring boot to 2.x, org.apache.shardingsphere.spring.boot.SpringBootStarterTest#assertRules can't run
image

Reason analyze (If you can)

org.apache.shardingsphere.spring.boot.util.PropertyUtil#v2 can't worker well

Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.

  1. only need to upgrade the spring boot in shardingsphere to 2.0.0.RELEASE
  2. org.apache.shardingsphere.spring.boot.SpringBootStarterTest#assertRules

Example codes for reproduce this issue (such as a github link).

@strongduanmu
Copy link
Member

@SirMin Thank you for your feedback, can you see if the underscore is causing the configuration load exception? #11242

@SirMin
Copy link
Contributor Author

SirMin commented Nov 15, 2021

Similar problems.
spring boot 2.x properties key only contain alpha&numberic&'-'
checker is org.springframework.boot.context.properties.source.ConfigurationPropertyName
image

@terrymanu
Copy link
Member

Any suggestion to resolve the problem?

@SirMin
Copy link
Contributor Author

SirMin commented Dec 20, 2021

I think has two treatment methods

  1. Camel case is not supported. But must tip message instead of NPE
  2. In the springboot 2.x version, the Camel Case converted to - separated

@SirMin
Copy link
Contributor Author

SirMin commented Dec 20, 2021

image
org.springframework.boot.context.properties.bind.BeanPropertyName#toDashedForm(java.lang.String, int)
The way handles case in springboot 2.0.0.RELEASE.

@SirMin
Copy link
Contributor Author

SirMin commented Jan 5, 2022

@terrymanu I will try to submit a pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants