Inspectopedia Help

Incorrectly configured @EventListener methods

Reports incorrect @EventListener methods.


@Configuration @ComponentScan open class Config data class MyEvent(val string: String) @Component class LogComponent { @EventListener // Method annotated with @EventListener must be public private fun logCommands(commandName: MyEvent) {} @EventListener // Method must have maximum one parameter fun processCommand(commandName: MyEvent, text: String) {} }

Inspection Details

By default bundled with:

IntelliJ IDEA 2024.1, Qodana for JVM 2024.1,

Can be installed with plugin:

Spring, 241.16690

Last modified: 29 April 2024