438219972 opened a new issue #8555:
URL: https://github.com/apache/shardingsphere/issues/8555


   spring boot 2.4.0
   <dependency>
        <groupId>org.apache.shardingsphere</groupId>
        <artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
        <version>5.0.0-alpha</version>
   </dependency>
   
   If not configured
   
`spring.shardingsphere.rules.replica-query.load-balancers.<algorithm-name>.props.xxx`
   or
   'spring.shardingsphere.datasource.common.xxx'
   
   
   **at 
org.apache.shardingsphere.spring.boot.registry.AbstractAlgorithmProvidedBeanRegistry.lambda$registerBean$1(AbstractAlgorithmProvidedBeanRegistry.java:57)**
   
   **at 
org.apache.shardingsphere.spring.boot.datasource.DataSourceMapSetter.getDataSourceMap(DataSourceMapSetter.java:66)**
   
   
   
   Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
        at 
org.springframework.util.ReflectionUtils.rethrowRuntimeException(ReflectionUtils.java:147)
        at 
org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:830)
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:336)
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1309)
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1298)
        at com.winyo.shop.ShopApplication.main(ShopApplication.java:11)
   Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
org.apache.shardingsphere.spring.boot.util.PropertyUtil.v2(PropertyUtil.java:111)
        at 
org.apache.shardingsphere.spring.boot.util.PropertyUtil.handle(PropertyUtil.java:75)
        at 
org.apache.shardingsphere.spring.boot.registry.AbstractAlgorithmProvidedBeanRegistry.lambda$registerBean$1(AbstractAlgorithmProvidedBeanRegistry.java:57)
        at java.lang.Iterable.forEach(Iterable.java:75)
        at 
org.apache.shardingsphere.spring.boot.registry.AbstractAlgorithmProvidedBeanRegistry.registerBean(AbstractAlgorithmProvidedBeanRegistry.java:55)
        at 
org.apache.shardingsphere.replicaquery.spring.boot.algorithm.ReplicaQueryAlgorithmProvidedBeanRegistry.postProcessBeanDefinitionRegistry(ReplicaQueryAlgorithmProvidedBeanRegistry.java:43)
        at 
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:285)
        at 
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:129)
        at 
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:751)
        at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:569)
        at 
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144)
        at 
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:767)
        at 
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)
        at 
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:426)
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:326)
        ... 3 more
   Caused by: java.util.NoSuchElementException: No value bound
        at 
org.springframework.boot.context.properties.bind.BindResult.get(BindResult.java:55)
        ... 22 more
   
   
   The  round-robin algorithm does not require attributes 'props'
   and
   I don't need to configure 'spring.shardingsphere.datasource.common.xxx'


----------------------------------------------------------------
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]


Reply via email to