Inspectopedia Help

Incorrectly configured @EventListener methods

Reports incorrect @EventListener methods.

Example:

@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

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Spring, 233.SNAPSHOT

Last modified: 13 July 2023