codingapi / codingapi/tx-lcn

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

Abierto
#427 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Java
Estrellas
4.2k
Forks
1.4k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Comienza por el constructor de TableStructAnalyser mencionado en la excepción de inicio y compara la configuración de business-service con la de los tres servicios que definen fuentes de datos. Reproduce el fallo de inicio en TX-LCN 5.0.2 y, a continuación, verifica que un servicio sin una DataSource puede iniciarse mientras los servicios con fuentes de datos continúan inicializándose correctamente.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
java, spring-boot
Área
backend, databases, distributed-systems
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.