Merge pull request #8487 from kwoyke/BAEL-20663

BAEL-20663: Upgrade to the latest Spring Boot 2.2.2 version
This commit is contained in:
Loredana Crusoveanu 2020-01-26 11:30:59 +02:00 committed by GitHub
commit e71cc54b37
18 changed files with 41 additions and 18 deletions

View File

@ -79,7 +79,7 @@
<rest-assured.version>3.3.0</rest-assured.version>
<!-- plugins -->
<thin.version>1.0.22.RELEASE</thin.version>
<spring-boot.version>2.1.9.RELEASE</spring-boot.version>
<spring-boot.version>2.2.2.RELEASE</spring-boot.version>
</properties>
</project>

View File

@ -266,7 +266,7 @@ public class UserRepositoryCommon {
userRepository.save(new User(USER_NAME_PETER, LocalDate.now(), USER_EMAIL2, ACTIVE_STATUS));
userRepository.save(new User("SAMPLE", LocalDate.now(), USER_EMAIL3, INACTIVE_STATUS));
List<User> usersSortByName = userRepository.findAll(new Sort(Sort.Direction.ASC, "name"));
List<User> usersSortByName = userRepository.findAll(Sort.by(Sort.Direction.ASC, "name"));
assertThat(usersSortByName.get(0)
.getName()).isEqualTo(USER_NAME_ADAM);
@ -278,7 +278,7 @@ public class UserRepositoryCommon {
userRepository.save(new User(USER_NAME_PETER, LocalDate.now(), USER_EMAIL2, ACTIVE_STATUS));
userRepository.save(new User("SAMPLE", LocalDate.now(), USER_EMAIL3, INACTIVE_STATUS));
userRepository.findAll(new Sort(Sort.Direction.ASC, "name"));
userRepository.findAll(Sort.by(Sort.Direction.ASC, "name"));
List<User> usersSortByNameLength = userRepository.findAll(Sort.by("LENGTH(name)"));

View File

@ -266,7 +266,7 @@ public class UserRepositoryCommon {
userRepository.save(new User(USER_NAME_PETER, LocalDate.now(), USER_EMAIL2, ACTIVE_STATUS));
userRepository.save(new User("SAMPLE", LocalDate.now(), USER_EMAIL3, INACTIVE_STATUS));
List<User> usersSortByName = userRepository.findAll(new Sort(Sort.Direction.ASC, "name"));
List<User> usersSortByName = userRepository.findAll(Sort.by(Sort.Direction.ASC, "name"));
assertThat(usersSortByName.get(0)
.getName()).isEqualTo(USER_NAME_ADAM);
@ -278,7 +278,7 @@ public class UserRepositoryCommon {
userRepository.save(new User(USER_NAME_PETER, LocalDate.now(), USER_EMAIL2, ACTIVE_STATUS));
userRepository.save(new User("SAMPLE", LocalDate.now(), USER_EMAIL3, INACTIVE_STATUS));
userRepository.findAll(new Sort(Sort.Direction.ASC, "name"));
userRepository.findAll(Sort.by(Sort.Direction.ASC, "name"));
List<User> usersSortByNameLength = userRepository.findAll(Sort.by("LENGTH(name)"));

View File

@ -49,7 +49,7 @@ public class EmployeeServicesWithKeyValueTemplate implements EmployeeService {
@Override
public Iterable<Employee> getSortedListOfEmployeesBySalary() {
KeyValueQuery query = new KeyValueQuery();
query.setSort(new Sort(Sort.Direction.DESC, "salary"));
query.setSort(Sort.by(Sort.Direction.DESC, "salary"));
return keyValueTemplate.find(query, Employee.class);
}

View File

@ -101,6 +101,7 @@
<nosqlunit.version>0.10.0</nosqlunit.version>
<spring-data-commons.version>2.0.3.RELEASE</spring-data-commons.version>
<embedded-redis.version>0.6</embedded-redis.version>
<spring-boot.version>2.1.9.RELEASE</spring-boot.version>
</properties>
</project>

View File

@ -149,6 +149,7 @@
</build>
<properties>
<spring-boot.version>2.1.9.RELEASE</spring-boot.version>
<geronimo-json_1.1_spec.version>1.0</geronimo-json_1.1_spec.version>
<asciidoctor-plugin.version>1.5.6</asciidoctor-plugin.version>
<commons-collections4.version>4.1</commons-collections4.version>

View File

@ -19,4 +19,8 @@
<module>spring-boot-admin-client</module>
</modules>
<properties>
<spring-boot.version>2.1.9.RELEASE</spring-boot.version>
</properties>
</project>

View File

@ -15,7 +15,7 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import com.baeldung.springbootmvc.config.CustomMessageSourceConfiguration;
@RunWith(SpringRunner.class)
@WebMvcTest(value = LoginController.class, secure = false)
@WebMvcTest(value = LoginController.class)
@ContextConfiguration(classes = { SpringBootMvcApplication.class, CustomMessageSourceConfiguration.class })
public class LoginControllerUnitTest {

View File

@ -95,6 +95,7 @@
<guava.version>27.0.1-jre</guava.version>
<xstream.version>1.4.11.1</xstream.version>
<modelmapper.version>2.3.5</modelmapper.version>
<spring-boot.version>2.1.9.RELEASE</spring-boot.version>
</properties>
</project>

View File

@ -22,12 +22,12 @@
<dependency>
<groupId>org.springframework.security.oauth</groupId>
<artifactId>spring-security-oauth2</artifactId>
<version>2.3.3.RELEASE</version>
<version>2.4.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.security.oauth.boot</groupId>
<artifactId>spring-security-oauth2-autoconfigure</artifactId>
<version>2.1.2.RELEASE</version>
<version>2.2.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
@ -64,7 +64,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>2.1.1.RELEASE</version>
<!-- <version>2.1.1.RELEASE</version>-->
</dependency>
</dependencies>

View File

@ -17,6 +17,7 @@
</parent>
<properties>
<!-- <spring-boot.version>2.1.9.RELEASE</spring-boot.version>-->
<java.version>1.8</java.version>
</properties>
@ -36,12 +37,23 @@
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-core</artifactId>
<version>1.1.45</version>
<version>1.1.49</version>
<exclusions>
<exclusion>
<groupId>io.github.classgraph</groupId>
<artifactId>classgraph</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>1.1.45</version>
<version>1.1.49</version>
</dependency>
<dependency>
<groupId>io.github.classgraph</groupId>
<artifactId>classgraph</artifactId>
<version>4.8.44</version>
</dependency>
</dependencies>
@ -62,7 +74,7 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.1.8.RELEASE</version>
<version>2.2.2.RELEASE</version>
<executions>
<execution>
<id>pre-integration-test</id>

View File

@ -132,6 +132,7 @@
<spock.version>1.2-groovy-2.4</spock.version>
<gmavenplus-plugin.version>1.6</gmavenplus-plugin.version>
<redis.version>0.7.2</redis.version>
<spring-boot.version>2.1.9.RELEASE</spring-boot.version>
</properties>
</project>

View File

@ -89,7 +89,7 @@
</build>
<properties>
<spring-cloud-dependencies.version>Finchley.SR2</spring-cloud-dependencies.version>
<spring-cloud-dependencies.version>Hoxton.SR1</spring-cloud-dependencies.version>
<spring.cloud.k8s.version>1.0.0.RELEASE</spring.cloud.k8s.version>
</properties>

View File

@ -203,7 +203,7 @@
<properties>
<start-class>com.baeldung.sample.App</start-class>
<!-- Spring -->
<org.springframework.version>5.0.6.RELEASE</org.springframework.version>
<org.springframework.version>5.2.2.RELEASE</org.springframework.version>
<annotation-api.version>1.3.2</annotation-api.version>
<!-- persistence -->
<hibernate.version>5.2.5.Final</hibernate.version>

View File

@ -194,6 +194,7 @@
<sql-maven-plugin.version>1.5</sql-maven-plugin.version>
<properties-maven-plugin.version>1.0.0</properties-maven-plugin.version>
<start-class>org.jooq.example.spring.Application</start-class>
<spring-boot.version>2.1.9.RELEASE</spring-boot.version>
</properties>
</project>

View File

@ -223,6 +223,8 @@
</profiles>
<properties>
<spring-boot.version>2.1.9.RELEASE</spring-boot.version>
<thymeleaf.version>3.0.9.RELEASE</thymeleaf.version>
<!-- persistence -->

View File

@ -15,7 +15,7 @@ public class StudentServiceImpl implements StudentService {
@Override
public Page<Student> findPaginated(int page, int size) {
return dao.findAll(new PageRequest(page, size));
return dao.findAll(PageRequest.of(page, size));
}
}

View File

@ -82,7 +82,7 @@ public class SpringDataWithSecurityIntegrationTest {
.setAuthentication(auth);
Page<Tweet> page = null;
do {
page = tweetRepository.getMyTweetsAndTheOnesILiked(new PageRequest(page != null ? page.getNumber() + 1 : 0, 5));
page = tweetRepository.getMyTweetsAndTheOnesILiked(PageRequest.of(page != null ? page.getNumber() + 1 : 0, 5));
for (Tweet twt : page.getContent()) {
isTrue((twt.getOwner() == appUser.getUsername()) || (twt.getLikes()
.contains(appUser.getUsername())), "I do not have any Tweets");
@ -94,7 +94,7 @@ public class SpringDataWithSecurityIntegrationTest {
public void givenNoAppUser_whenPaginatedResultsRetrievalAttempted_shouldFail() {
Page<Tweet> page = null;
do {
page = tweetRepository.getMyTweetsAndTheOnesILiked(new PageRequest(page != null ? page.getNumber() + 1 : 0, 5));
page = tweetRepository.getMyTweetsAndTheOnesILiked(PageRequest.of(page != null ? page.getNumber() + 1 : 0, 5));
} while (page != null && page.hasNext());
}
}