Skip to content

Commit 8739094

Browse files
Doha2012pivovarit
authored andcommitted
minor upgrade (eugenp#2259)
* minor logging fix * spring security sso * use basic auth * use form login * cleanup * cleanup * final cleanup * second client app for sso * spring boot bootstrap * add logic * cleanup * add simple controller * add thymeleaf and security * minor fix * minor fix * add more boot properties * fix live test * fix live test * minor fix * semaphores * fix configuration * kotlin collection * add more collection examples * minor upgrade
1 parent 470ac0c commit 8739094

File tree

6 files changed

+11
-7
lines changed

6 files changed

+11
-7
lines changed

httpclient/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
<wiremock.version>2.5.1</wiremock.version>
148148

149149
<httpcore.version>4.4.5</httpcore.version>
150-
<httpclient.version>4.5.2</httpclient.version> <!-- 4.3.6 --> <!-- 4.4-beta1 -->
150+
<httpclient.version>4.5.3</httpclient.version> <!-- 4.3.6 --> <!-- 4.4-beta1 -->
151151

152152
<!-- maven plugins -->
153153
<cargo-maven2-plugin.version>1.6.1</cargo-maven2-plugin.version>

httpclient/src/test/java/org/baeldung/httpclient/HttpClientPostingLiveTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* NOTE : Need module spring-rest to be running
3434
*/
3535
public class HttpClientPostingLiveTest {
36-
private static final String SAMPLE_URL = "http://localhost:8080/spring-rest/users";
36+
private static final String SAMPLE_URL = "http://localhost:8082/spring-rest/users";
3737
private static final String URL_SECURED_BY_BASIC_AUTHENTICATION = "http://browserspy.dk/password-ok.php";
3838
private static final String DEFAULT_USER = "test";
3939
private static final String DEFAULT_PASS = "test";

spring-data-mongodb/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115

116116
<org.springframework.version>4.3.4.RELEASE</org.springframework.version>
117117

118-
<org.springframework.data.version>1.9.6.RELEASE</org.springframework.data.version>
118+
<org.springframework.data.version>1.10.4.RELEASE</org.springframework.data.version>
119119

120120
<rest-assured.version>2.9.0</rest-assured.version>
121121
<querydsl.version>4.1.4</querydsl.version>

spring-data-mongodb/src/main/java/org/baeldung/event/CascadeSaveMongoEventListener.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import org.springframework.beans.factory.annotation.Autowired;
44
import org.springframework.data.mongodb.core.MongoOperations;
55
import org.springframework.data.mongodb.core.mapping.event.AbstractMongoEventListener;
6+
import org.springframework.data.mongodb.core.mapping.event.BeforeConvertEvent;
67
import org.springframework.util.ReflectionUtils;
78

89
public class CascadeSaveMongoEventListener extends AbstractMongoEventListener<Object> {
@@ -11,7 +12,8 @@ public class CascadeSaveMongoEventListener extends AbstractMongoEventListener<Ob
1112
private MongoOperations mongoOperations;
1213

1314
@Override
14-
public void onBeforeConvert(final Object source) {
15+
public void onBeforeConvert(final BeforeConvertEvent<Object> event) {
16+
final Object source = event.getSource();
1517
ReflectionUtils.doWithFields(source.getClass(), new CascadeCallback(source, mongoOperations));
1618
}
1719
}

spring-data-mongodb/src/main/java/org/baeldung/event/UserCascadeSaveMongoEventListener.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@
44
import org.springframework.beans.factory.annotation.Autowired;
55
import org.springframework.data.mongodb.core.MongoOperations;
66
import org.springframework.data.mongodb.core.mapping.event.AbstractMongoEventListener;
7+
import org.springframework.data.mongodb.core.mapping.event.BeforeConvertEvent;
78

89
public class UserCascadeSaveMongoEventListener extends AbstractMongoEventListener<Object> {
910
@Autowired
1011
private MongoOperations mongoOperations;
1112

1213
@Override
13-
public void onBeforeConvert(final Object source) {
14-
if (source instanceof User && ((User) source).getEmailAddress() != null) {
14+
public void onBeforeConvert(final BeforeConvertEvent<Object> event) {
15+
final Object source = event.getSource();
16+
if ((source instanceof User) && (((User) source).getEmailAddress() != null)) {
1517
mongoOperations.save(((User) source).getEmailAddress());
1618
}
1719
}

spring-security-rest/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@
307307
<rest-assured.version>2.9.0</rest-assured.version>
308308

309309
<!-- swagger -->
310-
<springfox-swagger.version>2.6.1</springfox-swagger.version>
310+
<springfox-swagger.version>2.7.0</springfox-swagger.version>
311311

312312
<httpcore.version>4.4.5</httpcore.version>
313313
<httpclient.version>4.5.2</httpclient.version>

0 commit comments

Comments
 (0)