JAVA-31190: Preparation for migrating spring-boot-modules to version 3. (#15834)

This commit is contained in:
Harry9656
2024-02-27 02:49:02 +01:00
committed by GitHub
parent 74da22b9c4
commit aefd833c3b
190 changed files with 1052 additions and 832 deletions
@@ -1,9 +1,9 @@
package com.baeldung.nopropertyfound.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
@Entity
public class Person {
@@ -5,7 +5,7 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Profile;
import javax.annotation.PostConstruct;
import jakarta.annotation.PostConstruct;
@SpringBootApplication
@Profile("aws")
@@ -1,9 +1,9 @@
package com.baeldung.startdbwithawssecretsmanager.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
@Entity
public class UserEntity {
@@ -2,7 +2,7 @@ spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/myDb
spring.datasource.username=root
spring.datasource.password=root
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
spring.jpa.hibernate.ddl-auto=none
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults=false
@@ -1,13 +1,11 @@
package com.baeldung.startwithoutdb;
import javax.sql.DataSource;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.ApplicationContext;
import org.springframework.test.context.junit4.SpringRunner;
import javax.sql.DataSource;
@SpringBootTest(classes = StartWithoutDbApplication.class)
class StartWithoutDbIntegrationTest {
@@ -16,7 +14,7 @@ class StartWithoutDbIntegrationTest {
private ApplicationContext context;
@Test
public void givenAutoConfigDisabled_whenStarting_thenNoAutoconfiguredBeansInContext() {
void givenAutoConfigDisabled_whenStarting_thenNoAutoconfiguredBeansInContext() {
context.getBean(DataSource.class);
}