小编gka*_*ura的帖子

SpringBootTest 从扫描中排除包

我想在使用 spring@SpringBootTest时以与使用@ComponentScan. 有没有像

@SpringBootTest(excludeFilters =@ComponentScan.Filter(
            type = FilterType.REGEX,
            pattern = "package\\.\\.to\\.Exclude.*"))
Run Code Online (Sandbox Code Playgroud)

java spring-boot spring-boot-test

7
推荐指数
1
解决办法
5879
查看次数

Profile Inheritage In spring boot

是否可以在 spring boot 中拥有一个配置文件以及另一个继承大多数父值和 bean 的配置文件?

例如,我有两个配置文件 staging 和 staging-task。我希望 staging-task 继承 staging 配置文件的数据库配置,但是我希望它覆盖 jpa 配置。

配置文件继承是否可用于@Configuration bean。

java spring-profiles spring-boot

4
推荐指数
1
解决办法
3914
查看次数

JUNIT 5:将弹簧组件注入到自定义TestTemplateInvocationContextProvider中

JUnit Jupiter(JUnit 5)中是否有一种方法可以将Spring组件注入TestTemplateInvocationContextProvider

spring junit5

2
推荐指数
1
解决办法
2095
查看次数