Spring Boot Endpoints and Kotlin
In this latest post about Kotlin support in Spring plugins in IntelliJ IDEA, we’d like to point out that Spring Boot is also fully supported for Kotlin. When you run a Kotlin main function that starts a Spring Boot application, it will be automatically recognized as a Spring Boot Run configuration:
Runtime beans information becomes available via Endpoints:
In addition to static-analysis-based gutters, there are runtime dependencies gutter hints appearing near bean declarations:
If you add Spring Boot Actuator to your project, you’ll get additional support for navigating to and testing Spring MVC handlers:
If you use Kotlin to develop Spring Boot apps, especially web services, these features should be a lot of help.
More posts about Kotlin with Spring support in IntelliJ IDEA are coming, so stay tuned!
Matouš Voldřich says:
October 23, 2018Endpoints mapping does not seem to work with spring-boot-starter-webflux. Are there plans to implement that too?
Konstantin Aleev says:
October 23, 2018Hello, Matouš! Yes, we are planning to fix the problem, please, follow the issue: https://youtrack.jetbrains.com/issue/IDEA-195829
Holger Brandl says:
October 23, 2018pretty cool feature especially the endpoints in combination with the built in rest editor. Thanks!
Abdu Chadili says:
November 19, 2019Hello,
I used to run all my springboot applications locally from IDEA but I can’t anymore since I upgraded to latest versions of community Intellij idea.
I am getting this error :
18:49:40.704 [] [NFCU Case Management Service] [main] ERROR [nfcu-case-management-presentation-service,,,] o.s.boot.SpringApplication – Application startup failed
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.backbase.nfcu.CaseApplication]; nested exception is java.lang.IllegalStateException: Failed to introspect annotated methods on class org.springframework.boot.web.support.SpringBootServletInitializer
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:181)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:308)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:228)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:272)
Medadvicees says:
February 23, 2020Although Java does not allow one to express null-safety in its type-system, Spring Framework provides null-safety of the whole Spring Framework API via tooling-friendly annotations declared in the
APKun says:
April 22, 2020Dependencies: “Spring Web Starter”, “Mustache”, “Spring Data JPA”, “H2 Database” and “Spring Boot DevTools” In addition to the obvious Kotlin Gradle plugin, the default configuration declares the kotlin-spring plugin which automatically opens classes and methods (unlike in Java, the default qualifier is