spring Boot War Deployment auf Tomcat mit Status: OK, gibt aber 404 für den Zugriff auf
Meine Konfigurationsklasse sieht wie folgt aus
@Configuration
@EnableAutoConfiguration
@ComponentScan(basePackages = "com.projectx")
public class Application extends SpringBootServletInitializer{
public static void main(String[] args) {
SpringApplication.run(applicationClass, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(Application.class);
}
}
Ebenfallsbuild.gradle
Datei sieht so aus
apply plugin: 'java'
sourceCompatibility=1.8
targetCompatibility=1.8
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'spring-boot'
apply plugin: 'war'
mainClassName = 'com.projectx.data.config.Application'
buildscript {
repositories {
maven { url "http://repo.spring.io/libs-release" }
mavenLocal()
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.2.1.RELEASE")
}
}
war {
baseName = 'gs-accessing-data-jpa'
version = '0.1.0'
}
repositories {
mavenLocal()
mavenCentral()
maven { url "http://repo.spring.io/libs-release" }
maven { url "https://repository.jboss.org/nexus/content/repositories/releases" }
}
configurations {
providedRuntime
}
dependencies {
compile("org.springframework.boot:spring-boot-starter-web")
providedRuntime("org.springframework.boot:spring-boot-starter-tomcat")
}
Also, wo immer ich dieses Projekt auf Tomcat implementiere, wird der folgende Fehler angezeigt. Da ich mate alle Voraussetzungen habe, um Glas in Krieg umzuwandeln, weiß ich nicht genau, woran das liegt, mein Projek
Es gibt 404 NICHT GEFUNDEN. (Ich verwende STS 3.6.0 mit Gradle Plugin)