How to configure intellij to find spring properties source

Viewed 73


I'm looking for a way to follow source of spring configuration from annotation.
E.g. Having below Bean is any way to e.g. click on my-components-service.books.configurations and be redirect or list yaml files which contains config which would be injected in runtime?

@Bean
@ConfigurationProperties(prefix = "my-components-service.books.configurations")
Map<ComponentType, BooksConfiguration> booksConfiguration() {
  return new HashMap<>();
}
1 Answers

If @ConfigurationProperties is at the class level then there should be some gutter icons that will show where the properties have been set. IntelliJ spring boot properties gutter popup

It doesn't look like this works when it's specified on a @Bean like in your example however. A possible workaround is to use a nested @Configuration class, though that may be undesirable. enter image description here

Related