[英]How to configure intellij to find spring properties source
I'm looking for a way to follow source of spring configuration from annotation.我正在寻找一种方法来从注释中跟踪 spring 配置的来源。
Eg Having below Bean is any way to eg click on my-components-service.books.configurations
and be redirect or list yaml files which contains config which would be injected in runtime?例如,拥有下面的 Bean 是否有任何方法可以例如单击
my-components-service.books.configurations
并重定向或列出 yaml 文件,其中包含将在运行时注入的配置?
@Bean
@ConfigurationProperties(prefix = "my-components-service.books.configurations")
Map<ComponentType, BooksConfiguration> booksConfiguration() {
return new HashMap<>();
}
If @ConfigurationProperties
is at the class level then there should be some gutter icons that will show where the properties have been set.如果
@ConfigurationProperties
处于 class 级别,那么应该有一些装订线图标将显示设置属性的位置。
It doesn't look like this works when it's specified on a @Bean
like in your example however.但是,当它像您的示例中那样在
@Bean
上指定时,它看起来不起作用。 A possible workaround is to use a nested @Configuration
class, though that may be undesirable.一种可能的解决方法是使用嵌套的
@Configuration
class,尽管这可能是不可取的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.