Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is --spring.output.ansi.enabled configured?

I have inherited a java Spring Boot project and I'm new to most java configurations. When I run this application in debug mode the first argument passed to my application as args[0] is --spring.output.ansi.enabled=always. I have searched my project files but cannot see where this might be configured to turn off, that is I do not want it passed in as an argument. I am using the Spring STS 3.9.1 IDE.

like image 943
phil Avatar asked Dec 28 '17 17:12

phil


3 Answers

In the Spring STS IDE the Debug Configuration has an option ANSI console output which was checked. Unchecking stopped the argument being passed.

like image 193
phil Avatar answered Nov 18 '22 06:11

phil


Under Debug Configuration, uncheck the field highlighted in Red.Debug Configuration

like image 4
Andy Avatar answered Nov 18 '22 07:11

Andy


All previous answers are correct. Nevertheless, here another alternative to configure Ansi output, even though it does not answer the original question (remember, args[0] had a value): the environment variable SPRING_OUTPUT_ANSI_ENABLED=always could be set, either in the STS/Eclipse run/debug configuration (tab Environment), or otherwise for your account, or globally on your machine.

By the way, any Spring Boot configuration property can be configured via environment variables:

  • either in a SPRING_APPLICATION_JSON environment variable,
  • or with Binding from Environment Variables
like image 1
t0r0X Avatar answered Nov 18 '22 05:11

t0r0X