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> <wiremock.version>2.5.1</wiremock.version>
<httpcore.version>4.4.5</httpcore.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 --> <!-- maven plugins -->
<cargo-maven2-plugin.version>1.6.1</cargo-maven2-plugin.version> <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 * NOTE : Need module spring-rest to be running
*/ */
public class HttpClientPostingLiveTest { 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 URL_SECURED_BY_BASIC_AUTHENTICATION = "http://browserspy.dk/password-ok.php";
private static final String DEFAULT_USER = "test"; private static final String DEFAULT_USER = "test";
private static final String DEFAULT_PASS = "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.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> <rest-assured.version>2.9.0</rest-assured.version>
<querydsl.version>4.1.4</querydsl.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.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoOperations; import org.springframework.data.mongodb.core.MongoOperations;
import org.springframework.data.mongodb.core.mapping.event.AbstractMongoEventListener; import org.springframework.data.mongodb.core.mapping.event.AbstractMongoEventListener;
import org.springframework.data.mongodb.core.mapping.event.BeforeConvertEvent;
import org.springframework.util.ReflectionUtils; import org.springframework.util.ReflectionUtils;
public class CascadeSaveMongoEventListener extends AbstractMongoEventListener<Object> { public class CascadeSaveMongoEventListener extends AbstractMongoEventListener<Object> {
@ -11,7 +12,8 @@ public class CascadeSaveMongoEventListener extends AbstractMongoEventListener<Ob
private MongoOperations mongoOperations; private MongoOperations mongoOperations;
@Override @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)); 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.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoOperations; import org.springframework.data.mongodb.core.MongoOperations;
import org.springframework.data.mongodb.core.mapping.event.AbstractMongoEventListener; import org.springframework.data.mongodb.core.mapping.event.AbstractMongoEventListener;
import org.springframework.data.mongodb.core.mapping.event.BeforeConvertEvent;
public class UserCascadeSaveMongoEventListener extends AbstractMongoEventListener<Object> { public class UserCascadeSaveMongoEventListener extends AbstractMongoEventListener<Object> {
@Autowired @Autowired
private MongoOperations mongoOperations; private MongoOperations mongoOperations;
@Override @Override
public void onBeforeConvert(final Object source) { public void onBeforeConvert(final BeforeConvertEvent<Object> event) {
if (source instanceof User && ((User) source).getEmailAddress() != null) { final Object source = event.getSource();
if ((source instanceof User) && (((User) source).getEmailAddress() != null)) {
mongoOperations.save(((User) source).getEmailAddress()); mongoOperations.save(((User) source).getEmailAddress());
} }
} }

View File

@ -307,7 +307,7 @@
<rest-assured.version>2.9.0</rest-assured.version> <rest-assured.version>2.9.0</rest-assured.version>
<!-- swagger --> <!-- 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> <httpcore.version>4.4.5</httpcore.version>
<httpclient.version>4.5.2</httpclient.version> <httpclient.version>4.5.2</httpclient.version>