File tree Expand file tree Collapse file tree
spring-cloud/spring-cloud-bootstrap/config/src/main/resources
jetty-session-demo/src/main/java/com/baeldung/spring/session/jettyex
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 @@ -5,4 +5,8 @@ spring.cloud.config.server.git.uri=file:///${user.home}/application-config
55
66eureka.client.region = default
77eureka.client.registryFetchIntervalSeconds = 5
8- eureka.client.serviceUrl.defaultZone =http://discUser:discPassword@localhost:8082/eureka/
8+ eureka.client.serviceUrl.defaultZone =http://discUser:discPassword@localhost:8082/eureka/
9+
10+ security.user.name =configUser
11+ security.user.password =configPassword
12+ security.user.role =SYSTEM
Original file line number Diff line number Diff line change 1- package com .baeldung .spring .session .tomcatex ;
1+ package com .baeldung .spring .session .jettyex ;
22
33import org .springframework .boot .SpringApplication ;
44import org .springframework .boot .autoconfigure .SpringBootApplication ;
5- import org .springframework .web .bind .annotation .RequestMapping ;
65import org .springframework .web .bind .annotation .RestController ;
76
87@ SpringBootApplication
@@ -11,14 +10,4 @@ public class JettyWebApplication {
1110 public static void main (String [] args ) {
1211 SpringApplication .run (JettyWebApplication .class , args );
1312 }
14-
15- @ RequestMapping
16- public String helloJetty () {
17- return "hello Jetty" ;
18- }
19-
20- @ RequestMapping ("/test" )
21- public String lksjdf () {
22- return "" ;
23- }
2413}
Original file line number Diff line number Diff line change 1- package com .baeldung .spring .session .tomcatex ;
1+ package com .baeldung .spring .session .jettyex ;
22
33import org .springframework .context .annotation .Configuration ;
44import org .springframework .security .config .annotation .web .builders .HttpSecurity ;
Original file line number Diff line number Diff line change 1- package com .baeldung .spring .session .tomcatex ;
1+ package com .baeldung .spring .session .jettyex ;
22
33import org .springframework .context .annotation .Bean ;
44import org .springframework .context .annotation .Configuration ;
Original file line number Diff line number Diff line change 1+ package com .baeldung .spring .session .jettyex ;
2+
3+ import org .springframework .web .bind .annotation .RequestMapping ;
4+ import org .springframework .web .bind .annotation .RestController ;
5+
6+ @ RestController
7+ public class TestController {
8+ @ RequestMapping
9+ public String helloJetty () {
10+ return "hello Jetty" ;
11+ }
12+ }
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+ @ RestController
7+ public class TestController {
8+
9+ @ RequestMapping
10+ public String helloDefault () {
11+ return "hello default" ;
12+ }
13+
14+ @ RequestMapping ("/tomcat" )
15+ public String helloTomcat () {
16+ return "hello tomcat" ;
17+ }
18+
19+ @ RequestMapping ("/tomcat/admin" )
20+ public String helloTomcatAdmin () {
21+ return "hello tomcat admin" ;
22+ }
23+ }
Original file line number Diff line number Diff line change @@ -11,19 +11,4 @@ public class TomcatWebApplication {
1111 public static void main (String [] args ) {
1212 SpringApplication .run (TomcatWebApplication .class , args );
1313 }
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- }
2914}
You can’t perform that action at this time.
0 commit comments