wangwangwangBoy edited a comment on issue #12703:
URL: 
https://github.com/apache/shardingsphere/issues/12703#issuecomment-927250942


   > @wangwangwangBoy
   > I found your datasource configuration is incorrect.
   > `spring.shardingsphere.datasource` is needed.
   > Please refer to 
[document](https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/)
 and 
[example](https://github.com/apache/shardingsphere/blob/master/examples/shardingsphere-jdbc-example/sharding-example/sharding-spring-boot-mybatis-example/src/main/resources/application-sharding-tables.properties).
   @RaigorJiang
   My data source configuration does not come from yml. It is in my 
com.mine.shardingjdbc.myconfig.MyShardingConfig, can you check it again? 
According to the template, there is no need to configure the data source, the 
data source created directly in Java
   
![image](https://user-images.githubusercontent.com/46279672/134798346-75b4861c-e0e1-4b4a-8f91-c2a11f82797e.png)
   If you use the debug mode, you will find that the Autowired data source is 
successful
   
![image](https://user-images.githubusercontent.com/46279672/134798418-5fb2448b-614d-4816-841e-41fbde81e233.png)
   


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to