* [#1383] Spring Boot 3 migration Step 2 Some of the steps: 1. Change spring version parent and versions in root pom.xml 2. update eclipselink versions 3. javax.annotation -> jakarta.annotation (*.java) 4. javax.persistence -> jakarta.persistence (*.java) 5. javax.servlet -> jakarta.servlet (*.java, pom.xml) 6. javax.validation:validation-api -> jakarta.validation:jakarta.validation-api (pom.xml) 7. javax.validation -> jakarta.validation (*.java) 8. javax.transaction -> jakarta.transaction (*.java) 9. replace spring-cloud-stream-binder-test (hawkbit-repository-test) with ``` <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-stream-test-binder</artifactId> </dependency> ``` , TestSupportBinderAutoConfiguration.class }) -> }) @Import(TestChannelBinderConfiguration.class) 10. Set to Simple UI standard parent 11. requestMatchers to securityMatcher 12. @SpringBootApplication(scanBasePackages = "org.eclipse.hawkbit") (otherwise for instance flyway doesn't work - suffix is default ".sql", not H2.sql and don't differentiate dbs? strange is there a change?) 13. @NonEmpty for Long leads to validation exception - replaced with @NotNull 14. RSQLUtilityTest.correctRsqlBuildsPredicate - fixed - mock query builder add method 15. https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#spring-mvc-and-webflux-url-matching-changes - aliases as targers/ return 404 - remove trailing slash 16. firewall tests (allowedHostNameWithNotAllowedHost) doesn't throw 'rejected exception' but return 400 instead (as probably is expected anyway) Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com * Fix tenant listing to do not mix with multitenancy Tenant metadata is not multitenancy aware while depend on distribution set type which is. Thus querying all tenant metadata (in non tenant context) sometimes leads to resolution of distribution set type which is tenant scoped and leads to problems. So, now listing tenant lists just their ids - not fill entities. Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com> --------- Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
hawkBit DDI Server (EXPERIMENTAL!)
The hawkBit DDI Server is a standalone spring-boot application with an embedded servlet container. It should be started with at least hawkbit-mgmt-server.
On your own workstation
Run
java -jar hawkbit-runtime/hawkbit-ddi-server/target/hawkbit-ddi-server-*-SNAPSHOT.jar
(Note: you have to add the JDBC driver also to your class path if you intend to use another database than H2.)
Or:
run org.eclipse.hawkbit.app.ddi.DDIStart
Usage
The Management API can be accessed via http://localhost:8081/rest/v1 The root url http://localhost:8081 will redirect directly to the Swagger Management UI
Clustering (Experimental!!!)
The micro-service instances are configured to communicate via Spring Cloud Bus. You could run multiple instances of any micro-service but hawkbit-mgmt-server. Management server run some schedulers which shall not run simultaneously - e.g. auto assignment checker and rollouts executor. To run multiple management server instances you shall do some extensions of hawkbit to ensure that they wont run schedulers simultaneously or you shall configure all instances but one to do not run schedulers!
Optional Protostuff for Sprign cloud bus
The micro-service instances are configured to communicate via Spring Cloud Bus. Optionally, you could use Protostuff based message payload serialization for improved performance.
Note: If Protostuff is enabled it shall be enabled on all microservices!
Add/Uncomment to/in your application.properties :
spring.cloud.stream.bindings.springCloudBusInput.content-type=application/binary+protostuff
spring.cloud.stream.bindings.springCloudBusOutput.content-type=application/binary+protostuff
Add to your pom.xml :
<dependency>
<groupId>io.protostuff</groupId>
<artifactId>protostuff-core</artifactId>
</dependency>
<dependency>
<groupId>io.protostuff</groupId>
<artifactId>protostuff-runtime</artifactId>
</dependency>