Skip to content

Commit

Permalink
Upgrade to SB
Browse files Browse the repository at this point in the history
  • Loading branch information
rajadilipkolli committed Dec 8, 2024
1 parent 7429864 commit 5d0f110
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 30 deletions.
2 changes: 1 addition & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:

postgresqldb:
image: postgres:16.4-alpine
image: postgres:17.2-alpine
hostname: postgresqldb
container_name: postgresqldb
extra_hosts: [ 'host.docker.internal:host-gateway' ]
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ jacoco_min_coverage_required=0.84

spring_boot_version=3.4.0
spring_dependency_management_version=1.1.6
springdoc_openapi_version=2.6.0
springdoc_openapi_version=2.7.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.learning.mfscreener.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestClient;

@Configuration(proxyBeanMethods = false)
public class RestClientConfiguration {

@Bean
RestClient restClient(RestClient.Builder restClientBuilder) {
return restClientBuilder.build();
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@

import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Configuration;
import org.springframework.lang.NonNull;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration(proxyBeanMethods = false)
@EnableCaching
public class WebMvcConfig implements WebMvcConfigurer {

private final ApplicationProperties applicationProperties;

public WebMvcConfig(ApplicationProperties applicationProperties) {
this.applicationProperties = applicationProperties;
}

@Override
public void addCorsMappings(CorsRegistry registry) {
public void addCorsMappings(@NonNull CorsRegistry registry) {
ApplicationProperties.Cors propertiesCors = applicationProperties.getCors();
registry.addMapping(propertiesCors.getPathPattern())
.allowedMethods(propertiesCors.getAllowedMethods())
Expand Down
5 changes: 5 additions & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,8 @@ org.jobrunr.miscellaneous.allow-anonymous-data-usage=false
org.jobrunr.jobs.metrics.enabled=true
org.jobrunr.database.type=sql
org.jobrunr.database.datasource=jobrunrDataSource

# HttpClient
spring.http.client.factory=jdk
spring.http.client.read-timeout=PT1M
spring.http.client.connect-timeout=PT30S
2 changes: 1 addition & 1 deletion src/test/java/com/learning/mfscreener/TestApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
public class TestApplication {

public static void main(String[] args) {
System.setProperty("spring.profiles.active", AppConstants.PROFILE_TEST);
SpringApplication.from(Application::main)
.with(NonSQLContainersConfig.class, SQLContainersConfig.class)
.withAdditionalProfiles(AppConstants.PROFILE_TEST)
.run(args);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ public class SQLContainersConfig {
@ServiceConnection
@RestartScope
PostgreSQLContainer<?> postgreSQLContainer() {
return new PostgreSQLContainer<>(DockerImageName.parse("postgres").withTag("16.4-alpine"));
return new PostgreSQLContainer<>(DockerImageName.parse("postgres").withTag("17.2-alpine"));
}
}

0 comments on commit 5d0f110

Please sign in to comment.