You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/07/10 09:27:23 UTC

[GitHub] [incubator-shardingsphere] dahaian opened a new issue #2689: 与spring boot 集成后启动报错

dahaian opened a new issue #2689: 与spring boot 集成后启动报错
URL: https://github.com/apache/incubator-shardingsphere/issues/2689
 
 
   我根据官方文档给的配置,配置了spring boot集成sharding jdbc,具体的配置如下:
   ![QQ截图20190710172415](https://user-images.githubusercontent.com/9957813/60957651-916ed780-a337-11e9-9208-d4c310f8adfc.png)
   我是只想配置分表不分库的,不过官方好像没有给出单独的分表配置,所以我按照以上的配置启动spring,以下是测试代码:
   ![image](https://user-images.githubusercontent.com/9957813/60957756-c418d000-a337-11e9-896f-3fba99ce8280.png)
   启动spring后报以下错误:
   org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testC': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/apache/shardingsphere/shardingjdbc/spring/boot/SpringBootConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalArgumentException: Type is required.
   
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services