https://kotlinlang.org logo
Title
m

mbonnin

04/03/2023, 1:09 PM
Has anyone ever tried to run a spring boot app without the
org.jetbrains.kotlin.plugin.spring
plugin? My understanding is that the beans DSL removes some proxying so it might not require open classes? But I'm stuck at
@SpringBootApplication
because I haven't found a non-annotated equivalent.
s

sdeleuze

04/03/2023, 3:30 PM
@SpringBootApplication
is meta annotated with
@Configuration
which has by default
proxyBeanMethods = true
. If you want to avoid proxies by default, you may want to use
@Configuration(proxyBeanMethods = false)
and
@EnableAutoConfiguration
for example on your application class instead.
m

mbonnin

04/03/2023, 3:31 PM
Ah, very cool, trying that now 🙂
s

sdeleuze

04/03/2023, 3:32 PM
I shoukd probably update https://github.com/sdeleuze/spring-kotlin-functional now that Spring Fu is kind of frozen.
I will let you know if I find the time to do it.
m

mbonnin

04/03/2023, 3:33 PM
Frozen as in "working well" or more "not moving too much"?
s

sdeleuze

04/03/2023, 3:34 PM
Not moving too much, functional is important for the Spring team, but Spring Fu is difficult to maintain and not consistent enough with regular Boot, so we need a better way.
m

mbonnin

04/03/2023, 3:34 PM
Gotcha 👍
s

sdeleuze

04/03/2023, 3:35 PM
The repo I shared is super super old, but I will try to update it to provide a baseline for people wanting to use Kotlin + Spring the functional way