BAEL-89 - splitting controller and main application class
This commit is contained in:
parent
a323947704
commit
3914a5d417
|
@ -6,3 +6,7 @@ spring.cloud.config.server.git.uri=file:///${user.home}/application-config
|
|||
eureka.client.region = default
|
||||
eureka.client.registryFetchIntervalSeconds = 5
|
||||
eureka.client.serviceUrl.defaultZone=http://discUser:discPassword@localhost:8082/eureka/
|
||||
|
||||
security.user.name=configUser
|
||||
security.user.password=configPassword
|
||||
security.user.role=SYSTEM
|
|
@ -1,8 +1,7 @@
|
|||
package com.baeldung.spring.session.tomcatex;
|
||||
package com.baeldung.spring.session.jettyex;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@SpringBootApplication
|
||||
|
@ -11,14 +10,4 @@ public class JettyWebApplication {
|
|||
public static void main(String[] args) {
|
||||
SpringApplication.run(JettyWebApplication.class, args);
|
||||
}
|
||||
|
||||
@RequestMapping
|
||||
public String helloJetty() {
|
||||
return "hello Jetty";
|
||||
}
|
||||
|
||||
@RequestMapping("/test")
|
||||
public String lksjdf() {
|
||||
return "";
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.spring.session.tomcatex;
|
||||
package com.baeldung.spring.session.jettyex;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.spring.session.tomcatex;
|
||||
package com.baeldung.spring.session.jettyex;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
|
@ -0,0 +1,12 @@
|
|||
package com.baeldung.spring.session.jettyex;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
public class TestController {
|
||||
@RequestMapping
|
||||
public String helloJetty() {
|
||||
return "hello Jetty";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
package com.baeldung.spring.session.tomcatex;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
public class TestController {
|
||||
|
||||
@RequestMapping
|
||||
public String helloDefault() {
|
||||
return "hello default";
|
||||
}
|
||||
|
||||
@RequestMapping("/tomcat")
|
||||
public String helloTomcat() {
|
||||
return "hello tomcat";
|
||||
}
|
||||
|
||||
@RequestMapping("/tomcat/admin")
|
||||
public String helloTomcatAdmin() {
|
||||
return "hello tomcat admin";
|
||||
}
|
||||
}
|
|
@ -11,19 +11,4 @@ public class TomcatWebApplication {
|
|||
public static void main(String[] args) {
|
||||
SpringApplication.run(TomcatWebApplication.class, args);
|
||||
}
|
||||
|
||||
@RequestMapping
|
||||
public String helloDefault() {
|
||||
return "hello default";
|
||||
}
|
||||
|
||||
@RequestMapping("/tomcat")
|
||||
public String helloTomcat() {
|
||||
return "hello tomcat";
|
||||
}
|
||||
|
||||
@RequestMapping("/tomcat/admin")
|
||||
public String helloTomcatAdmin() {
|
||||
return "hello tomcat admin";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue