apache / apache/incubator-seata

启动时spring注入io.seata.spring.boot.autoconfigure.properties.SeataProperties not found

Open
#5,477 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
26k
Forks
8.8k
Avg merge
1d 8h
Merged PRs (30d)
4

Description

- [ ] I have searched the [issues](https://github.com/seata/seata/issues) of this repository and believe that this is not a duplicate.

### Ⅰ. Issue Description
spring cloud alibaba2021.0.5.0应用启动时,提示没有bean 类型io.seata.spring.boot.autoconfigure.properties.SeataProperties ,无法注入

### Ⅱ. Describe what happened

If there is an exception, please attach the exception trace:

```
Just paste your stack trace here!
```
''2023-03-30 16:56:15.690 INFO [main] o.s.c.c.scope.GenericScope:283 BeanFactory id=c22afeff-631e-3355-bc83-c7050af2be28
''2023-03-30 16:56:21.033 INFO [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:376 Bean 'io.seata.spring.boot.autoconfigure.SeataCoreAutoConfiguration' of type [io.seata.spring.boot.autoconfigure.SeataCoreAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
''2023-03-30 16:56:23.737 INFO [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:376 Bean 'springApplicationContextProvider' of type [io.seata.spring.boot.autoconfigure.provider.SpringApplicationContextProvider] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
''2023-03-30 16:56:23.739 INFO [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:376 Bean 'io.seata.spring.boot.autoconfigure.SeataAutoConfiguration' of type [io.seata.spring.boot.autoconfigure.SeataAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
''2023-03-30 16:56:25.262 INFO [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:376 Bean 'failureHandler' of type [io.seata.tm.api.DefaultFailureHandlerImpl] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
''2023-03-30 16:56:25.272 WARN [main] o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext:591 Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'globalTransactionScanner' defined in class path resource [io/seata/spring/boot/autoconfigure/SeataAutoConfiguration.class]: Unsatisfied dependency expressed through method 'globalTransactionScanner' parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'io.seata.spring.boot.autoconfigure.properties.SeataProperties' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
''2023-03-30 16:56:25.289 INFO [main] o.s.b.a.l.ConditionEvaluationReportLoggingListener:136

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
''2023-03-30 16:56:25.404 ERROR [main] o.s.b.d.LoggingFailureAnalysisReporter:40

***************************
APPLICATION FAILED TO START
***************************

Description:

Parameter 0 of method globalTransactionScanner in io.seata.spring.boot.autoconfigure.SeataAutoConfiguration required a bean of type 'io.seata.spring.boot.autoconfigure.properties.SeataProperties' that could not be found.

Action:

Consider defining a bean of type 'io.seata.spring.boot.autoconfigure.properties.SeataProperties' in your configuration.

### Ⅲ. Describe what you expected to happen

### Ⅳ. How to reproduce it (as minimally and precisely as possible)

1. xxx
2. xxx
3. xxx

### Ⅴ. Anything else we need to know?

### Ⅵ. Environment:

- JDK version : 1.8
- Seata version: 1.6.1
- OS :
- Others:

Contributor guide

Open the contributing guide

Research direction

Start with io.seata.spring.boot.autoconfigure.SeataAutoConfiguration and io.seata.spring.boot.autoconfigure.properties.SeataProperties, then reproduce the reported startup failure using Seata 1.6.1, JDK 8, and Spring Cloud Alibaba 2021.0.5.0. Trace why the SeataProperties bean is unavailable and verify that the application context starts without the reported UnsatisfiedDependencyException.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring, spring-boot
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.