eclipse package org.springframework.boot.web.servlet.support does not exist

background

(1) I wanted to run the war created by Spring Boot on an external Tomcat. (2) I deployed to Tomcat and tried to connect, but a 404 error ③ Oh, I forgot to let the @SpringBootApplication class inherit SpringBootServletInitializer. (・ Ω <) Tehepero ☆ ④? I can't get through gradle build! (Gradle build of other projects will pass)

Mysterious error

error.text


Task :compileJava FAILED
C:\Users\******\workspace\test01\src\main\java\apl\TestApplication.java:6:error:Package org.springframework.boot.web.servlet.support does not exist
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
                                                   ^
C:\Users\******\workspace\test01\src\main\java\apl\TestApplication.java:9:error:Can't find symbol
public class NegoApplication extends SpringBootServletInitializer{
                                     ^
symbol:Class SpringBootServletInitializer
2 errors

Cause

For some reason, GRADLE_HOME was set only for the relevant project. (Projects that other gradle builds pass through used gradle that sticks to the eclipse plugin)

… Is each place different?

Measures taken

① Erase all build paths of the project ② Open the console and execute gradle ecripse ③ Set build.gradle so that GRADLE_HOME is not seen.

→ Success

Impressions

You can use GRADLE_HOME from the beginning. Hereafter care.

Recommended Posts

eclipse package org.springframework.boot.web.servlet.support does not exist
"Error: Package xxx does not exist" "Error: Symbol not found" when rewriting kotlin
[React + TypeScript] Property'options' does not exist on type'HTMLElement'.
[Error] ActiveRecord :: NoDatabaseError FATAL: database does not exist
Eclipse does not start after Java 11 is installed
About error PG :: UndefinedTable: ERROR: relation "XXXXXX" does not exist
Terminal does not start
Eclipse ~ Show Package Explorer ~
Sidekiq-limit_fetch does not work
bundle install does not install mysql2
Ruby version does not switch
Handling when calling a key that does not exist in hash
Project Facets in Eclipse does not have Java Server Faces (JSF)
Attempting pip install pytorch on jetson nano resulted in an error (error: package directory'torch / cuda' does not exist)