codingapi / codingapi/tx-lcn

lx-lcn必须要数据源吗,没有数据源应用启动不了

Open
#427 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
4.2k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.