File tree Expand file tree Collapse file tree
jetty-session-demo/src/main/java/com/baeldung/spring/session/tomcatex
tomcat-session-demo/src/main/java/com/baeldung/spring/session/tomcatex Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33import org .springframework .boot .SpringApplication ;
44import org .springframework .boot .autoconfigure .SpringBootApplication ;
5- import org .springframework .web .bind .annotation .RequestMapping ;
6- import org .springframework .web .bind .annotation .RestController ;
75
86@ SpringBootApplication
9- @ RestController
107public class JettyWebApplication {
118 public static void main (String [] args ) {
129 SpringApplication .run (JettyWebApplication .class , args );
1310 }
14-
15- @ RequestMapping
16- public String helloJetty () {
17- return "hello Jetty" ;
18- }
19-
20- @ RequestMapping ("/test" )
21- public String lksjdf () {
22- return "" ;
23- }
2411}
Original file line number Diff line number Diff line change 1+ package com .baeldung .spring .session .tomcatex ;
2+
3+ import org .springframework .web .bind .annotation .RequestMapping ;
4+ import org .springframework .web .bind .annotation .RestController ;
5+
6+ /**
7+ * Created by tschi on 11/12/2016.
8+ */
9+ @ RestController
10+ public class TestController {
11+ @ RequestMapping
12+ public String helloJetty () {
13+ return "hello Jetty" ;
14+ }
15+ }
Original file line number Diff line number Diff line change 1+ package com .baeldung .spring .session .tomcatex ;
2+
3+ import org .springframework .web .bind .annotation .RequestMapping ;
4+ import org .springframework .web .bind .annotation .RestController ;
5+
6+ /**
7+ * Created by tschi on 11/12/2016.
8+ */
9+ @ RestController
10+ public class TestController {
11+
12+ @ RequestMapping
13+ public String helloDefault () {
14+ return "hello default" ;
15+ }
16+
17+ @ RequestMapping ("/tomcat" )
18+ public String helloTomcat () {
19+ return "hello tomcat" ;
20+ }
21+
22+ @ RequestMapping ("/tomcat/admin" )
23+ public String helloTomcatAdmin () {
24+ return "hello tomcat admin" ;
25+ }
26+ }
Original file line number Diff line number Diff line change 22
33import org .springframework .boot .SpringApplication ;
44import org .springframework .boot .autoconfigure .SpringBootApplication ;
5- import org .springframework .web .bind .annotation .RequestMapping ;
6- import org .springframework .web .bind .annotation .RestController ;
75
86@ SpringBootApplication
9- @ RestController
107public class TomcatWebApplication {
118 public static void main (String [] args ) {
129 SpringApplication .run (TomcatWebApplication .class , args );
1310 }
14-
15- @ RequestMapping
16- public String helloDefault () {
17- return "hello default" ;
18- }
19-
20- @ RequestMapping ("/tomcat" )
21- public String helloTomcat () {
22- return "hello tomcat" ;
23- }
24-
25- @ RequestMapping ("/tomcat/admin" )
26- public String helloTomcatAdmin () {
27- return "hello tomcat admin" ;
28- }
2911}
You can’t perform that action at this time.
0 commit comments