Files
spring-boot-demo/kotlin/docs/output/01-build-failure-without-allopen.txt

25 lines
1.5 KiB
Plaintext

Real, captured output: removing the "spring" compilerPlugin entry from pom.xml's
kotlin-maven-plugin configuration (keeping only "jpa"), then running:
mvn -q -B clean package -DskipTests && java -jar target/kotlin-demo.jar
Failure #1 -- BookService's @Transactional needs a CGLIB subclass proxy, but
BookService is a final Kotlin class (and Application, as a @Configuration class,
has the same problem even before any bean method runs):
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: @Configuration class 'Application' may not be final. Remove the final modifier to continue.
Offending resource: com.ankurm.kotlin.Application
Failure #2 -- after manually adding `open` to just the Application class to get
past failure #1 (sed -i 's/^class Application {/open class Application {/' on
Application.kt), rebuilding and rerunning hits the next thing the "spring"
plugin would otherwise have handled automatically: the @Bean method itself.
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: @Bean method 'seed' must not be private or final; change the method's modifiers to continue.
Offending resource: com.ankurm.kotlin.Application
Restoring the "spring" compilerPlugin entry (alongside "jpa") and reverting
Application back to a plain, non-open `class Application` -- i.e. the
checked-in state of this repository -- builds and starts cleanly. See
02-fixed-startup.txt for that run.