lx-lcn必须要数据源吗,没有数据源应用启动不了
- Lingua principale
- Java
- Stelle
- 4.2k
- Fork
- 1.4k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
- [ ] I have searched the [issues](https://github.com/codingapi/tx-lcn/issues) of this repository and believe that this is not a duplicate.
### 1. Bug Description
使用tx-lcn 5.0.2时,有如下4个服务:business-service,inventory-service,order-service,account-service,其中 business-service服务是没有数据源,inventory-service,order-service,account-service都是有自己的数据源,因为business-service它只是负责调用其他3个服务完成业务,但是启动时报异常,其他3个有数据源的就能正常启动,异常如下:
Parameter 0 of constructor in com.codingapi.txlcn.tc.core.transaction.txc.analy.TableStructAnalyser required a bean of type 'javax.sql.DataSource' that could not be found.
The following candidates were found but could not be injected:
- Bean method 'dataSource' in 'JndiDataSourceAutoConfiguration' not loaded because @ConditionalOnProperty (spring.datasource.jndi-name) did not find property 'jndi-name'
- Bean method 'dataSource' in 'XADataSourceAutoConfiguration' not loaded because @ConditionalOnBean (types: org.springframework.boot.jdbc.XADataSourceWrapper; SearchStrategy: all) did not find any beans of type org.springframework.boot.jdbc.XADataSourceWrapper
Action:
Consider revisiting the entries above or defining a bean of type 'javax.sql.DataSource' in your configuration.
### 2. Environment:
- JDK version: 1.8
- OS: windows7
- TX-LCN version: 5.0.2
- Others:
### 3. Exception Stacktrace
```
Paste your Exception Stacktrace here!
```
### 4. Tour Idea
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Start at the TableStructAnalyser constructor named in the startup exception and compare the configuration of business-service with the three services that define data sources. Reproduce the startup failure on TX-LCN 5.0.2, then verify that a service without a DataSource can start while services with data sources continue to initialize correctly.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java, spring-boot
- Ambito
- backend, databases, distributed-systems
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100