This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git


The following commit(s) were added to refs/heads/main by this push:
     new 81a03f838c7 CAMEL-19090: Remove deprecated apis in core
81a03f838c7 is described below

commit 81a03f838c72482f2aa833dda3e498663a89f69e
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Sat Feb 25 12:22:02 2023 +0100

    CAMEL-19090: Remove deprecated apis in core
---
 .../camel/springboot/catalog/components/bean.json      |  2 --
 .../camel/springboot/catalog/components/class.json     |  2 --
 .../camel-bean-starter/src/main/docs/bean.json         | 18 ------------------
 .../bean/springboot/BeanComponentConfiguration.java    | 17 -----------------
 .../springboot/ClassComponentConfiguration.java        | 17 -----------------
 .../boot/CamelSpringBootApplicationListener.java       |  6 +++---
 .../myconverter/StaticDummyFallbackConverter.java      |  3 +--
 tooling/camel-spring-boot-dependencies/pom.xml         | 10 ++++++++++
 8 files changed, 14 insertions(+), 61 deletions(-)

diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/bean.json
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/bean.json
index f75c9989777..8538030ca6e 100644
--- 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/bean.json
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/bean.json
@@ -22,7 +22,6 @@
     "lenientProperties": false
   },
   "componentProperties": {
-    "cache": { "kind": "property", "displayName": "Cache", "group": 
"producer", "label": "", "required": false, "type": "boolean", "javaType": 
"java.lang.Boolean", "deprecated": true, "autowired": false, "secret": false, 
"defaultValue": "true", "description": "Use singleton option instead." },
     "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start 
Producer", "group": "producer", "label": "producer", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "description": "Whether the producer 
should be started lazy (on the first message). By starting lazy you can use 
this to allow CamelContext and routes to startup in situations where a producer 
may otherwise fail during star [...]
     "scope": { "kind": "property", "displayName": "Scope", "group": 
"producer", "label": "", "required": false, "type": "object", "javaType": 
"org.apache.camel.BeanScope", "enum": [ "Singleton", "Request", "Prototype" ], 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 
"Singleton", "description": "Scope of bean. When using singleton scope 
(default) the bean is created or looked up only once and reused for the 
lifetime of the endpoint. The bean should be thread-sa [...]
     "autowiredEnabled": { "kind": "property", "displayName": "Autowired 
Enabled", "group": "advanced", "label": "advanced", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": true, "description": "Whether autowiring is 
enabled. This is used for automatic autowiring options (the option must be 
marked as autowired) by looking up in the registry to find if there is a single 
instance of matching type, which t [...]
@@ -32,7 +31,6 @@
   },
   "properties": {
     "beanName": { "kind": "path", "displayName": "Bean Name", "group": 
"common", "label": "common", "required": true, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": 
false, "secret": false, "description": "Sets the name of the bean to invoke" },
-    "cache": { "kind": "parameter", "displayName": "Cache", "group": "common", 
"label": "common", "required": false, "type": "boolean", "javaType": 
"java.lang.Boolean", "deprecated": true, "autowired": false, "secret": false, 
"description": "Use scope option instead." },
     "method": { "kind": "parameter", "displayName": "Method", "group": 
"common", "label": "common", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"description": "Sets the name of the method to invoke on the bean" },
     "scope": { "kind": "parameter", "displayName": "Scope", "group": "common", 
"label": "common", "required": false, "type": "object", "javaType": 
"org.apache.camel.BeanScope", "enum": [ "Singleton", "Request", "Prototype" ], 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 
"Singleton", "description": "Scope of bean. When using singleton scope 
(default) the bean is created or looked up only once and reused for the 
lifetime of the endpoint. The bean should be thre [...]
     "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start 
Producer", "group": "producer (advanced)", "label": "producer,advanced", 
"required": false, "type": "boolean", "javaType": "boolean", "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": false, 
"description": "Whether the producer should be started lazy (on the first 
message). By starting lazy you can use this to allow CamelContext and routes to 
startup in situations where a producer may other [...]
diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/class.json
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/class.json
index b9a35b463fb..61840df51bf 100644
--- 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/class.json
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/class.json
@@ -22,7 +22,6 @@
     "lenientProperties": false
   },
   "componentProperties": {
-    "cache": { "kind": "property", "displayName": "Cache", "group": 
"producer", "label": "", "required": false, "type": "boolean", "javaType": 
"java.lang.Boolean", "deprecated": true, "autowired": false, "secret": false, 
"defaultValue": "true", "description": "Use singleton option instead." },
     "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start 
Producer", "group": "producer", "label": "producer", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "description": "Whether the producer 
should be started lazy (on the first message). By starting lazy you can use 
this to allow CamelContext and routes to startup in situations where a producer 
may otherwise fail during star [...]
     "scope": { "kind": "property", "displayName": "Scope", "group": 
"producer", "label": "", "required": false, "type": "object", "javaType": 
"org.apache.camel.BeanScope", "enum": [ "Singleton", "Request", "Prototype" ], 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 
"Singleton", "description": "Scope of bean. When using singleton scope 
(default) the bean is created or looked up only once and reused for the 
lifetime of the endpoint. The bean should be thread-sa [...]
     "autowiredEnabled": { "kind": "property", "displayName": "Autowired 
Enabled", "group": "advanced", "label": "advanced", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": true, "description": "Whether autowiring is 
enabled. This is used for automatic autowiring options (the option must be 
marked as autowired) by looking up in the registry to find if there is a single 
instance of matching type, which t [...]
@@ -32,7 +31,6 @@
   },
   "properties": {
     "beanName": { "kind": "path", "displayName": "Bean Name", "group": 
"common", "label": "common", "required": true, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": 
false, "secret": false, "description": "Sets the name of the bean to invoke" },
-    "cache": { "kind": "parameter", "displayName": "Cache", "group": "common", 
"label": "common", "required": false, "type": "boolean", "javaType": 
"java.lang.Boolean", "deprecated": true, "autowired": false, "secret": false, 
"description": "Use scope option instead." },
     "method": { "kind": "parameter", "displayName": "Method", "group": 
"common", "label": "common", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"description": "Sets the name of the method to invoke on the bean" },
     "scope": { "kind": "parameter", "displayName": "Scope", "group": "common", 
"label": "common", "required": false, "type": "object", "javaType": 
"org.apache.camel.BeanScope", "enum": [ "Singleton", "Request", "Prototype" ], 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 
"Singleton", "description": "Scope of bean. When using singleton scope 
(default) the bean is created or looked up only once and reused for the 
lifetime of the endpoint. The bean should be thre [...]
     "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start 
Producer", "group": "producer (advanced)", "label": "producer,advanced", 
"required": false, "type": "boolean", "javaType": "boolean", "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": false, 
"description": "Whether the producer should be started lazy (on the first 
message). By starting lazy you can use this to allow CamelContext and routes to 
startup in situations where a producer may other [...]
diff --git a/components-starter/camel-bean-starter/src/main/docs/bean.json 
b/components-starter/camel-bean-starter/src/main/docs/bean.json
index 61cd01a45ef..3bf79f6f899 100644
--- a/components-starter/camel-bean-starter/src/main/docs/bean.json
+++ b/components-starter/camel-bean-starter/src/main/docs/bean.json
@@ -121,24 +121,6 @@
       "description": "Whether to trim the value to remove leading and trailing 
whitespaces and line breaks",
       "sourceType": 
"org.apache.camel.language.bean.springboot.BeanLanguageConfiguration",
       "defaultValue": true
-    },
-    {
-      "name": "camel.component.bean.cache",
-      "type": "java.lang.Boolean",
-      "description": "Use singleton option instead.",
-      "sourceType": 
"org.apache.camel.component.bean.springboot.BeanComponentConfiguration",
-      "defaultValue": true,
-      "deprecated": true,
-      "deprecation": {}
-    },
-    {
-      "name": "camel.component.class.cache",
-      "type": "java.lang.Boolean",
-      "description": "Use singleton option instead.",
-      "sourceType": 
"org.apache.camel.component.beanclass.springboot.ClassComponentConfiguration",
-      "defaultValue": true,
-      "deprecated": true,
-      "deprecation": {}
     }
   ],
   "hints": []
diff --git 
a/components-starter/camel-bean-starter/src/main/java/org/apache/camel/component/bean/springboot/BeanComponentConfiguration.java
 
b/components-starter/camel-bean-starter/src/main/java/org/apache/camel/component/bean/springboot/BeanComponentConfiguration.java
index e39260a657c..9b3ff4f7905 100644
--- 
a/components-starter/camel-bean-starter/src/main/java/org/apache/camel/component/bean/springboot/BeanComponentConfiguration.java
+++ 
b/components-starter/camel-bean-starter/src/main/java/org/apache/camel/component/bean/springboot/BeanComponentConfiguration.java
@@ -20,7 +20,6 @@ import org.apache.camel.BeanScope;
 import org.apache.camel.component.bean.BeanComponent;
 import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
-import 
org.springframework.boot.context.properties.DeprecatedConfigurationProperty;
 
 /**
  * Invoke methods of Java beans stored in Camel registry.
@@ -37,11 +36,6 @@ public class BeanComponentConfiguration
      * enabled by default.
      */
     private Boolean enabled;
-    /**
-     * Use singleton option instead.
-     */
-    @Deprecated
-    private Boolean cache = true;
     /**
      * Whether the producer should be started lazy (on the first message). By
      * starting lazy you can use this to allow CamelContext and routes to
@@ -79,17 +73,6 @@ public class BeanComponentConfiguration
      */
     private Boolean autowiredEnabled = true;
 
-    @Deprecated
-    @DeprecatedConfigurationProperty
-    public Boolean getCache() {
-        return cache;
-    }
-
-    @Deprecated
-    public void setCache(Boolean cache) {
-        this.cache = cache;
-    }
-
     public Boolean getLazyStartProducer() {
         return lazyStartProducer;
     }
diff --git 
a/components-starter/camel-bean-starter/src/main/java/org/apache/camel/component/beanclass/springboot/ClassComponentConfiguration.java
 
b/components-starter/camel-bean-starter/src/main/java/org/apache/camel/component/beanclass/springboot/ClassComponentConfiguration.java
index fd39440e2b2..f89c817bc3a 100644
--- 
a/components-starter/camel-bean-starter/src/main/java/org/apache/camel/component/beanclass/springboot/ClassComponentConfiguration.java
+++ 
b/components-starter/camel-bean-starter/src/main/java/org/apache/camel/component/beanclass/springboot/ClassComponentConfiguration.java
@@ -20,7 +20,6 @@ import org.apache.camel.BeanScope;
 import org.apache.camel.component.beanclass.ClassComponent;
 import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
-import 
org.springframework.boot.context.properties.DeprecatedConfigurationProperty;
 
 /**
  * Invoke methods of Java beans specified by class name.
@@ -37,11 +36,6 @@ public class ClassComponentConfiguration
      * enabled by default.
      */
     private Boolean enabled;
-    /**
-     * Use singleton option instead.
-     */
-    @Deprecated
-    private Boolean cache = true;
     /**
      * Whether the producer should be started lazy (on the first message). By
      * starting lazy you can use this to allow CamelContext and routes to
@@ -79,17 +73,6 @@ public class ClassComponentConfiguration
      */
     private Boolean autowiredEnabled = true;
 
-    @Deprecated
-    @DeprecatedConfigurationProperty
-    public Boolean getCache() {
-        return cache;
-    }
-
-    @Deprecated
-    public void setCache(Boolean cache) {
-        this.cache = cache;
-    }
-
     public Boolean getLazyStartProducer() {
         return lazyStartProducer;
     }
diff --git 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelSpringBootApplicationListener.java
 
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelSpringBootApplicationListener.java
index f563cb1b646..0befad2cf72 100644
--- 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelSpringBootApplicationListener.java
+++ 
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelSpringBootApplicationListener.java
@@ -260,7 +260,7 @@ public class CamelSpringBootApplicationListener implements 
ApplicationListener<C
         final ScheduledFuture<?> future = executorService.schedule(task, 
seconds, TimeUnit.SECONDS);
         camelContext.addLifecycleStrategy(new LifecycleStrategySupport() {
             @Override
-            public void onContextStop(CamelContext context) {
+            public void onContextStopping(CamelContext context) {
                 // we are stopping then cancel the task so we can shutdown 
quicker
                 if (!running.get()) {
                     future.cancel(true);
@@ -291,7 +291,7 @@ public class CamelSpringBootApplicationListener implements 
ApplicationListener<C
         final ScheduledFuture<?> future = executorService.schedule(task, 
seconds, TimeUnit.SECONDS);
         camelContext.addLifecycleStrategy(new LifecycleStrategySupport() {
             @Override
-            public void onContextStop(CamelContext context) {
+            public void onContextStopping(CamelContext context) {
                 // we are stopping then cancel the task so we can shutdown 
quicker
                 if (!running.get()) {
                     future.cancel(true);
@@ -322,7 +322,7 @@ public class CamelSpringBootApplicationListener implements 
ApplicationListener<C
         final Future<?> future = executorService.submit(task);
         camelContext.addLifecycleStrategy(new LifecycleStrategySupport() {
             @Override
-            public void onContextStop(CamelContext context) {
+            public void onContextStopping(CamelContext context) {
                 // we are stopping then cancel the task so we can shutdown 
quicker
                 if (!running.get()) {
                     future.cancel(true);
diff --git 
a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/converter/myconverter/StaticDummyFallbackConverter.java
 
b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/converter/myconverter/StaticDummyFallbackConverter.java
index c6f9ddd7dca..9f02afd21e9 100644
--- 
a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/converter/myconverter/StaticDummyFallbackConverter.java
+++ 
b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/converter/myconverter/StaticDummyFallbackConverter.java
@@ -20,7 +20,6 @@ import java.util.TimeZone;
 
 import org.apache.camel.Converter;
 import org.apache.camel.Exchange;
-import org.apache.camel.FallbackConverter;
 import org.apache.camel.spi.TypeConverterRegistry;
 
 
@@ -33,7 +32,7 @@ public final class StaticDummyFallbackConverter {
     private StaticDummyFallbackConverter() {
     }
 
-    @FallbackConverter
+    @Converter(fallback = true)
     public static Object convertTo(Class<?> type, Exchange exchange, Object 
value, TypeConverterRegistry registry) {
         if (TimeZone.class.isAssignableFrom(value.getClass())) {
             return "Time talks";
diff --git a/tooling/camel-spring-boot-dependencies/pom.xml 
b/tooling/camel-spring-boot-dependencies/pom.xml
index b15939a9fd7..4a5a7b2daea 100644
--- a/tooling/camel-spring-boot-dependencies/pom.xml
+++ b/tooling/camel-spring-boot-dependencies/pom.xml
@@ -2347,6 +2347,16 @@
         <artifactId>camel-debug</artifactId>
         <version>4.0.0-SNAPSHOT</version>
       </dependency>
+      <dependency>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>camel-dhis2</artifactId>
+        <version>4.0.0-SNAPSHOT</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>camel-dhis2-api</artifactId>
+        <version>4.0.0-SNAPSHOT</version>
+      </dependency>
       <dependency>
         <groupId>org.apache.camel</groupId>
         <artifactId>camel-digitalocean</artifactId>

Reply via email to