This is an automated email from the ASF dual-hosted git repository. acosentino 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 2c415cc [create-pull-request] automated change 2c415cc is described below commit 2c415cca1f0ccd9d77060906110beaed2992d1c6 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> AuthorDate: Fri Oct 8 00:58:22 2021 +0000 [create-pull-request] automated change --- .../apache/camel/springboot/catalog/components/jpa.json | 1 + .../camel-jpa-starter/src/main/docs/jpa-starter.adoc | 3 ++- .../jpa/springboot/JpaComponentConfiguration.java | 14 ++++++++++++++ .../modules/spring-boot/partials/jpa-starter.adoc | 3 ++- tooling/camel-spring-boot-dependencies/pom.xml | 2 +- 5 files changed, 20 insertions(+), 3 deletions(-) diff --git a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/jpa.json b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/jpa.json index 67779ca..e3c8be4 100644 --- a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/jpa.json +++ b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/jpa.json @@ -22,6 +22,7 @@ "lenientProperties": false }, "componentProperties": { + "aliases": { "kind": "property", "displayName": "Aliases", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Class<java.lang.Object>>", "deprecated": false, "autowired": false, "secret": false, "description": "Maps an alias to a JPA entity class. The alias can then be used in the endpoint URI (instead of the fully qualified class name)." }, "entityManagerFactory": { "kind": "property", "displayName": "Entity Manager Factory", "group": "common", "label": "", "required": false, "type": "object", "javaType": "javax.persistence.EntityManagerFactory", "deprecated": false, "autowired": false, "secret": false, "description": "To use the EntityManagerFactory. This is strongly recommended to configure." }, "joinTransaction": { "kind": "property", "displayName": "Join Transaction", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "The camel-jpa component will join transaction by default. You can use this option to turn this off, for example if you use LOCAL_RESOURCE and join transaction doesn't work with your JPA provider. This option can also be set [...] "sharedEntityManager": { "kind": "property", "displayName": "Shared Entity Manager", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to use Spring's SharedEntityManager for the consumer\/producer. Note in most cases joinTransaction should be set to false as this is not an EXTENDED EntityManager." }, diff --git a/components-starter/camel-jpa-starter/src/main/docs/jpa-starter.adoc b/components-starter/camel-jpa-starter/src/main/docs/jpa-starter.adoc index 1f5a1a4..e94a676 100644 --- a/components-starter/camel-jpa-starter/src/main/docs/jpa-starter.adoc +++ b/components-starter/camel-jpa-starter/src/main/docs/jpa-starter.adoc @@ -17,13 +17,14 @@ When using jpa with Spring Boot make sure to use the following Maven dependency ---- -The component supports 8 options, which are listed below. +The component supports 9 options, which are listed below. [width="100%",cols="2,5,^1,2",options="header"] |=== | Name | Description | Default | Type +| *camel.component.jpa.aliases* | Maps an alias to a JPA entity class. The alias can then be used in the endpoint URI (instead of the fully qualified class name). | | Map | *camel.component.jpa.autowired-enabled* | 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 then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | Boolean | *camel.component.jpa.bridge-error-handler* | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | Boolean | *camel.component.jpa.enabled* | Whether to enable auto configuration of the jpa component. This is enabled by default. | | Boolean diff --git a/components-starter/camel-jpa-starter/src/main/java/org/apache/camel/component/jpa/springboot/JpaComponentConfiguration.java b/components-starter/camel-jpa-starter/src/main/java/org/apache/camel/component/jpa/springboot/JpaComponentConfiguration.java index d0a86a0..1307de8 100644 --- a/components-starter/camel-jpa-starter/src/main/java/org/apache/camel/component/jpa/springboot/JpaComponentConfiguration.java +++ b/components-starter/camel-jpa-starter/src/main/java/org/apache/camel/component/jpa/springboot/JpaComponentConfiguration.java @@ -16,6 +16,7 @@ */ package org.apache.camel.component.jpa.springboot; +import java.util.Map; import javax.annotation.Generated; import javax.persistence.EntityManagerFactory; import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon; @@ -40,6 +41,11 @@ public class JpaComponentConfiguration */ private Boolean enabled; /** + * Maps an alias to a JPA entity class. The alias can then be used in the + * endpoint URI (instead of the fully qualified class name). + */ + private Map<String, Class<Object>> aliases; + /** * To use the EntityManagerFactory. This is strongly recommended to * configure. The option is a javax.persistence.EntityManagerFactory type. */ @@ -94,6 +100,14 @@ public class JpaComponentConfiguration */ private Boolean autowiredEnabled = true; + public Map<String, Class<Object>> getAliases() { + return aliases; + } + + public void setAliases(Map<String, Class<Object>> aliases) { + this.aliases = aliases; + } + public EntityManagerFactory getEntityManagerFactory() { return entityManagerFactory; } diff --git a/docs/components/modules/spring-boot/partials/jpa-starter.adoc b/docs/components/modules/spring-boot/partials/jpa-starter.adoc index 1f5a1a4..e94a676 100644 --- a/docs/components/modules/spring-boot/partials/jpa-starter.adoc +++ b/docs/components/modules/spring-boot/partials/jpa-starter.adoc @@ -17,13 +17,14 @@ When using jpa with Spring Boot make sure to use the following Maven dependency ---- -The component supports 8 options, which are listed below. +The component supports 9 options, which are listed below. [width="100%",cols="2,5,^1,2",options="header"] |=== | Name | Description | Default | Type +| *camel.component.jpa.aliases* | Maps an alias to a JPA entity class. The alias can then be used in the endpoint URI (instead of the fully qualified class name). | | Map | *camel.component.jpa.autowired-enabled* | 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 then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | Boolean | *camel.component.jpa.bridge-error-handler* | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | Boolean | *camel.component.jpa.enabled* | Whether to enable auto configuration of the jpa component. This is enabled by default. | | Boolean diff --git a/tooling/camel-spring-boot-dependencies/pom.xml b/tooling/camel-spring-boot-dependencies/pom.xml index d49c7ed..ebdc37f 100644 --- a/tooling/camel-spring-boot-dependencies/pom.xml +++ b/tooling/camel-spring-boot-dependencies/pom.xml @@ -398,7 +398,7 @@ <dependency> <groupId>net.sf.saxon</groupId> <artifactId>Saxon-HE</artifactId> - <version>9.9.1-7</version> + <version>9.9.1-8</version> </dependency> <dependency> <groupId>ognl</groupId>