File tree Expand file tree Collapse file tree
um-webapp/src/main/java/com/baeldung/um/persistence/setup
um-webapp/src/main/java/com/baeldung/um/persistence/setup
src/main/java/com/baeldung/um/persistence/setup
um-webapp/src/main/java/com/baeldung/um/persistence/setup
um-webapp/src/main/java/com/baeldung/um
um-webapp/src/main/java/com/baeldung/um
um-webapp/src/main/java/com/baeldung/um Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414 <parent >
1515 <groupId >org.springframework.boot</groupId >
1616 <artifactId >spring-boot-starter-parent</artifactId >
17- <version >1.4.0 .RELEASE</version >
17+ <version >1.4.3 .RELEASE</version >
1818 <relativePath /> <!-- lookup parent from repository -->
1919 </parent >
2020
104104 <java .version>1.8</java .version>
105105
106106 <!-- overriding Spring Boot -->
107- <spring-hateoas .version>0.21.0.RELEASE</spring-hateoas .version>
108- <spring-boot .version>1.4.0.RELEASE</spring-boot .version>
107+ <spring-hateoas .version>0.21.0.RELEASE</spring-hateoas .version>
109108
110109 <commons-collections .version>3.2.2</commons-collections .version>
111110 <hibernate .version>5.2.1.Final</hibernate .version>
112111 <hibernate-validator .version>5.2.4.Final</hibernate-validator .version>
113112 <httpclient .version>4.5.2</httpclient .version>
114- <jackson .version>2.8.1</jackson .version>
115- <javassist .version>3.20.0-GA</javassist .version>
116- <mysql .version>5.1.39</mysql .version>
117113
114+ <javassist .version>3.20.0-GA</javassist .version>
115+ <mysql .version>5.1.39</mysql .version>
118116 <slf4j .version>1.7.21</slf4j .version>
119117
120118 <!-- Spring related -->
125123
126124 <!-- marshalling -->
127125 <jaxb-api .version>2.2.12</jaxb-api .version>
126+ <jackson .version>2.8.5</jackson .version>
128127
129128 <!-- commons and utils -->
130129 <commons-lang3 .version>3.4</commons-lang3 .version>
Original file line number Diff line number Diff line change @@ -22,9 +22,12 @@ public MyApplicationContextInitializer() {
2222 public void initialize (final ConfigurableApplicationContext applicationContext ) {
2323 final ConfigurableEnvironment environment = applicationContext .getEnvironment ();
2424 final String activeProfiles = environment .getProperty ("spring.profiles.active" );
25+
2526 logger .info ("The active profiles are: {}" , activeProfiles );
2627
27- environment .setActiveProfiles (activeProfiles .split ("," ));
28+ if (activeProfiles != null ) {
29+ environment .setActiveProfiles (activeProfiles .split ("," ));
30+ }
2831 }
2932
3033}
Original file line number Diff line number Diff line change 1313 <parent >
1414 <groupId >org.springframework.boot</groupId >
1515 <artifactId >spring-boot-starter-parent</artifactId >
16- <version >1.4.0 .RELEASE</version >
16+ <version >1.4.3 .RELEASE</version >
1717 <relativePath /> <!-- lookup parent from repository -->
1818 </parent >
1919
103103 <java .version>1.8</java .version>
104104
105105 <!-- overriding Spring Boot -->
106- <spring-hateoas .version>0.21.0.RELEASE</spring-hateoas .version>
107- <spring-boot .version>1.4.0.RELEASE</spring-boot .version>
106+ <spring-hateoas .version>0.21.0.RELEASE</spring-hateoas .version>
108107
109108 <commons-collections .version>3.2.2</commons-collections .version>
110109 <hibernate .version>5.2.1.Final</hibernate .version>
111110 <hibernate-validator .version>5.2.4.Final</hibernate-validator .version>
112- <httpclient .version>4.5.2</httpclient .version>
113- <jackson .version>2.8.1</jackson .version>
111+ <httpclient .version>4.5.2</httpclient .version>
114112 <javassist .version>3.20.0-GA</javassist .version>
115113 <mysql .version>5.1.39</mysql .version>
116114
124122
125123 <!-- marshalling -->
126124 <jaxb-api .version>2.2.12</jaxb-api .version>
125+ <jackson .version>2.8.6</jackson .version>
127126
128127 <!-- commons and utils -->
129128 <commons-lang3 .version>3.4</commons-lang3 .version>
Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ public void initialize(final ConfigurableApplicationContext applicationContext)
2424 final String activeProfiles = environment .getProperty ("spring.profiles.active" );
2525 logger .info ("The active profiles are: {}" , activeProfiles );
2626
27- environment .setActiveProfiles (activeProfiles .split ("," ));
27+ if (activeProfiles != null ) {
28+ environment .setActiveProfiles (activeProfiles .split ("," ));
29+ }
2830 }
2931
3032}
Original file line number Diff line number Diff line change 1111 <parent >
1212 <groupId >org.springframework.boot</groupId >
1313 <artifactId >spring-boot-starter-parent</artifactId >
14- <version >1.4.0 .RELEASE</version >
14+ <version >1.4.3 .RELEASE</version >
1515 <relativePath /> <!-- lookup parent from repository -->
1616 </parent >
1717
101101 <java .version>1.8</java .version>
102102
103103 <!-- overriding Spring Boot -->
104- <spring-hateoas .version>0.21.0.RELEASE</spring-hateoas .version>
105- <spring-boot .version>1.4.0.RELEASE</spring-boot .version>
104+ <spring-hateoas .version>0.21.0.RELEASE</spring-hateoas .version>
106105
107106 <commons-collections .version>3.2.2</commons-collections .version>
108107 <hibernate .version>5.2.1.Final</hibernate .version>
109108 <hibernate-validator .version>5.2.4.Final</hibernate-validator .version>
110- <httpclient .version>4.5.2</httpclient .version>
111- <jackson .version>2.8.1</jackson .version>
109+ <httpclient .version>4.5.2</httpclient .version>
112110 <javassist .version>3.20.0-GA</javassist .version>
113111 <mysql .version>5.1.39</mysql .version>
114112
122120
123121 <!-- marshalling -->
124122 <jaxb-api .version>2.2.12</jaxb-api .version>
123+ <jackson .version>2.8.6</jackson .version>
125124
126125 <!-- commons and utils -->
127126 <commons-lang3 .version>3.4</commons-lang3 .version>
Original file line number Diff line number Diff line change 6363
6464 <plugins >
6565
66+ <plugin >
67+ <groupId >org.springframework.boot</groupId >
68+ <artifactId >spring-boot-maven-plugin</artifactId >
69+ <executions >
70+ <execution >
71+ <goals >
72+ <goal >repackage</goal >
73+ </goals >
74+ </execution >
75+ </executions >
76+ </plugin >
77+
6678 <plugin >
6779 <groupId >org.codehaus.cargo</groupId >
6880 <artifactId >cargo-maven2-plugin</artifactId >
Original file line number Diff line number Diff line change @@ -21,10 +21,11 @@ public MyApplicationContextInitializer() {
2121 @ Override
2222 public void initialize (final ConfigurableApplicationContext applicationContext ) {
2323 final ConfigurableEnvironment environment = applicationContext .getEnvironment ();
24- final String activeProfiles = environment .getProperty ("spring.profiles.active" );
25- logger .info ("The active profiles are: {}" , activeProfiles );
24+ final String activeProfiles = environment .getProperty ("spring.profiles.active" );
2625
27- environment .setActiveProfiles (activeProfiles .split ("," ));
26+ if (activeProfiles != null ) {
27+ environment .setActiveProfiles (activeProfiles .split ("," ));
28+ }
2829 }
2930
3031}
Original file line number Diff line number Diff line change 1111 <parent >
1212 <groupId >org.springframework.boot</groupId >
1313 <artifactId >spring-boot-starter-parent</artifactId >
14- <version >1.4.0 .RELEASE</version >
14+ <version >1.4.3 .RELEASE</version >
1515 <relativePath /> <!-- lookup parent from repository -->
1616 </parent >
1717
101101 <java .version>1.8</java .version>
102102
103103 <!-- overriding Spring Boot -->
104- <spring-hateoas .version>0.21.0.RELEASE</spring-hateoas .version>
105- <spring-boot .version>1.4.0.RELEASE</spring-boot .version>
104+ <spring-hateoas .version>0.21.0.RELEASE</spring-hateoas .version>
106105
107106 <commons-collections .version>3.2.2</commons-collections .version>
108107 <hibernate .version>5.2.1.Final</hibernate .version>
109108 <hibernate-validator .version>5.2.4.Final</hibernate-validator .version>
110- <httpclient .version>4.5.2</httpclient .version>
111- <jackson .version>2.8.1</jackson .version>
109+ <httpclient .version>4.5.2</httpclient .version>
112110 <javassist .version>3.20.0-GA</javassist .version>
113111 <mysql .version>5.1.39</mysql .version>
114112
122120
123121 <!-- marshalling -->
124122 <jaxb-api .version>2.2.12</jaxb-api .version>
123+ <jackson .version>2.8.6</jackson .version>
125124
126125 <!-- commons and utils -->
127126 <commons-lang3 .version>3.4</commons-lang3 .version>
Original file line number Diff line number Diff line change @@ -20,8 +20,7 @@ public MyApplicationContextInitializer() {
2020 @ Override
2121 public void initialize (final ConfigurableApplicationContext applicationContext ) {
2222 /*final ConfigurableEnvironment environment = applicationContext.getEnvironment();
23- final String activeProfiles = environment.getProperty("spring.profiles.active");
24- logger.info("The active profiles are: {}", activeProfiles);
23+ final String activeProfiles = environment.getProperty("spring.profiles.active");
2524
2625 environment.setActiveProfiles(activeProfiles.split(","));*/
2726 }
Original file line number Diff line number Diff line change 1111 <parent >
1212 <groupId >org.springframework.boot</groupId >
1313 <artifactId >spring-boot-starter-parent</artifactId >
14- <version >1.4.0 .RELEASE</version >
14+ <version >1.4.3 .RELEASE</version >
1515 <relativePath /> <!-- lookup parent from repository -->
1616 </parent >
1717
101101 <java .version>1.8</java .version>
102102
103103 <!-- overriding Spring Boot -->
104- <spring-hateoas .version>0.21.0.RELEASE</spring-hateoas .version>
105- <spring-boot .version>1.4.0.RELEASE</spring-boot .version>
104+ <spring-hateoas .version>0.21.0.RELEASE</spring-hateoas .version>
106105
107106 <commons-collections .version>3.2.2</commons-collections .version>
108107 <hibernate .version>5.2.1.Final</hibernate .version>
109108 <hibernate-validator .version>5.2.4.Final</hibernate-validator .version>
110- <httpclient .version>4.5.2</httpclient .version>
111- <jackson .version>2.8.1</jackson .version>
109+ <httpclient .version>4.5.2</httpclient .version>
112110 <javassist .version>3.20.0-GA</javassist .version>
113111 <mysql .version>5.1.39</mysql .version>
114112
122120
123121 <!-- marshalling -->
124122 <jaxb-api .version>2.2.12</jaxb-api .version>
123+ <jackson .version>2.8.6</jackson .version>
125124
126125 <!-- commons and utils -->
127126 <commons-lang3 .version>3.4</commons-lang3 .version>
You can’t perform that action at this time.
0 commit comments