Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public ComponentCustomizer configureActiveMQComponent() {
return new ComponentCustomizer() {
@Override
public void configure(String name, Component target) {
CamelPropertiesHelper.copyProperties(target.getCamelContext(), configuration, target);
CamelPropertiesHelper.copyConfigurationProperties(target.getCamelContext(), applicationContext,
"camel.component.activemq", configuration, target);
}
@Override
public boolean isEnabled(String name, Component target) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import java.util.LinkedHashSet;
import java.util.Set;
import org.apache.camel.spring.boot.util.BeanReferenceHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationPropertiesBinding;
import org.springframework.context.ApplicationContext;
Expand Down Expand Up @@ -59,29 +60,6 @@ public Object convert(
Object source,
TypeDescriptor sourceType,
TypeDescriptor targetType) {
if (source == null) {
return null;
}
String ref = source.toString();
if (!ref.startsWith("#")) {
return null;
}
ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1);
switch (targetType.getName()) {
case "jakarta.jms.ConnectionFactory": return applicationContext.getBean(ref, jakarta.jms.ConnectionFactory.class);
case "org.springframework.core.task.TaskExecutor": return applicationContext.getBean(ref, org.springframework.core.task.TaskExecutor.class);
case "org.apache.camel.component.jms.JmsConfiguration": return applicationContext.getBean(ref, org.apache.camel.component.jms.JmsConfiguration.class);
case "org.springframework.jms.support.destination.DestinationResolver": return applicationContext.getBean(ref, org.springframework.jms.support.destination.DestinationResolver.class);
case "org.springframework.util.ErrorHandler": return applicationContext.getBean(ref, org.springframework.util.ErrorHandler.class);
case "jakarta.jms.ExceptionListener": return applicationContext.getBean(ref, jakarta.jms.ExceptionListener.class);
case "org.springframework.jms.support.converter.MessageConverter": return applicationContext.getBean(ref, org.springframework.jms.support.converter.MessageConverter.class);
case "org.apache.camel.component.jms.MessageCreatedStrategy": return applicationContext.getBean(ref, org.apache.camel.component.jms.MessageCreatedStrategy.class);
case "org.apache.camel.component.jms.MessageListenerContainerFactory": return applicationContext.getBean(ref, org.apache.camel.component.jms.MessageListenerContainerFactory.class);
case "org.apache.camel.component.jms.QueueBrowseStrategy": return applicationContext.getBean(ref, org.apache.camel.component.jms.QueueBrowseStrategy.class);
case "org.apache.camel.component.jms.TemporaryQueueResolver": return applicationContext.getBean(ref, org.apache.camel.component.jms.TemporaryQueueResolver.class);
case "org.apache.camel.spi.HeaderFilterStrategy": return applicationContext.getBean(ref, org.apache.camel.spi.HeaderFilterStrategy.class);
case "org.springframework.transaction.PlatformTransactionManager": return applicationContext.getBean(ref, org.springframework.transaction.PlatformTransactionManager.class);
}
return null;
return BeanReferenceHelper.resolveBeanReference(applicationContext, source, targetType, "camel.component.activemq");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public ComponentCustomizer configureActiveMQComponent() {
return new ComponentCustomizer() {
@Override
public void configure(String name, Component target) {
CamelPropertiesHelper.copyProperties(target.getCamelContext(), configuration, target);
CamelPropertiesHelper.copyConfigurationProperties(target.getCamelContext(), applicationContext,
"camel.component.activemq6", configuration, target);
}
@Override
public boolean isEnabled(String name, Component target) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import java.util.LinkedHashSet;
import java.util.Set;
import org.apache.camel.spring.boot.util.BeanReferenceHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationPropertiesBinding;
import org.springframework.context.ApplicationContext;
Expand Down Expand Up @@ -59,29 +60,6 @@ public Object convert(
Object source,
TypeDescriptor sourceType,
TypeDescriptor targetType) {
if (source == null) {
return null;
}
String ref = source.toString();
if (!ref.startsWith("#")) {
return null;
}
ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1);
switch (targetType.getName()) {
case "jakarta.jms.ConnectionFactory": return applicationContext.getBean(ref, jakarta.jms.ConnectionFactory.class);
case "org.springframework.core.task.TaskExecutor": return applicationContext.getBean(ref, org.springframework.core.task.TaskExecutor.class);
case "org.apache.camel.component.jms.JmsConfiguration": return applicationContext.getBean(ref, org.apache.camel.component.jms.JmsConfiguration.class);
case "org.springframework.jms.support.destination.DestinationResolver": return applicationContext.getBean(ref, org.springframework.jms.support.destination.DestinationResolver.class);
case "org.springframework.util.ErrorHandler": return applicationContext.getBean(ref, org.springframework.util.ErrorHandler.class);
case "jakarta.jms.ExceptionListener": return applicationContext.getBean(ref, jakarta.jms.ExceptionListener.class);
case "org.springframework.jms.support.converter.MessageConverter": return applicationContext.getBean(ref, org.springframework.jms.support.converter.MessageConverter.class);
case "org.apache.camel.component.jms.MessageCreatedStrategy": return applicationContext.getBean(ref, org.apache.camel.component.jms.MessageCreatedStrategy.class);
case "org.apache.camel.component.jms.MessageListenerContainerFactory": return applicationContext.getBean(ref, org.apache.camel.component.jms.MessageListenerContainerFactory.class);
case "org.apache.camel.component.jms.QueueBrowseStrategy": return applicationContext.getBean(ref, org.apache.camel.component.jms.QueueBrowseStrategy.class);
case "org.apache.camel.component.jms.TemporaryQueueResolver": return applicationContext.getBean(ref, org.apache.camel.component.jms.TemporaryQueueResolver.class);
case "org.apache.camel.spi.HeaderFilterStrategy": return applicationContext.getBean(ref, org.apache.camel.spi.HeaderFilterStrategy.class);
case "org.springframework.transaction.PlatformTransactionManager": return applicationContext.getBean(ref, org.springframework.transaction.PlatformTransactionManager.class);
}
return null;
return BeanReferenceHelper.resolveBeanReference(applicationContext, source, targetType, "camel.component.activemq6");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public ComponentCustomizer configureAiToolComponent() {
return new ComponentCustomizer() {
@Override
public void configure(String name, Component target) {
CamelPropertiesHelper.copyProperties(target.getCamelContext(), configuration, target);
CamelPropertiesHelper.copyConfigurationProperties(target.getCamelContext(), applicationContext,
"camel.component.ai-tool", configuration, target);
}
@Override
public boolean isEnabled(String name, Component target) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import java.util.LinkedHashSet;
import java.util.Set;
import org.apache.camel.spring.boot.util.BeanReferenceHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationPropertiesBinding;
import org.springframework.context.ApplicationContext;
Expand Down Expand Up @@ -47,17 +48,6 @@ public Object convert(
Object source,
TypeDescriptor sourceType,
TypeDescriptor targetType) {
if (source == null) {
return null;
}
String ref = source.toString();
if (!ref.startsWith("#")) {
return null;
}
ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1);
switch (targetType.getName()) {
case "org.apache.camel.component.ai.tool.AiToolConfiguration": return applicationContext.getBean(ref, org.apache.camel.component.ai.tool.AiToolConfiguration.class);
}
return null;
return BeanReferenceHelper.resolveBeanReference(applicationContext, source, targetType, "camel.component.ai-tool");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public ComponentCustomizer configureAMQPComponent() {
return new ComponentCustomizer() {
@Override
public void configure(String name, Component target) {
CamelPropertiesHelper.copyProperties(target.getCamelContext(), configuration, target);
CamelPropertiesHelper.copyConfigurationProperties(target.getCamelContext(), applicationContext,
"camel.component.amqp", configuration, target);
}
@Override
public boolean isEnabled(String name, Component target) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import java.util.LinkedHashSet;
import java.util.Set;
import org.apache.camel.spring.boot.util.BeanReferenceHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationPropertiesBinding;
import org.springframework.context.ApplicationContext;
Expand Down Expand Up @@ -59,29 +60,6 @@ public Object convert(
Object source,
TypeDescriptor sourceType,
TypeDescriptor targetType) {
if (source == null) {
return null;
}
String ref = source.toString();
if (!ref.startsWith("#")) {
return null;
}
ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1);
switch (targetType.getName()) {
case "jakarta.jms.ConnectionFactory": return applicationContext.getBean(ref, jakarta.jms.ConnectionFactory.class);
case "org.springframework.core.task.TaskExecutor": return applicationContext.getBean(ref, org.springframework.core.task.TaskExecutor.class);
case "org.apache.camel.component.jms.JmsConfiguration": return applicationContext.getBean(ref, org.apache.camel.component.jms.JmsConfiguration.class);
case "org.springframework.jms.support.destination.DestinationResolver": return applicationContext.getBean(ref, org.springframework.jms.support.destination.DestinationResolver.class);
case "org.springframework.util.ErrorHandler": return applicationContext.getBean(ref, org.springframework.util.ErrorHandler.class);
case "jakarta.jms.ExceptionListener": return applicationContext.getBean(ref, jakarta.jms.ExceptionListener.class);
case "org.springframework.jms.support.converter.MessageConverter": return applicationContext.getBean(ref, org.springframework.jms.support.converter.MessageConverter.class);
case "org.apache.camel.component.jms.MessageCreatedStrategy": return applicationContext.getBean(ref, org.apache.camel.component.jms.MessageCreatedStrategy.class);
case "org.apache.camel.component.jms.MessageListenerContainerFactory": return applicationContext.getBean(ref, org.apache.camel.component.jms.MessageListenerContainerFactory.class);
case "org.apache.camel.component.jms.QueueBrowseStrategy": return applicationContext.getBean(ref, org.apache.camel.component.jms.QueueBrowseStrategy.class);
case "org.apache.camel.component.jms.TemporaryQueueResolver": return applicationContext.getBean(ref, org.apache.camel.component.jms.TemporaryQueueResolver.class);
case "org.apache.camel.spi.HeaderFilterStrategy": return applicationContext.getBean(ref, org.apache.camel.spi.HeaderFilterStrategy.class);
case "org.springframework.transaction.PlatformTransactionManager": return applicationContext.getBean(ref, org.springframework.transaction.PlatformTransactionManager.class);
}
return null;
return BeanReferenceHelper.resolveBeanReference(applicationContext, source, targetType, "camel.component.amqp");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public ComponentCustomizer configureArangoDbComponent() {
return new ComponentCustomizer() {
@Override
public void configure(String name, Component target) {
CamelPropertiesHelper.copyProperties(target.getCamelContext(), configuration, target);
CamelPropertiesHelper.copyConfigurationProperties(target.getCamelContext(), applicationContext,
"camel.component.arangodb", configuration, target);
}
@Override
public boolean isEnabled(String name, Component target) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import java.util.LinkedHashSet;
import java.util.Set;
import org.apache.camel.spring.boot.util.BeanReferenceHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationPropertiesBinding;
import org.springframework.context.ApplicationContext;
Expand Down Expand Up @@ -49,19 +50,6 @@ public Object convert(
Object source,
TypeDescriptor sourceType,
TypeDescriptor targetType) {
if (source == null) {
return null;
}
String ref = source.toString();
if (!ref.startsWith("#")) {
return null;
}
ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1);
switch (targetType.getName()) {
case "org.apache.camel.component.arangodb.ArangoDbConfiguration": return applicationContext.getBean(ref, org.apache.camel.component.arangodb.ArangoDbConfiguration.class);
case "com.arangodb.ArangoDB": return applicationContext.getBean(ref, com.arangodb.ArangoDB.class);
case "io.vertx.core.Vertx": return applicationContext.getBean(ref, io.vertx.core.Vertx.class);
}
return null;
return BeanReferenceHelper.resolveBeanReference(applicationContext, source, targetType, "camel.component.arangodb");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public ComponentCustomizer configureAS2Component() {
return new ComponentCustomizer() {
@Override
public void configure(String name, Component target) {
CamelPropertiesHelper.copyProperties(target.getCamelContext(), configuration, target);
CamelPropertiesHelper.copyConfigurationProperties(target.getCamelContext(), applicationContext,
"camel.component.as2", configuration, target);
}
@Override
public boolean isEnabled(String name, Component target) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import java.util.LinkedHashSet;
import java.util.Set;
import org.apache.camel.spring.boot.util.BeanReferenceHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationPropertiesBinding;
import org.springframework.context.ApplicationContext;
Expand Down Expand Up @@ -48,18 +49,6 @@ public Object convert(
Object source,
TypeDescriptor sourceType,
TypeDescriptor targetType) {
if (source == null) {
return null;
}
String ref = source.toString();
if (!ref.startsWith("#")) {
return null;
}
ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1);
switch (targetType.getName()) {
case "org.apache.camel.component.as2.AS2Configuration": return applicationContext.getBean(ref, org.apache.camel.component.as2.AS2Configuration.class);
case "org.apache.camel.support.jsse.SSLContextParameters": return applicationContext.getBean(ref, org.apache.camel.support.jsse.SSLContextParameters.class);
}
return null;
return BeanReferenceHelper.resolveBeanReference(applicationContext, source, targetType, "camel.component.as2");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ public DataFormatCustomizer configureASN1DataFormatFactory() {
return new DataFormatCustomizer() {
@Override
public void configure(String name, DataFormat target) {
CamelPropertiesHelper.copyProperties(camelContextProvider.getObject(), configuration, target);
CamelPropertiesHelper.copyConfigurationProperties(camelContextProvider.getObject(), applicationContext,
"camel.dataformat.asn1", configuration, target);
}
@Override
public boolean isEnabled(String name, DataFormat target) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public ComponentCustomizer configureAsteriskComponent() {
return new ComponentCustomizer() {
@Override
public void configure(String name, Component target) {
CamelPropertiesHelper.copyProperties(target.getCamelContext(), configuration, target);
CamelPropertiesHelper.copyConfigurationProperties(target.getCamelContext(), applicationContext,
"camel.component.asterisk", configuration, target);
}
@Override
public boolean isEnabled(String name, Component target) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public ComponentCustomizer configureWebsocketComponent() {
return new ComponentCustomizer() {
@Override
public void configure(String name, Component target) {
CamelPropertiesHelper.copyProperties(target.getCamelContext(), configuration, target);
CamelPropertiesHelper.copyConfigurationProperties(target.getCamelContext(), applicationContext,
"camel.component.atmosphere-websocket", configuration, target);
}
@Override
public boolean isEnabled(String name, Component target) {
Expand Down
Loading
Loading