I recur this issure in an new empty project with springboot2.5.5 application.yml likes below, but the log is colorful
spring:
output:
ansi:
enabled: never
After I debug my project, I found this code change AnsiOutput.enabled from initial DETECT to ALWAYS, but I'm confused why Binder.get(environment).bind("spring.output.ansi.enabled", AnsiOutput.Enabled.class) bind to ALWAYS
Comment From: wilkinsona
IntelliJ IDEA sets spring.output.ansi.enabled=always as a JVM parameter which will take precedence over your configuration in application.yml. I don't use IDEA, but I suspect it may be possible to disable this in the run configuration for your application. Failing that, it may be possible to set it to never yourself as a JVM parameter.
Comment From: lfz757077613
That makes sense, thx There is no options for spring.output.ansi.enabled in run configuration 😔
Comment From: LuisEscamillaMartin
You can set it at runtime this way:
Windows: set SPRING_OUTPUT_ANSI_ENABLED=NEVER Linux: export SPRING_OUTPUT_ANSI_ENABLED=NEVER