spring-boot:run
in the Maven plugin produces color-coded output, whereas bootRun
in the Gradle plugin does not
Is there any plan to fix this?
Yes, although we don't consider it high priority. Contributions are most welcome.
Issue #2331 seems similar to this one.
This setting worked for me:
bootRun {
jvmArgs = ["-Dspring.output.ansi.enabled=ALWAYS"]
}
@nickgrealy Your JVM flag certainly works. However, it's a problem when using Gradle to launch the program in a non-terminal environment, such as CI.
@nickgrealy thx for advice!
However, if working with Kotlin you might need to add following to your build.gradle.kts :
tasks.bootRun {
jvmArgs = listOf("-Dspring.output.ansi.enabled=ALWAYS")
}
Worked for my project: Gradle 5.4.1, Kotlin 1.3.21, Spring 2.1.6.RELEASE
Most helpful comment
This setting worked for me:
Source: http://stackoverflow.com/questions/28783832/getting-spring-boot-color-console-logging-working-within-intellij