mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-06 16:48:24 +08:00
doc: 添加 spring-data 整合警告解决方法。
This commit is contained in:
parent
6dcb2295e6
commit
bc47f29bce
@ -33,6 +33,15 @@ MyBatis-Flex 使用了 APT 技术,这两个类是自动生成的,需要编
|
||||
|
||||
参考:[MyBatis-Flex APT 配置 - MyBatis-Flex 官方网站](./others/apt.md)
|
||||
|
||||
## 与 spring-data 整合输出警告:trationDelegate$BeanPostProcessorChecker : Bean 'x' of type [x] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [projectingArgumentResolverBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
|
||||
|
||||
排除 `SpringDataWebAutoConfiguration` 自动配置类即可:
|
||||
|
||||
```java
|
||||
@SpringBootApplication(exclude = SpringDataWebAutoConfiguration.class)
|
||||
public class SampleApplication {}
|
||||
```
|
||||
|
||||
## 阿里镜像找不到依赖?
|
||||
|
||||
```txt
|
||||
|
||||
@ -17,14 +17,12 @@ package com.mybatisflex.spring.boot;
|
||||
|
||||
import com.mybatisflex.core.row.Db;
|
||||
import com.mybatisflex.spring.FlexTransactionManager;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Role;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
import org.springframework.transaction.annotation.TransactionManagementConfigurer;
|
||||
@ -36,7 +34,6 @@ import org.springframework.transaction.annotation.TransactionManagementConfigure
|
||||
*/
|
||||
@ConditionalOnClass(Db.class)
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@AutoConfigureAfter({MybatisFlexAutoConfiguration.class})
|
||||
@AutoConfigureBefore({TransactionAutoConfiguration.class})
|
||||
public class FlexTransactionAutoConfiguration implements TransactionManagementConfigurer {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user