UAST
Incorrectly configured @EventListener methods
Warning
New
Last modified: 03 December 2024Reports 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) {}
}
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
SpringEventListenerInspection
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Spring, 243.23126 |
Thanks for your feedback!
Was this page helpful?