From 41f76d135f0e407c46cb494acca7380fbd9476b8 Mon Sep 17 00:00:00 2001 From: Raja Kolli Date: Thu, 16 Nov 2023 03:03:16 +0000 Subject: [PATCH] fix : spotless format issue --- boot-rabbitmq-thymeleaf/pom.xml | 98 +++++++++---------- .../ultimateredis/config/CacheConfig.java | 3 +- .../proxy/config/RestClientConfiguration.java | 3 +- .../readreplica/config/DatabaseConfig.java | 3 +- .../PrimaryDataSourceConfiguration.java | 8 +- .../SecondaryDataSourceConfiguration.java | 8 +- .../multitenant/MultiDatasourceConfig.java | 6 +- .../multitenant/TenantRoutingDatasource.java | 22 ----- .../multitenant/MultiDatasourceConfig.java | 6 +- .../multitenant/TenantRoutingDatasource.java | 22 ----- pom.xml | 4 +- 11 files changed, 68 insertions(+), 115 deletions(-) diff --git a/boot-rabbitmq-thymeleaf/pom.xml b/boot-rabbitmq-thymeleaf/pom.xml index 050e86212..809d8ab50 100644 --- a/boot-rabbitmq-thymeleaf/pom.xml +++ b/boot-rabbitmq-thymeleaf/pom.xml @@ -30,54 +30,54 @@ ${jacoco.itReportFolder}/integrationTest.exec ${project.testresult.directory}/test ${project.testresult.directory}/integrationTest - - - - - org.springframework.boot - spring-boot-starter-actuator - - - org.springframework.boot - spring-boot-starter-amqp - - - org.springframework.boot - spring-boot-starter-thymeleaf - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-data-jpa - - - org.liquibase - liquibase-core - - - - com.h2database - h2 - runtime - - - org.springframework.boot - spring-boot-devtools - runtime - true - - - - org.webjars - webjars-locator-core - - - org.glassfish.jaxb - jaxb-runtime - provided + + + + + org.springframework.boot + spring-boot-starter-actuator + + + org.springframework.boot + spring-boot-starter-amqp + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-data-jpa + + + org.liquibase + liquibase-core + + + + com.h2database + h2 + runtime + + + org.springframework.boot + spring-boot-devtools + runtime + true + + + + org.webjars + webjars-locator-core + + + org.glassfish.jaxb + jaxb-runtime + provided org.webjars @@ -262,7 +262,7 @@ - 1.17.0 + 1.18.1 diff --git a/boot-ultimate-redis/src/main/java/com/example/ultimateredis/config/CacheConfig.java b/boot-ultimate-redis/src/main/java/com/example/ultimateredis/config/CacheConfig.java index 7f8b29190..ec6d93553 100644 --- a/boot-ultimate-redis/src/main/java/com/example/ultimateredis/config/CacheConfig.java +++ b/boot-ultimate-redis/src/main/java/com/example/ultimateredis/config/CacheConfig.java @@ -42,8 +42,7 @@ RedisCacheConfiguration defaultCacheConfig() { } @Bean - LettuceConnectionFactory redisConnectionFactory( - CacheConfigurationProperties properties) { + LettuceConnectionFactory redisConnectionFactory(CacheConfigurationProperties properties) { log.info( "Redis (/Lettuce) configuration enabled. With cache timeout " + properties.getTimeoutSeconds() diff --git a/httpClients/boot-http-proxy/src/main/java/com/example/rest/proxy/config/RestClientConfiguration.java b/httpClients/boot-http-proxy/src/main/java/com/example/rest/proxy/config/RestClientConfiguration.java index fe552d20b..cf239180a 100644 --- a/httpClients/boot-http-proxy/src/main/java/com/example/rest/proxy/config/RestClientConfiguration.java +++ b/httpClients/boot-http-proxy/src/main/java/com/example/rest/proxy/config/RestClientConfiguration.java @@ -31,8 +31,7 @@ HttpServiceProxyFactory httpServiceProxyFactory( } @Bean - JsonPlaceholderService jsonPlaceholderService( - HttpServiceProxyFactory httpServiceProxyFactory) { + JsonPlaceholderService jsonPlaceholderService(HttpServiceProxyFactory httpServiceProxyFactory) { return httpServiceProxyFactory.createClient(JsonPlaceholderService.class); } } diff --git a/jpa/boot-read-replica-postgresql/src/main/java/com/example/demo/readreplica/config/DatabaseConfig.java b/jpa/boot-read-replica-postgresql/src/main/java/com/example/demo/readreplica/config/DatabaseConfig.java index 1c80c3a6b..4cb27911d 100644 --- a/jpa/boot-read-replica-postgresql/src/main/java/com/example/demo/readreplica/config/DatabaseConfig.java +++ b/jpa/boot-read-replica-postgresql/src/main/java/com/example/demo/readreplica/config/DatabaseConfig.java @@ -49,8 +49,7 @@ DataSource replicaDataSource(final DataSourceProperties replicaDataSourcePropert @Bean @Primary - DataSource dataSource( - final DataSource primaryDataSource, final DataSource replicaDataSource) { + DataSource dataSource(final DataSource primaryDataSource, final DataSource replicaDataSource) { final RoutingDataSource routingDataSource = new RoutingDataSource(); final Map targetDataSources = new HashMap<>(); diff --git a/jpa/multitenancy/multidatasource-multitenancy/src/main/java/com/example/multitenancy/config/multidatasource/PrimaryDataSourceConfiguration.java b/jpa/multitenancy/multidatasource-multitenancy/src/main/java/com/example/multitenancy/config/multidatasource/PrimaryDataSourceConfiguration.java index 4d8d379b6..71cba6c6e 100644 --- a/jpa/multitenancy/multidatasource-multitenancy/src/main/java/com/example/multitenancy/config/multidatasource/PrimaryDataSourceConfiguration.java +++ b/jpa/multitenancy/multidatasource-multitenancy/src/main/java/com/example/multitenancy/config/multidatasource/PrimaryDataSourceConfiguration.java @@ -37,9 +37,9 @@ LocalContainerEntityManagerFactoryBean primaryEntityManagerFactory( EntityManagerFactoryBuilder builder, @Qualifier("tenantRoutingDatasource") DataSource tenantRoutingDatasource, @Qualifier("multiTenantConnectionProviderImpl") - MultiTenantConnectionProvider multiTenantConnectionProvider, + MultiTenantConnectionProvider multiTenantConnectionProvider, @Qualifier("tenantIdentifierResolver") - CurrentTenantIdentifierResolver currentTenantIdentifierResolver) { + CurrentTenantIdentifierResolver currentTenantIdentifierResolver) { Map hibernateProps = new HashMap<>(); hibernateProps.put( AvailableSettings.MULTI_TENANT_CONNECTION_PROVIDER, multiTenantConnectionProvider); @@ -59,8 +59,8 @@ LocalContainerEntityManagerFactoryBean primaryEntityManagerFactory( @Bean PlatformTransactionManager primaryTransactionManager( - final @Qualifier("primaryEntityManagerFactory") LocalContainerEntityManagerFactoryBean - primaryEntityManagerFactory) { + final @Qualifier("primaryEntityManagerFactory") LocalContainerEntityManagerFactoryBean + primaryEntityManagerFactory) { return new JpaTransactionManager( Objects.requireNonNull(primaryEntityManagerFactory.getObject())); } diff --git a/jpa/multitenancy/multidatasource-multitenancy/src/main/java/com/example/multitenancy/config/multidatasource/SecondaryDataSourceConfiguration.java b/jpa/multitenancy/multidatasource-multitenancy/src/main/java/com/example/multitenancy/config/multidatasource/SecondaryDataSourceConfiguration.java index 1c5ba333b..47d26ec80 100644 --- a/jpa/multitenancy/multidatasource-multitenancy/src/main/java/com/example/multitenancy/config/multidatasource/SecondaryDataSourceConfiguration.java +++ b/jpa/multitenancy/multidatasource-multitenancy/src/main/java/com/example/multitenancy/config/multidatasource/SecondaryDataSourceConfiguration.java @@ -37,9 +37,9 @@ LocalContainerEntityManagerFactoryBean secondaryEntityManagerFactory( EntityManagerFactoryBuilder builder, @Qualifier("tenantRoutingDatasource") DataSource tenantRoutingDatasource, @Qualifier("multiTenantConnectionProviderImpl") - MultiTenantConnectionProvider multiTenantConnectionProvider, + MultiTenantConnectionProvider multiTenantConnectionProvider, @Qualifier("tenantIdentifierResolver") - CurrentTenantIdentifierResolver currentTenantIdentifierResolver) { + CurrentTenantIdentifierResolver currentTenantIdentifierResolver) { Map hibernateProps = new HashMap<>(); hibernateProps.put( AvailableSettings.MULTI_TENANT_CONNECTION_PROVIDER, multiTenantConnectionProvider); @@ -59,8 +59,8 @@ LocalContainerEntityManagerFactoryBean secondaryEntityManagerFactory( @Bean PlatformTransactionManager secondaryTransactionManager( - final @Qualifier("secondaryEntityManagerFactory") LocalContainerEntityManagerFactoryBean - secondaryEntityManagerFactory) { + final @Qualifier("secondaryEntityManagerFactory") LocalContainerEntityManagerFactoryBean + secondaryEntityManagerFactory) { return new JpaTransactionManager( Objects.requireNonNull(secondaryEntityManagerFactory.getObject())); } diff --git a/jpa/multitenancy/multidatasource-multitenancy/src/main/java/com/example/multitenancy/config/multitenant/MultiDatasourceConfig.java b/jpa/multitenancy/multidatasource-multitenancy/src/main/java/com/example/multitenancy/config/multitenant/MultiDatasourceConfig.java index 6a03a790c..e78fbf255 100644 --- a/jpa/multitenancy/multidatasource-multitenancy/src/main/java/com/example/multitenancy/config/multitenant/MultiDatasourceConfig.java +++ b/jpa/multitenancy/multidatasource-multitenancy/src/main/java/com/example/multitenancy/config/multitenant/MultiDatasourceConfig.java @@ -41,7 +41,7 @@ LiquibaseProperties primaryLiquibaseProperties() { SpringLiquibase primaryLiquibase( @Qualifier("primaryDataSource") DataSource primaryDataSource, @Qualifier("primaryLiquibaseProperties") - LiquibaseProperties primaryLiquibaseProperties) { + LiquibaseProperties primaryLiquibaseProperties) { return springLiquibase(primaryDataSource, primaryLiquibaseProperties); } @@ -55,7 +55,7 @@ DataSourceProperties secondaryDataSourceProperties() { @ConfigurationProperties("datasource.secondary.hikari") DataSource secondaryDataSource( @Qualifier("secondaryDataSourceProperties") - DataSourceProperties secondaryDataSourceProperties) { + DataSourceProperties secondaryDataSourceProperties) { return secondaryDataSourceProperties.initializeDataSourceBuilder().build(); } @@ -69,7 +69,7 @@ LiquibaseProperties secondaryLiquibaseProperties() { SpringLiquibase secondaryLiquibase( @Qualifier("secondaryDataSource") DataSource secondaryDataSource, @Qualifier("secondaryLiquibaseProperties") - LiquibaseProperties secondaryLiquibaseProperties) { + LiquibaseProperties secondaryLiquibaseProperties) { return springLiquibase(secondaryDataSource, secondaryLiquibaseProperties); } diff --git a/jpa/multitenancy/multidatasource-multitenancy/src/main/java/com/example/multitenancy/config/multitenant/TenantRoutingDatasource.java b/jpa/multitenancy/multidatasource-multitenancy/src/main/java/com/example/multitenancy/config/multitenant/TenantRoutingDatasource.java index d5e0c5af1..25ac7d469 100644 --- a/jpa/multitenancy/multidatasource-multitenancy/src/main/java/com/example/multitenancy/config/multitenant/TenantRoutingDatasource.java +++ b/jpa/multitenancy/multidatasource-multitenancy/src/main/java/com/example/multitenancy/config/multitenant/TenantRoutingDatasource.java @@ -35,26 +35,4 @@ public class TenantRoutingDatasource extends AbstractRoutingDataSource { protected String determineCurrentLookupKey() { return tenantIdentifierResolver.resolveCurrentTenantIdentifier(); } - - public boolean isWrapperFor(Class iface) throws java.sql.SQLException { - // TODO Auto-generated method stub - return iface != null && iface.isAssignableFrom(this.getClass()); - } - - public T unwrap(Class iface) throws java.sql.SQLException { - // TODO Auto-generated method stub - try { - if (iface != null && iface.isAssignableFrom(this.getClass())) { - return (T) this; - } - throw new java.sql.SQLException("Auto-generated unwrap failed; Revisit implementation"); - } catch (Exception e) { - throw new java.sql.SQLException(e); - } - } - - public java.util.logging.Logger getParentLogger() { - // TODO Auto-generated method stub - return null; - } } diff --git a/jpa/multitenancy/multitenancy-db/src/main/java/com/example/multitenancy/db/config/multitenant/MultiDatasourceConfig.java b/jpa/multitenancy/multitenancy-db/src/main/java/com/example/multitenancy/db/config/multitenant/MultiDatasourceConfig.java index 723689497..2dba1b7a4 100644 --- a/jpa/multitenancy/multitenancy-db/src/main/java/com/example/multitenancy/db/config/multitenant/MultiDatasourceConfig.java +++ b/jpa/multitenancy/multitenancy-db/src/main/java/com/example/multitenancy/db/config/multitenant/MultiDatasourceConfig.java @@ -41,7 +41,7 @@ LiquibaseProperties primaryLiquibaseProperties() { SpringLiquibase primaryLiquibase( @Qualifier("primaryDataSource") DataSource primaryDataSource, @Qualifier("primaryLiquibaseProperties") - LiquibaseProperties primaryLiquibaseProperties) { + LiquibaseProperties primaryLiquibaseProperties) { return springLiquibase(primaryDataSource, primaryLiquibaseProperties); } @@ -55,7 +55,7 @@ DataSourceProperties secondaryDataSourceProperties() { @ConfigurationProperties("datasource.secondary.hikari") DataSource secondaryDataSource( @Qualifier("secondaryDataSourceProperties") - DataSourceProperties secondaryDataSourceProperties) { + DataSourceProperties secondaryDataSourceProperties) { return secondaryDataSourceProperties.initializeDataSourceBuilder().build(); } @@ -69,7 +69,7 @@ LiquibaseProperties secondaryLiquibaseProperties() { SpringLiquibase secondaryLiquibase( @Qualifier("secondaryDataSource") DataSource secondaryDataSource, @Qualifier("secondaryLiquibaseProperties") - LiquibaseProperties secondaryLiquibaseProperties) { + LiquibaseProperties secondaryLiquibaseProperties) { return springLiquibase(secondaryDataSource, secondaryLiquibaseProperties); } diff --git a/jpa/multitenancy/multitenancy-db/src/main/java/com/example/multitenancy/db/config/multitenant/TenantRoutingDatasource.java b/jpa/multitenancy/multitenancy-db/src/main/java/com/example/multitenancy/db/config/multitenant/TenantRoutingDatasource.java index a257c0228..7f38a1d15 100644 --- a/jpa/multitenancy/multitenancy-db/src/main/java/com/example/multitenancy/db/config/multitenant/TenantRoutingDatasource.java +++ b/jpa/multitenancy/multitenancy-db/src/main/java/com/example/multitenancy/db/config/multitenant/TenantRoutingDatasource.java @@ -29,26 +29,4 @@ public class TenantRoutingDatasource extends AbstractRoutingDataSource { protected String determineCurrentLookupKey() { return tenantIdentifierResolver.resolveCurrentTenantIdentifier(); } - - public boolean isWrapperFor(Class iface) throws java.sql.SQLException { - // TODO Auto-generated method stub - return iface != null && iface.isAssignableFrom(this.getClass()); - } - - public T unwrap(Class iface) throws java.sql.SQLException { - // TODO Auto-generated method stub - try { - if (iface != null && iface.isAssignableFrom(this.getClass())) { - return (T) this; - } - throw new java.sql.SQLException("Auto-generated unwrap failed; Revisit implementation"); - } catch (Exception e) { - throw new java.sql.SQLException(e); - } - } - - public java.util.logging.Logger getParentLogger() { - // TODO Auto-generated method stub - return null; - } } diff --git a/pom.xml b/pom.xml index be96fd2a3..6305e813a 100644 --- a/pom.xml +++ b/pom.xml @@ -44,10 +44,10 @@ jpa/multitenancy/schema r2dbc/boot-jooq-r2dbc-sample r2dbc/boot-r2dbc-sample - open-api-spring-boot - jmh-benchmark scheduler/boot-jobrunr-sample scheduler/boot-scheduler-quartz + open-api-spring-boot + jmh-benchmark