From 53c2adb650e26cf56c215f14a29e919199d17828 Mon Sep 17 00:00:00 2001 From: Matt Magoffin Date: Thu, 7 Dec 2023 07:34:40 +1300 Subject: [PATCH 1/3] Bump versions. --- solarnet/common-test/build.gradle | 2 +- solarnet/common/build.gradle | 2 +- solarnet/datum/build.gradle | 2 +- solarnet/dnp3/build.gradle | 2 +- solarnet/instructor/build.gradle | 2 +- solarnet/net-proxy/build.gradle | 2 +- solarnet/ocpp/build.gradle | 2 +- solarnet/oscp-fp/build.gradle | 2 +- solarnet/oscp-sim-cp/build.gradle | 2 +- solarnet/oscp/build.gradle | 2 +- solarnet/solardnp3/build.gradle | 2 +- solarnet/solarflux-vernemq-webhook/build.gradle | 3 +++ solarnet/solarin/build.gradle | 2 +- solarnet/solarjobs/build.gradle | 2 +- solarnet/solarocpp/build.gradle | 2 +- solarnet/solarquery/build.gradle | 2 +- solarnet/solaruser/build.gradle | 2 +- solarnet/user-billing/build.gradle | 2 +- solarnet/user-datum/build.gradle | 2 +- solarnet/user-dnp3/build.gradle | 2 +- solarnet/user-ocpp/build.gradle | 2 +- solarnet/user-oscp/build.gradle | 2 +- solarnet/user/build.gradle | 2 +- 23 files changed, 25 insertions(+), 22 deletions(-) diff --git a/solarnet/common-test/build.gradle b/solarnet/common-test/build.gradle index 8c3f2ca19..0bbdc7dc8 100644 --- a/solarnet/common-test/build.gradle +++ b/solarnet/common-test/build.gradle @@ -14,7 +14,7 @@ dependencyManagement { } description = 'SolarNet: Common Test' -version = '1.2.0' +version = '2.0.0' base { archivesName = 'solarnet-common-test' diff --git a/solarnet/common/build.gradle b/solarnet/common/build.gradle index f44631a11..e1d1945bc 100644 --- a/solarnet/common/build.gradle +++ b/solarnet/common/build.gradle @@ -14,7 +14,7 @@ dependencyManagement { } description = 'SolarNet: Common' -version = '1.18.0' +version = '2.0.0' base { archivesName = 'solarnet-common' diff --git a/solarnet/datum/build.gradle b/solarnet/datum/build.gradle index b58c5de67..a9adafde9 100644 --- a/solarnet/datum/build.gradle +++ b/solarnet/datum/build.gradle @@ -14,7 +14,7 @@ dependencyManagement { } description = 'SolarNet: Datum' -version = '1.16.0' +version = '2.0.0' base { archivesName = 'solarnet-datum' diff --git a/solarnet/dnp3/build.gradle b/solarnet/dnp3/build.gradle index c4ff83ba8..69331139d 100644 --- a/solarnet/dnp3/build.gradle +++ b/solarnet/dnp3/build.gradle @@ -14,7 +14,7 @@ dependencyManagement { } description = 'SolarNet: DNP3' -version = '1.0.0' +version = '2.0.0' base { archivesName = 'solarnet-dnp3' diff --git a/solarnet/instructor/build.gradle b/solarnet/instructor/build.gradle index 69b91822a..00be36595 100644 --- a/solarnet/instructor/build.gradle +++ b/solarnet/instructor/build.gradle @@ -14,7 +14,7 @@ dependencyManagement { } description = 'SolarNet: Instructor' -version = '1.5.0' +version = '2.0.0' base { archivesName = 'solarnet-instructor' diff --git a/solarnet/net-proxy/build.gradle b/solarnet/net-proxy/build.gradle index a161ef055..2e0d1b334 100644 --- a/solarnet/net-proxy/build.gradle +++ b/solarnet/net-proxy/build.gradle @@ -14,7 +14,7 @@ dependencyManagement { } description = 'SolarNet: Network Proxy' -version = '1.0.0' +version = '2.0.0' base { archivesName = 'solarnet-net-proxy' diff --git a/solarnet/ocpp/build.gradle b/solarnet/ocpp/build.gradle index 4a1ccf0b8..fab2d22e3 100644 --- a/solarnet/ocpp/build.gradle +++ b/solarnet/ocpp/build.gradle @@ -14,7 +14,7 @@ dependencyManagement { } description = 'SolarNet: OCPP' -version = '1.15.0' +version = '2.0.0' base { archivesName = 'solarnet-ocpp' diff --git a/solarnet/oscp-fp/build.gradle b/solarnet/oscp-fp/build.gradle index c841f10fd..e2d88f286 100644 --- a/solarnet/oscp-fp/build.gradle +++ b/solarnet/oscp-fp/build.gradle @@ -9,7 +9,7 @@ apply plugin: 'org.springframework.boot' apply plugin: 'io.spring.dependency-management' description = 'SolarOSCP Flexibility Provider' -version = '1.8.0' +version = '2.0.0' base { archivesName = 'solaroscp-fp' diff --git a/solarnet/oscp-sim-cp/build.gradle b/solarnet/oscp-sim-cp/build.gradle index 3134fc945..672bb2bf8 100644 --- a/solarnet/oscp-sim-cp/build.gradle +++ b/solarnet/oscp-sim-cp/build.gradle @@ -9,7 +9,7 @@ apply plugin: 'org.springframework.boot' apply plugin: 'io.spring.dependency-management' description = 'SolarOSCP Capacity Provider Simulator' -version = '1.0.0' +version = '2.0.0' base { archivesName = 'solaroscp-sim-cp' diff --git a/solarnet/oscp/build.gradle b/solarnet/oscp/build.gradle index d76b297c6..b7f52e8d9 100644 --- a/solarnet/oscp/build.gradle +++ b/solarnet/oscp/build.gradle @@ -14,7 +14,7 @@ dependencyManagement { } description = 'SolarNet: OSCP' -version = '1.8.0' +version = '2.0.0' base { archivesName = 'solarnet-oscp' diff --git a/solarnet/solardnp3/build.gradle b/solarnet/solardnp3/build.gradle index f170db0f9..40a138fa5 100644 --- a/solarnet/solardnp3/build.gradle +++ b/solarnet/solardnp3/build.gradle @@ -9,7 +9,7 @@ apply plugin: 'org.springframework.boot' apply plugin: 'io.spring.dependency-management' description = 'SolarDNP3' -version = '1.1.0' +version = '2.0.0' base { archivesName = 'solardnp3' diff --git a/solarnet/solarflux-vernemq-webhook/build.gradle b/solarnet/solarflux-vernemq-webhook/build.gradle index 20fd8ed9d..fa90d80f6 100644 --- a/solarnet/solarflux-vernemq-webhook/build.gradle +++ b/solarnet/solarflux-vernemq-webhook/build.gradle @@ -8,6 +8,9 @@ apply plugin: 'java' apply plugin: 'org.springframework.boot' apply plugin: 'io.spring.dependency-management' +description = 'SolarFlux VerneMQ Webhook' +version = '2.0.0' + configurations { all*.exclude group: 'com.amazonaws' all*.exclude group: 'com.fasterxml.jackson.datatype', module: 'jackson-datatype-joda' diff --git a/solarnet/solarin/build.gradle b/solarnet/solarin/build.gradle index f3ed220f6..c9285e078 100644 --- a/solarnet/solarin/build.gradle +++ b/solarnet/solarin/build.gradle @@ -9,7 +9,7 @@ apply plugin: 'org.springframework.boot' apply plugin: 'io.spring.dependency-management' description = 'SolarIn' -version = '1.16.1' +version = '2.0.0' base { archivesName = 'solarin' diff --git a/solarnet/solarjobs/build.gradle b/solarnet/solarjobs/build.gradle index a75f41e92..b3a17a7e1 100644 --- a/solarnet/solarjobs/build.gradle +++ b/solarnet/solarjobs/build.gradle @@ -9,7 +9,7 @@ apply plugin: 'org.springframework.boot' apply plugin: 'io.spring.dependency-management' description = 'SolarJobs' -version = '1.10.0' +version = '2.0.0' base { archivesName = 'solarjobs' diff --git a/solarnet/solarocpp/build.gradle b/solarnet/solarocpp/build.gradle index 3a110029d..9a943fd40 100644 --- a/solarnet/solarocpp/build.gradle +++ b/solarnet/solarocpp/build.gradle @@ -9,7 +9,7 @@ apply plugin: 'org.springframework.boot' apply plugin: 'io.spring.dependency-management' description = 'SolarOCPP' -version = '1.5.0' +version = '2.0.0' base { archivesName = 'solarocpp' diff --git a/solarnet/solarquery/build.gradle b/solarnet/solarquery/build.gradle index ab47f574a..8bb7e1de5 100644 --- a/solarnet/solarquery/build.gradle +++ b/solarnet/solarquery/build.gradle @@ -9,7 +9,7 @@ apply plugin: 'org.springframework.boot' apply plugin: 'io.spring.dependency-management' description = 'SolarQuery' -version = '1.11.0' +version = '2.0.0' base { archivesName = 'solarquery' diff --git a/solarnet/solaruser/build.gradle b/solarnet/solaruser/build.gradle index 7691c4bef..591027678 100644 --- a/solarnet/solaruser/build.gradle +++ b/solarnet/solaruser/build.gradle @@ -11,7 +11,7 @@ apply plugin: 'org.springframework.boot' apply plugin: 'io.spring.dependency-management' description = 'SolarUser' -version = '1.22.1' +version = '2.0.0' base { archivesName = 'solaruser' diff --git a/solarnet/user-billing/build.gradle b/solarnet/user-billing/build.gradle index 36f53c616..6d5a9aa9b 100644 --- a/solarnet/user-billing/build.gradle +++ b/solarnet/user-billing/build.gradle @@ -14,7 +14,7 @@ dependencyManagement { } description = 'SolarNet: User Billing' -version = '1.6.0' +version = '2.0.0' base { archivesName = 'solarnet-user-billing' diff --git a/solarnet/user-datum/build.gradle b/solarnet/user-datum/build.gradle index 1881226e2..500a4ee2b 100644 --- a/solarnet/user-datum/build.gradle +++ b/solarnet/user-datum/build.gradle @@ -14,7 +14,7 @@ dependencyManagement { } description = 'SolarNet: User Datum' -version = '1.4.0' +version = '2.0.0' base { archivesName = 'solarnet-user-datum' diff --git a/solarnet/user-dnp3/build.gradle b/solarnet/user-dnp3/build.gradle index 54c23dacf..1a03566eb 100644 --- a/solarnet/user-dnp3/build.gradle +++ b/solarnet/user-dnp3/build.gradle @@ -14,7 +14,7 @@ dependencyManagement { } description = 'SolarNet: User DNP3' -version = '1.1.0' +version = '2.0.0' base { archivesName = 'solarnet-user-dnp3' diff --git a/solarnet/user-ocpp/build.gradle b/solarnet/user-ocpp/build.gradle index 7b79a4ebb..7628d428c 100644 --- a/solarnet/user-ocpp/build.gradle +++ b/solarnet/user-ocpp/build.gradle @@ -14,7 +14,7 @@ dependencyManagement { } description = 'SolarNet: User OCPP' -version = '1.4.0' +version = '2.0.0' base { archivesName = 'solarnet-user-ocpp' diff --git a/solarnet/user-oscp/build.gradle b/solarnet/user-oscp/build.gradle index 0a953e9eb..0b96aa25d 100644 --- a/solarnet/user-oscp/build.gradle +++ b/solarnet/user-oscp/build.gradle @@ -14,7 +14,7 @@ dependencyManagement { } description = 'SolarNet: User OSCP' -version = '1.1.1' +version = '2.0.0' base { archivesName = 'solarnet-user-oscp' diff --git a/solarnet/user/build.gradle b/solarnet/user/build.gradle index d13459546..ba08317ee 100644 --- a/solarnet/user/build.gradle +++ b/solarnet/user/build.gradle @@ -14,7 +14,7 @@ dependencyManagement { } description = 'SolarNet: User' -version = '1.5.0' +version = '2.0.0' base { archivesName = 'solarnet-user' From 411ae6d647c7030be3853be705b37d592b8559c7 Mon Sep 17 00:00:00 2001 From: Matt Magoffin Date: Thu, 7 Dec 2023 13:34:03 +1300 Subject: [PATCH 2/3] Add missing @Controller; Spring 6 no longer registers with just a @RequestMapping. --- .../java/net/solarnetwork/central/web/PingController.java | 4 +++- .../net/solarnetwork/central/oscp/fp/config/WebConfig.java | 2 ++ .../java/net/solarnetwork/oscp/sim/cp/config/WebConfig.java | 2 ++ .../net/solarnetwork/central/dnp3/app/config/WebConfig.java | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/solarnet/common/src/main/java/net/solarnetwork/central/web/PingController.java b/solarnet/common/src/main/java/net/solarnetwork/central/web/PingController.java index 4322b93a2..54edeaa16 100644 --- a/solarnet/common/src/main/java/net/solarnetwork/central/web/PingController.java +++ b/solarnet/common/src/main/java/net/solarnetwork/central/web/PingController.java @@ -36,6 +36,7 @@ import java.util.concurrent.TimeoutException; import org.springframework.http.MediaType; import org.springframework.scheduling.concurrent.CustomizableThreadFactory; +import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @@ -51,8 +52,9 @@ * the results. * * @author matt - * @version 3.0 + * @version 3.1 */ +@Controller @RequestMapping("/ping") public class PingController { diff --git a/solarnet/oscp-fp/src/main/java/net/solarnetwork/central/oscp/fp/config/WebConfig.java b/solarnet/oscp-fp/src/main/java/net/solarnetwork/central/oscp/fp/config/WebConfig.java index 093aa6495..9232f6a83 100644 --- a/solarnet/oscp-fp/src/main/java/net/solarnetwork/central/oscp/fp/config/WebConfig.java +++ b/solarnet/oscp-fp/src/main/java/net/solarnetwork/central/oscp/fp/config/WebConfig.java @@ -29,6 +29,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; +import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.servlet.config.annotation.CorsRegistry; @@ -60,6 +61,7 @@ public PingController pingController() { return controller; } + @Controller @RequestMapping("/ping") static class SolarOscpFpPingController extends PingController { // nothing new diff --git a/solarnet/oscp-sim-cp/src/main/java/net/solarnetwork/oscp/sim/cp/config/WebConfig.java b/solarnet/oscp-sim-cp/src/main/java/net/solarnetwork/oscp/sim/cp/config/WebConfig.java index 889f41a1f..e03e9994f 100644 --- a/solarnet/oscp-sim-cp/src/main/java/net/solarnetwork/oscp/sim/cp/config/WebConfig.java +++ b/solarnet/oscp-sim-cp/src/main/java/net/solarnetwork/oscp/sim/cp/config/WebConfig.java @@ -29,6 +29,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; +import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.servlet.config.annotation.CorsRegistry; @@ -60,6 +61,7 @@ public PingController pingController() { return controller; } + @Controller @RequestMapping("/ping") static class SolarOscpSimCpPingController extends PingController { // nothing new diff --git a/solarnet/solardnp3/src/main/java/net/solarnetwork/central/dnp3/app/config/WebConfig.java b/solarnet/solardnp3/src/main/java/net/solarnetwork/central/dnp3/app/config/WebConfig.java index bb20d56f8..8585c8068 100644 --- a/solarnet/solardnp3/src/main/java/net/solarnetwork/central/dnp3/app/config/WebConfig.java +++ b/solarnet/solardnp3/src/main/java/net/solarnetwork/central/dnp3/app/config/WebConfig.java @@ -28,6 +28,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; +import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.servlet.config.annotation.CorsRegistry; @@ -56,6 +57,7 @@ public PingController pingController() { return controller; } + @Controller @RequestMapping("/ping") static class SolarDnp3PingController extends PingController { // nothing new From 51d7ae6be13bcff077ebf33b54f89c37c6e93a0b Mon Sep 17 00:00:00 2001 From: Matt Magoffin Date: Fri, 8 Dec 2023 08:56:33 +1300 Subject: [PATCH 3/3] Manually configure SourceHttpMessageConverter which is no longer automatically added in Spring 6. --- .../central/user/pki/dogtag/SSLContextFactory.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/solarnet/user/src/main/java/net/solarnetwork/central/user/pki/dogtag/SSLContextFactory.java b/solarnet/user/src/main/java/net/solarnetwork/central/user/pki/dogtag/SSLContextFactory.java index 3275ae646..10b324ff5 100644 --- a/solarnet/user/src/main/java/net/solarnetwork/central/user/pki/dogtag/SSLContextFactory.java +++ b/solarnet/user/src/main/java/net/solarnetwork/central/user/pki/dogtag/SSLContextFactory.java @@ -50,6 +50,7 @@ import org.springframework.core.io.Resource; import org.springframework.http.client.ClientHttpRequestFactory; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; +import org.springframework.http.converter.xml.SourceHttpMessageConverter; import org.springframework.web.client.RestOperations; import org.springframework.web.client.RestTemplate; import net.solarnetwork.service.CertificateException; @@ -127,6 +128,12 @@ public RestOperations createRestOps() { restTemplate.getInterceptors().add(new LoggingHttpRequestInterceptor()); } + // Spring 6 no longer includes SourceHttpMessageConverter by default, but we rely on that + if ( restTemplate.getMessageConverters().stream() + .filter(c -> c instanceof SourceHttpMessageConverter).findAny().isEmpty() ) { + restTemplate.getMessageConverters().add(0, new SourceHttpMessageConverter<>()); + } + return restTemplate; }