From 7a4d13228e3865ce1475d883e31a7991b041ae67 Mon Sep 17 00:00:00 2001 From: Glenn Renfro Date: Wed, 30 Oct 2024 11:54:31 -0400 Subject: [PATCH] Remove deprecations from AppRegistryController The original issue states to remove deprecated functions. However, this would remove some of SCDF's default behavior when registering applications. In that it can look the suffix of the URL to obtain the version. The original Issues for the PR that put in the deprecations just wanted to give the user the ability to override the version. Also deprecated the use of bootVersion when registering an app. Resolves #6011 Signed-off-by: Glenn Renfro --- .../dataflow/server/controller/AppRegistryController.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/AppRegistryController.java b/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/AppRegistryController.java index 01790a4531..5775973e2f 100644 --- a/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/AppRegistryController.java +++ b/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/AppRegistryController.java @@ -170,7 +170,6 @@ public DetailedAppRegistrationResource info(@PathVariable ApplicationType type, return getInfo(type, name, version, exhaustive); } - @Deprecated @GetMapping("/{type}/{name}") @ResponseStatus(HttpStatus.OK) public DetailedAppRegistrationResource info( @@ -224,7 +223,7 @@ else if (entry.getKey().equals("outbound")) { * @param type module type * @param name module name * @param version module version - * @param bootVersion module boot version or {@code null} to use the default + * @param bootVersion module boot version or {@code null} to use the default. Deprecated: bootVersion is no longer needed when registering an app. * @param uri URI for the module artifact (e.g. {@literal maven://group:artifact:version}) * @param metadataUri URI for the metadata artifact * @param force if {@code true}, overwrites a pre-existing registration @@ -235,7 +234,7 @@ public void register( @PathVariable ApplicationType type, @PathVariable String name, @PathVariable String version, - @RequestParam(required = false) String bootVersion, + @RequestParam(required = false) @Deprecated String bootVersion, @RequestParam String uri, @RequestParam(name = "metadata-uri", required = false) String metadataUri, @RequestParam(defaultValue = "false") boolean force) { @@ -260,7 +259,6 @@ public void register( } } - @Deprecated @PostMapping("/{type}/{name}") @ResponseStatus(HttpStatus.CREATED) public void register( @@ -375,7 +373,6 @@ private String findStreamContainingAppOf(ApplicationType appType, String appName return null; } - @Deprecated @DeleteMapping("/{type}/{name}") @ResponseStatus(HttpStatus.OK) public void unregister(@PathVariable ApplicationType type, @PathVariable String name) {