minor upgrade (#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
This commit is contained in:
Doha2012 2017-07-15 17:26:13 +02:00 committed by Grzegorz Piwowarek
parent 470ac0c7bb
commit 8739094a16
6 changed files with 11 additions and 7 deletions

View File

@ -147,7 +147,7 @@
<wiremock.version>2.5.1</wiremock.version>
<httpcore.version>4.4.5</httpcore.version>
<httpclient.version>4.5.2</httpclient.version> <!-- 4.3.6 --> <!-- 4.4-beta1 -->
<httpclient.version>4.5.3</httpclient.version> <!-- 4.3.6 --> <!-- 4.4-beta1 -->
<!-- maven plugins -->
<cargo-maven2-plugin.version>1.6.1</cargo-maven2-plugin.version>

View File

@ -33,7 +33,7 @@ import org.junit.Test;
* NOTE : Need module spring-rest to be running
*/
public class HttpClientPostingLiveTest {
private static final String SAMPLE_URL = "http://localhost:8080/spring-rest/users";
private static final String SAMPLE_URL = "http://localhost:8082/spring-rest/users";
private static final String URL_SECURED_BY_BASIC_AUTHENTICATION = "http://browserspy.dk/password-ok.php";
private static final String DEFAULT_USER = "test";
private static final String DEFAULT_PASS = "test";

View File

@ -115,7 +115,7 @@
<org.springframework.version>4.3.4.RELEASE</org.springframework.version>
<org.springframework.data.version>1.9.6.RELEASE</org.springframework.data.version>
<org.springframework.data.version>1.10.4.RELEASE</org.springframework.data.version>
<rest-assured.version>2.9.0</rest-assured.version>
<querydsl.version>4.1.4</querydsl.version>

View File

@ -3,6 +3,7 @@ package org.baeldung.event;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoOperations;
import org.springframework.data.mongodb.core.mapping.event.AbstractMongoEventListener;
import org.springframework.data.mongodb.core.mapping.event.BeforeConvertEvent;
import org.springframework.util.ReflectionUtils;
public class CascadeSaveMongoEventListener extends AbstractMongoEventListener<Object> {
@ -11,7 +12,8 @@ public class CascadeSaveMongoEventListener extends AbstractMongoEventListener<Ob
private MongoOperations mongoOperations;
@Override
public void onBeforeConvert(final Object source) {
public void onBeforeConvert(final BeforeConvertEvent<Object> event) {
final Object source = event.getSource();
ReflectionUtils.doWithFields(source.getClass(), new CascadeCallback(source, mongoOperations));
}
}

View File

@ -4,14 +4,16 @@ import org.baeldung.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoOperations;
import org.springframework.data.mongodb.core.mapping.event.AbstractMongoEventListener;
import org.springframework.data.mongodb.core.mapping.event.BeforeConvertEvent;
public class UserCascadeSaveMongoEventListener extends AbstractMongoEventListener<Object> {
@Autowired
private MongoOperations mongoOperations;
@Override
public void onBeforeConvert(final Object source) {
if (source instanceof User && ((User) source).getEmailAddress() != null) {
public void onBeforeConvert(final BeforeConvertEvent<Object> event) {
final Object source = event.getSource();
if ((source instanceof User) && (((User) source).getEmailAddress() != null)) {
mongoOperations.save(((User) source).getEmailAddress());
}
}

View File

@ -307,7 +307,7 @@
<rest-assured.version>2.9.0</rest-assured.version>
<!-- swagger -->
<springfox-swagger.version>2.6.1</springfox-swagger.version>
<springfox-swagger.version>2.7.0</springfox-swagger.version>
<httpcore.version>4.4.5</httpcore.version>
<httpclient.version>4.5.2</httpclient.version>