BAEL-89 Spring session breaking out the controller and changing the formatting to be in line with the baeldung standard.

This commit is contained in:
tschiman 2016-11-12 09:30:44 -07:00
parent ca01d230a6
commit 58e704a0b8
4 changed files with 41 additions and 31 deletions

View File

@ -2,23 +2,10 @@ package com.baeldung.spring.session.tomcatex;
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
@RestController
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 "";
}
}

View File

@ -0,0 +1,15 @@
package com.baeldung.spring.session.tomcatex;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* Created by tschi on 11/12/2016.
*/
@RestController
public class TestController {
@RequestMapping
public String helloJetty() {
return "hello Jetty";
}
}

View File

@ -0,0 +1,26 @@
package com.baeldung.spring.session.tomcatex;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* Created by tschi on 11/12/2016.
*/
@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";
}
}

View File

@ -2,28 +2,10 @@ package com.baeldung.spring.session.tomcatex;
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
@RestController
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";
}
}