Inspection info: Verifies @ConfigurationProperties setup. New in 2018.3 IntelliJ
Asked Answered
L

1

8

I get the following hint in the latest IntelliJ Idea:

Not registered via @EnableConfigurationProperties or marked as Spring 
component less... (Ctrl+F1) 
Inspection info: Verifies @ConfigurationProperties setup. New in 2018.3

With the following configuration:

@Configuration 
@ConfigurationProperties(prefix = "myapp.reference")
@EnableConfigurationProperties(MyAppFactoryConfiguration.class)
@Profile("dev")
public class MyAppLibraryConfigDev {

It goes away if I add @Component, but isn't @Configuration already an @Component?

Not sure what it means, anyone?

Larrabee answered 26/11, 2018 at 15:39 Comment(3)
Please report an issue on YouTrack attaching sample project example: youtrack.jetbrains.com/issues/IDEAAltruistic
@Larrabee did you create the bug? was this bug fixed? I am still getting the error on v2018.3Theophylline
No I did not create a bug report.Larrabee
P
3

It was reported and declined as a bug. Because it is semantically incorrect (or less desirable) to declare a dumb properties PoJo (or Bean) as a @Configuration instead of a simpler @Component. Because a @configuration is a special kind of @component which can produce Beans itself.

Preston answered 8/2, 2019 at 13:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.