Migration to Spring Boot 2.7.10 (#1320)

* Initial commit
* Fix compile breaks
* Fix hibernate config
* Fix hibernate config
* Fix failing tests
* Improve logging
* Improve logging
* Fix Sonar issues
* Remove BusProperties
* Add BusProperties bean back in
* Fix JPA workaround
* Fix CVE-2021-22044
* Fix test failures
* Fix PR review findings
* Fix CVEs
* Remove H2 version downgrade, fix schema migration, enable legacy mode
* Downgrade Vaadin back to 8.14.3
* Fix EventPublisherHolder
* Fix RemoteTenantAwareEvent
* Fixed EventPublisherAutoConfiguration
* New version of spring-hateoas requires links to be expanded (Mgmt API)
* New version of spring-hateoas requires links to be expanded (Mgmt API)
* Fix PR review findings
* Fix PR review findings
* Fix PR review findings
* Update README.md
* MariaDB Java Client downgrade to maintain compatibility with AWS Aurora
* Temporarily disable RSQL test that depends on DB collation type
* Upgrade to boot 2.7.10
* Upgrade snakeyaml to 1.33
* Upgrade Spring Security OAuth2 to version 5.7.7
* Remove obsolete exclusion of junit-vintage-engine
* Upgrade jackson-bom to 2.14.2
This commit is contained in:
Stefan Behl
2023-03-28 07:16:25 +02:00
committed by GitHub
parent f21925d59b
commit 4a3a79aa6b
71 changed files with 741 additions and 593 deletions

View File

@@ -104,7 +104,7 @@ public final class DataConversionHelper {
new SoftwareData(artifact.getSoftwareModule().getId(), artifact.getFilename(), artifact.getId(),
artifact.getSha1Hash())),
ApiType.DDI, request.getURI())
.forEach(entry -> file.add(new Link(entry.getRef()).withRel(entry.getRel())));
.forEach(entry -> file.add(Link.of(entry.getRef()).withRel(entry.getRel()).expand()));
return file;
@@ -118,19 +118,19 @@ public final class DataConversionHelper {
confirmationBase.add(WebMvcLinkBuilder
.linkTo(WebMvcLinkBuilder.methodOn(DdiRootController.class, tenantAware.getCurrentTenant())
.deactivateAutoConfirmation(tenantAware.getCurrentTenant(), controllerId))
.withRel(DdiRestConstants.AUTO_CONFIRM_DEACTIVATE));
.withRel(DdiRestConstants.AUTO_CONFIRM_DEACTIVATE).expand());
} else {
confirmationBase.add(WebMvcLinkBuilder
.linkTo(WebMvcLinkBuilder.methodOn(DdiRootController.class, tenantAware.getCurrentTenant())
.activateAutoConfirmation(tenantAware.getCurrentTenant(), controllerId, null))
.withRel(DdiRestConstants.AUTO_CONFIRM_ACTIVATE));
.withRel(DdiRestConstants.AUTO_CONFIRM_ACTIVATE).expand());
}
if (activeAction != null && activeAction.isWaitingConfirmation()) {
confirmationBase.add(WebMvcLinkBuilder
.linkTo(WebMvcLinkBuilder.methodOn(DdiRootController.class, tenantAware.getCurrentTenant())
.getConfirmationBaseAction(tenantAware.getCurrentTenant(), controllerId,
activeAction.getId(), calculateEtag(activeAction), null))
.withRel(DdiRestConstants.CONFIRMATION_BASE));
.withRel(DdiRestConstants.CONFIRMATION_BASE).expand());
}
return confirmationBase;
@@ -147,14 +147,14 @@ public final class DataConversionHelper {
.methodOn(DdiRootController.class, tenantAware.getCurrentTenant())
.getConfirmationBaseAction(tenantAware.getCurrentTenant(), target.getControllerId(),
activeAction.getId(), calculateEtag(activeAction), null))
.withRel(DdiRestConstants.CONFIRMATION_BASE));
.withRel(DdiRestConstants.CONFIRMATION_BASE).expand());
} else if (activeAction.isCancelingOrCanceled()) {
result.add(WebMvcLinkBuilder
.linkTo(WebMvcLinkBuilder.methodOn(DdiRootController.class, tenantAware.getCurrentTenant())
.getControllerCancelAction(tenantAware.getCurrentTenant(), target.getControllerId(),
activeAction.getId()))
.withRel(DdiRestConstants.CANCEL_ACTION));
.withRel(DdiRestConstants.CANCEL_ACTION).expand());
} else {
// we need to add the hashcode here of the actionWithStatus
// because the action might
@@ -165,7 +165,7 @@ public final class DataConversionHelper {
.methodOn(DdiRootController.class, tenantAware.getCurrentTenant())
.getControllerBasedeploymentAction(tenantAware.getCurrentTenant(), target.getControllerId(),
activeAction.getId(), calculateEtag(activeAction), null))
.withRel(DdiRestConstants.DEPLOYMENT_BASE_ACTION));
.withRel(DdiRestConstants.DEPLOYMENT_BASE_ACTION).expand());
}
}
@@ -175,14 +175,14 @@ public final class DataConversionHelper {
.linkTo(WebMvcLinkBuilder.methodOn(DdiRootController.class, tenantAware.getCurrentTenant())
.getControllerInstalledAction(tenantAware.getCurrentTenant(),
target.getControllerId(), installedAction.getId(), null))
.withRel(DdiRestConstants.INSTALLED_BASE_ACTION));
.withRel(DdiRestConstants.INSTALLED_BASE_ACTION).expand());
}
if (target.isRequestControllerAttributes()) {
result.add(WebMvcLinkBuilder
.linkTo(WebMvcLinkBuilder.methodOn(DdiRootController.class, tenantAware.getCurrentTenant())
.putConfigData(null, tenantAware.getCurrentTenant(), target.getControllerId()))
.withRel(DdiRestConstants.CONFIG_DATA_ACTION));
.withRel(DdiRestConstants.CONFIG_DATA_ACTION).expand());
}
return result;

View File

@@ -82,6 +82,7 @@ import org.springframework.http.server.ServletServerHttpRequest;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.context.WebApplicationContext;
@@ -210,7 +211,7 @@ public class DdiRootController implements DdiRootControllerRestApi {
(length, shippedSinceLastEvent,
total) -> eventPublisher.publishEvent(new DownloadProgressEvent(
tenantAware.getCurrentTenant(), statusId, shippedSinceLastEvent,
serviceMatcher != null ? serviceMatcher.getServiceId() : bus.getId())));
serviceMatcher != null ? serviceMatcher.getBusId() : bus.getId())));
}
}

View File

@@ -738,9 +738,9 @@ public class DdiDeploymentBaseTest extends AbstractDDiApiIntegrationTest {
}
private static class ActionStatusCondition extends Condition<ActionStatus> {
private final Status status;
private final Action.Status status;
public ActionStatusCondition(final Status status) {
public ActionStatusCondition(final Action.Status status) {
this.status = status;
}