Upgrade to Spring Boot 2.6.0-M3.

This commit is contained in:
Christoph Strobl
2021-10-01 12:27:32 +02:00
committed by Greg L. Turnquist
parent fc8cdbe864
commit a171e33444
19 changed files with 53 additions and 33 deletions

View File

@@ -1,2 +1,3 @@
# Random port for embedded MongoDB
spring.data.mongodb.port=0
spring.mongodb.embedded.version=3.6.0

View File

@@ -0,0 +1,3 @@
# Random port for embedded MongoDB
spring.data.mongodb.port=0
spring.mongodb.embedded.version=3.6.0

View File

@@ -1,2 +1,3 @@
# Random port for embedded MongoDB
spring.data.mongodb.port=0
spring.mongodb.embedded.version=3.6.0

View File

@@ -0,0 +1,3 @@
# Random port for embedded MongoDB
spring.data.mongodb.port=0
spring.mongodb.embedded.version=3.6.0

View File

@@ -0,0 +1,3 @@
# Random port for embedded MongoDB
spring.data.mongodb.port=0
spring.mongodb.embedded.version=3.6.0

View File

@@ -0,0 +1,3 @@
# Random port for embedded MongoDB
spring.data.mongodb.port=0
spring.mongodb.embedded.version=3.6.0

View File

@@ -0,0 +1,3 @@
# Random port for embedded MongoDB
spring.data.mongodb.port=0
spring.mongodb.embedded.version=3.6.0

View File

@@ -1,2 +1,3 @@
# Random port for embedded MongoDB
spring.data.mongodb.port=0
spring.mongodb.embedded.version=3.6.0

View File

@@ -0,0 +1,3 @@
# Random port for embedded MongoDB
spring.data.mongodb.port=0
spring.mongodb.embedded.version=3.6.0

View File

@@ -0,0 +1,3 @@
# Random port for embedded MongoDB
spring.data.mongodb.port=0
spring.mongodb.embedded.version=3.6.0

View File

@@ -1,2 +1,3 @@
# Random port for embedded MongoDB
spring.data.mongodb.port=0
spring.mongodb.embedded.version=3.6.0

View File

@@ -1 +1,2 @@
logging.level.example.springdata=INFO
spring.mongodb.embedded.version=3.6.0

16
pom.xml
View File

@@ -13,7 +13,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.4</version>
<version>2.6.0-M3</version>
</parent>
<modules>
@@ -67,32 +67,32 @@
<developer>
<id>odrotbohm</id>
<name>Oliver Drotbohm</name>
<email>odrotbohm@pivotal.io</email>
<email>odrotbohm@vmware.com</email>
</developer>
<developer>
<id>tdarimont</id>
<name>Thomas Darimont</name>
<email>tdarimont@gopivotal.io</email>
<email>tdarimont@vmware.com</email>
</developer>
<developer>
<id>cstrobl</id>
<name>Christoph Strobl</name>
<email>cstrobl@pivotal.io</email>
<email>cstrobl@vmware.com</email>
</developer>
<developer>
<id>gturnquist</id>
<name>Greg Turnquist</name>
<email>gturnquist@pivotal.io</email>
<email>gturnquist@vmware.com</email>
</developer>
<developer>
<id>mpaluch</id>
<name>Mark Paluch</name>
<email>mpaluch@pivotal.io</email>
<email>mpaluch@vmware.com</email>
</developer>
<developer>
<id>jschauder</id>
<name>Jens Schauder</name>
<email>jschauder@pivotal.io</email>
<email>jschauder@vmware.com</email>
</developer>
</developers>
@@ -109,7 +109,7 @@
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-keyvalue</artifactId>
<version>2.5.1-SNAPSHOT</version>
<version>2.6.0-SNAPSHOT</version>
</dependency>
<dependency>

View File

@@ -17,11 +17,9 @@ package example.springdata.redis;
import javax.annotation.PreDestroy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.data.redis.connection.ReactiveRedisConnectionFactory;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.data.redis.core.ReactiveRedisTemplate;
import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;
@@ -36,8 +34,6 @@ import org.springframework.data.redis.serializer.StringRedisSerializer;
@SpringBootApplication
public class RedisTestConfiguration {
@Autowired RedisConnectionFactory factory;
@Bean
public LettuceConnectionFactory redisConnectionFactory() {
return new LettuceConnectionFactory();
@@ -80,6 +76,6 @@ public class RedisTestConfiguration {
* Clear database before shut down.
*/
public @PreDestroy void flushTestDb() {
factory.getConnection().flushDb();
redisConnectionFactory().getConnection().flushDb();
}
}

View File

@@ -0,0 +1,3 @@
# Random port for embedded MongoDB
spring.data.mongodb.port=0
spring.mongodb.embedded.version=3.6.0

View File

@@ -1,4 +1,5 @@
# Random port for embedded MongoDB
spring.data.mongodb.port=0
spring.mongodb.embedded.version=3.6.0
# Spring Data REST
spring.data.rest.base-path=/api

View File

@@ -15,15 +15,8 @@
*/
package example;
import example.users.Password;
import example.users.UserManagement;
import example.users.Username;
import java.util.stream.IntStream;
import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
@@ -55,19 +48,6 @@ public class Application {
SpringApplication.run(Application.class, args);
}
@Autowired UserManagement userManagement;
/**
* Creates a few sample users.
*/
@PostConstruct
public void init() {
IntStream.range(0, 41).forEach(index -> {
userManagement.register(new Username("user" + index), Password.raw("foobar"));
});
}
/**
* A Spring Security {@link PasswordEncoder} to encrypt passwords for newly created users, used in
* {@link UserManagement}.

View File

@@ -16,7 +16,9 @@
package example.users;
import java.util.Optional;
import java.util.stream.IntStream;
import javax.annotation.PostConstruct;
import javax.transaction.Transactional;
import lombok.RequiredArgsConstructor;
@@ -86,4 +88,15 @@ public class UserManagement {
return repository.findByUsername(username);
}
/**
* Creates a few sample users.
*/
@PostConstruct
public void init() {
IntStream.range(0, 41).forEach(index -> {
register(new Username("user" + index), Password.raw("foobar"));
});
}
}

View File

@@ -1,2 +1,3 @@
spring.data.rest.base-path=/api
spring.data.mongodb.port=0
spring.mongodb.embedded.version=3.6.0