MrXionGe opened a new issue #8306:
URL: https://github.com/apache/shardingsphere/issues/8306
## Version
OpenJDK 11
spring-boot 2.3.4 & 2.4.0
shardingsphere-jdbc-core-spring-boot-starter 5.0.0-alpha
## Question
It does not seem to read the configuration correctly(yml or properties).
When I start, an exception is thrown. (message = No value bound)
```
java.lang.reflect.InvocationTargetException: null
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[na:na]
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[na:na]
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at
org.apache.shardingsphere.spring.boot.util.PropertyUtil.v2(PropertyUtil.java:111)
~[shardingsphere-jdbc-spring-boot-starter-infra-5.0.0-alpha.jar:5.0.0-alpha]
at
org.apache.shardingsphere.spring.boot.util.PropertyUtil.handle(PropertyUtil.java:75)
~[shardingsphere-jdbc-spring-boot-starter-infra-5.0.0-alpha.jar:5.0.0-alpha]
at
org.apache.shardingsphere.spring.boot.registry.AbstractAlgorithmProvidedBeanRegistry.lambda$registerBean$1(AbstractAlgorithmProvidedBeanRegistry.java:57)
~[shardingsphere-jdbc-spring-boot-starter-infra-5.0.0-alpha.jar:5.0.0-alpha]
at java.base/java.lang.Iterable.forEach(Iterable.java:75) ~[na:na]
at
org.apache.shardingsphere.spring.boot.registry.AbstractAlgorithmProvidedBeanRegistry.registerBean(AbstractAlgorithmProvidedBeanRegistry.java:55)
~[shardingsphere-jdbc-spring-boot-starter-infra-5.0.0-alpha.jar:5.0.0-alpha]
at
org.apache.shardingsphere.replicaquery.spring.boot.algorithm.ReplicaQueryAlgorithmProvidedBeanRegistry.postProcessBeanDefinitionRegistry(ReplicaQueryAlgorithmProvidedBeanRegistry.java:43)
~[shardingsphere-replica-query-spring-boot-starter-5.0.0-alpha.jar:5.0.0-alpha]
at
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:285)
~[spring-context-5.3.1.jar:5.3.1]
at
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:129)
~[spring-context-5.3.1.jar:5.3.1]
at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:751)
~[spring-context-5.3.1.jar:5.3.1]
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:569)
~[spring-context-5.3.1.jar:5.3.1]
at
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:767)
~[spring-boot-2.4.0.jar:2.4.0]
at
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)
~[spring-boot-2.4.0.jar:2.4.0]
at
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:426)
~[spring-boot-2.4.0.jar:2.4.0]
at
org.springframework.boot.SpringApplication.run(SpringApplication.java:326)
~[spring-boot-2.4.0.jar:2.4.0]
at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1309)
~[spring-boot-2.4.0.jar:2.4.0]
at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1298)
~[spring-boot-2.4.0.jar:2.4.0]
at
cn.mrxionge.replicaquery.ReplicaQueryApplication.main(ReplicaQueryApplication.java:10)
~[classes/:na]
Caused by: java.util.NoSuchElementException: No value bound
at
org.springframework.boot.context.properties.bind.BindResult.get(BindResult.java:55)
~[spring-boot-2.4.0.jar:2.4.0]
... 21 common frames omitted
```
When spring-boot is downgraded to 1.5.X. Run successfully!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]