Console Lost Color After Refreshing GradleProject in Spring Tool Suite

Asked 1 years ago, Updated 1 years ago, 403 views

I am learning Spring using the Spring Tool Suite (STS).

On the way, I noticed that there was a shortage of libraries, so I did the following:

  • Add one line of implementation to build.grade
  • From Package Explorer, right-click > Gradle > Refresh Gradle Project
  • by project name
  • Start the project after the refresh is complete

Then, all the characters became black and white as shown in the picture below.
console

I thought it might be a simple garbled character, so I changed the font a lot, but it hasn't improved.
Is there a way to change the color back to the console?

build.gradle

plugins{
    id'org.springframework.boot'version'2.7.0'
    id 'io.spring.dependency-management 'version' 1.0.11.RELEASE'
    id'java'
}

group='com.example'
version = '0.0.1 - SNAPSHOT'
sourceCompatibility='17'

repositories {
    mavenCentral()
}

dependencies {
    implementation'org.springframework.boot:spring-boot-starter-jdbc'
    implementation'org.springframework.boot:spring-boot-starter-thymeleaf'
    implementation'org.springframework.boot:spring-boot-starter-web'
    implementation'org.springframework.boot:spring-boot-starter-validation'//Added
    developmentOnly'org.springframework.boot:spring-boot-devtools'
    runtimeOnly'com.h2database:h2'
    testImplementation'org.springframework.boot:spring-boot-starter-test'
}

tasks.named ('test') {
    useJUnitPlatform()
}

java spring spring-boot gradle

2022-09-30 22:04

1 Answers

The plug-in ANSI Escape in Console that is installed by default on STS is responsible for this feature.

Possible causes are unintentionally one of the following:

  • Uninstalled plug-in
  • Disabled plug-in features

Check the settings for the Ansi Console in the configuration dialog displayed in the Window>Preference menu.
(If you have uninstalled the plug-in, I don't think this setting itself exists.)

Ansi Console Settings


2022-09-30 22:04

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.