Create spring-boot-jms module
This commit is contained in:
parent
0bbc736f65
commit
fbd04beda5
|
@ -51,6 +51,7 @@ include "spring-boot-project:spring-boot-docker-compose"
|
|||
include "spring-boot-project:spring-boot-docs"
|
||||
include "spring-boot-project:spring-boot-jackson"
|
||||
include "spring-boot-project:spring-boot-jetty"
|
||||
include "spring-boot-project:spring-boot-jms"
|
||||
include "spring-boot-project:spring-boot-jsonb"
|
||||
include "spring-boot-project:spring-boot-mail"
|
||||
include "spring-boot-project:spring-boot-parent"
|
||||
|
|
|
@ -20,6 +20,7 @@ dependencies {
|
|||
optional(project(":spring-boot-project:spring-boot-amqp"))
|
||||
optional(project(":spring-boot-project:spring-boot-jackson"))
|
||||
optional(project(":spring-boot-project:spring-boot-jetty"))
|
||||
optional(project(":spring-boot-project:spring-boot-jms"))
|
||||
optional(project(":spring-boot-project:spring-boot-jsonb"))
|
||||
optional(project(":spring-boot-project:spring-boot-mail"))
|
||||
optional(project(":spring-boot-project:spring-boot-reactor-netty"))
|
||||
|
@ -73,7 +74,6 @@ dependencies {
|
|||
optional("io.r2dbc:r2dbc-proxy")
|
||||
optional("io.r2dbc:r2dbc-spi")
|
||||
optional("io.undertow:undertow-servlet")
|
||||
optional("jakarta.jms:jakarta.jms-api")
|
||||
optional("jakarta.persistence:jakarta.persistence-api")
|
||||
optional("jakarta.servlet:jakarta.servlet-api")
|
||||
optional("javax.cache:cache-api")
|
||||
|
@ -111,7 +111,6 @@ dependencies {
|
|||
optional("org.neo4j.driver:neo4j-java-driver")
|
||||
optional("org.quartz-scheduler:quartz")
|
||||
optional("org.springframework:spring-jdbc")
|
||||
optional("org.springframework:spring-jms")
|
||||
optional("org.springframework:spring-messaging")
|
||||
optional("org.springframework:spring-webflux")
|
||||
optional("org.springframework:spring-webmvc")
|
||||
|
|
|
@ -24,6 +24,7 @@ dependencies {
|
|||
dockerTestImplementation("org.testcontainers:testcontainers")
|
||||
|
||||
optional(project(":spring-boot-project:spring-boot-jetty"))
|
||||
optional(project(":spring-boot-project:spring-boot-jms"))
|
||||
optional(project(":spring-boot-project:spring-boot-jsonb"))
|
||||
optional(project(":spring-boot-project:spring-boot-reactor-netty"))
|
||||
optional(project(":spring-boot-project:spring-boot-tomcat"))
|
||||
|
@ -49,7 +50,6 @@ dependencies {
|
|||
optional("io.r2dbc:r2dbc-spi")
|
||||
optional("io.undertow:undertow-servlet")
|
||||
optional("javax.cache:cache-api")
|
||||
optional("jakarta.jms:jakarta.jms-api")
|
||||
optional("org.apache.tomcat.embed:tomcat-embed-core")
|
||||
optional("org.aspectj:aspectjweaver")
|
||||
optional("org.cache2k:cache2k-micrometer")
|
||||
|
|
|
@ -29,7 +29,6 @@ dependencies {
|
|||
optional("io.rsocket:rsocket-core")
|
||||
optional("io.rsocket:rsocket-transport-netty")
|
||||
optional("io.undertow:undertow-servlet")
|
||||
optional("jakarta.jms:jakarta.jms-api")
|
||||
optional("jakarta.persistence:jakarta.persistence-api")
|
||||
optional("jakarta.servlet:jakarta.servlet-api")
|
||||
optional("jakarta.transaction:jakarta.transaction-api")
|
||||
|
@ -57,15 +56,11 @@ dependencies {
|
|||
optional("org.liquibase:liquibase-core") {
|
||||
exclude(group: "javax.xml.bind", module: "jaxb-api")
|
||||
}
|
||||
optional("org.messaginghub:pooled-jms") {
|
||||
exclude group: "org.apache.geronimo.specs", module: "geronimo-jms_2.0_spec"
|
||||
}
|
||||
optional("org.postgresql:postgresql")
|
||||
optional("org.slf4j:jul-to-slf4j")
|
||||
optional("org.slf4j:slf4j-api")
|
||||
optional("org.springframework:spring-messaging")
|
||||
optional("org.springframework:spring-orm")
|
||||
optional("org.springframework:spring-jms")
|
||||
optional("org.springframework:spring-oxm")
|
||||
optional("org.springframework:spring-r2dbc")
|
||||
optional("org.springframework:spring-test")
|
||||
|
|
|
@ -44,6 +44,7 @@ dependencies {
|
|||
|
||||
optional(project(":spring-boot-project:spring-boot-jackson"))
|
||||
optional(project(":spring-boot-project:spring-boot-jsonb"))
|
||||
optional(project(":spring-boot-project:spring-boot-jms"))
|
||||
optional(project(":spring-boot-project:spring-boot-reactor-netty"))
|
||||
optional(project(":spring-boot-project:spring-boot-tomcat"))
|
||||
optional("co.elastic.clients:elasticsearch-java")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -23,10 +23,10 @@ import org.springframework.boot.autoconfigure.AutoConfiguration;
|
|||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.jms.JmsProperties;
|
||||
import org.springframework.boot.autoconfigure.jms.JndiConnectionFactoryAutoConfiguration;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.jms.autoconfigure.JmsAutoConfiguration;
|
||||
import org.springframework.boot.jms.autoconfigure.JmsProperties;
|
||||
import org.springframework.boot.jms.autoconfigure.JndiConnectionFactoryAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@ import org.springframework.beans.factory.ObjectProvider;
|
|||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBooleanProperty;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.jms.JmsPoolConnectionFactoryFactory;
|
||||
import org.springframework.boot.autoconfigure.jms.JmsProperties;
|
||||
import org.springframework.boot.jms.autoconfigure.JmsPoolConnectionFactoryFactory;
|
||||
import org.springframework.boot.jms.autoconfigure.JmsProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.jms.connection.CachingConnectionFactory;
|
||||
|
|
|
@ -20,9 +20,9 @@ import java.time.Duration;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.boot.autoconfigure.jms.JmsPoolConnectionFactoryProperties;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.NestedConfigurationProperty;
|
||||
import org.springframework.boot.jms.autoconfigure.JmsPoolConnectionFactoryProperties;
|
||||
|
||||
/**
|
||||
* Configuration properties for ActiveMQ.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -23,10 +23,10 @@ import org.springframework.boot.autoconfigure.AutoConfiguration;
|
|||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.jms.JmsProperties;
|
||||
import org.springframework.boot.autoconfigure.jms.JndiConnectionFactoryAutoConfiguration;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.jms.autoconfigure.JmsAutoConfiguration;
|
||||
import org.springframework.boot.jms.autoconfigure.JmsProperties;
|
||||
import org.springframework.boot.jms.autoconfigure.JndiConnectionFactoryAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@ import org.springframework.beans.factory.ListableBeanFactory;
|
|||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBooleanProperty;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.jms.JmsPoolConnectionFactoryFactory;
|
||||
import org.springframework.boot.autoconfigure.jms.JmsProperties;
|
||||
import org.springframework.boot.jms.autoconfigure.JmsPoolConnectionFactoryFactory;
|
||||
import org.springframework.boot.jms.autoconfigure.JmsProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.jms.connection.CachingConnectionFactory;
|
||||
|
|
|
@ -23,9 +23,9 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||
|
||||
import org.apache.activemq.artemis.core.remoting.impl.invm.TransportConstants;
|
||||
|
||||
import org.springframework.boot.autoconfigure.jms.JmsPoolConnectionFactoryProperties;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.NestedConfigurationProperty;
|
||||
import org.springframework.boot.jms.autoconfigure.JmsPoolConnectionFactoryProperties;
|
||||
|
||||
/**
|
||||
* Configuration properties for Artemis.
|
||||
|
|
|
@ -2594,40 +2594,6 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "spring.jms.listener.session.acknowledge-mode",
|
||||
"values": [
|
||||
{
|
||||
"value": "auto",
|
||||
"description": "Messages sent or received from the session are automatically acknowledged. This is the simplest mode and enables once-only message delivery guarantee."
|
||||
},
|
||||
{
|
||||
"value": "client",
|
||||
"description": "Messages are acknowledged once the message listener implementation has called \"jakarta.jms.Message#acknowledge()\". This mode gives the application (rather than the JMS provider) complete control over message acknowledgement."
|
||||
},
|
||||
{
|
||||
"value": "dups_ok",
|
||||
"description": "Similar to auto acknowledgment except that said acknowledgment is lazy. As a consequence, the messages might be delivered more than once. This mode enables at-least-once message delivery guarantee."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "spring.jms.template.session.acknowledge-mode",
|
||||
"values": [
|
||||
{
|
||||
"value": "auto",
|
||||
"description": "Messages sent or received from the session are automatically acknowledged. This is the simplest mode and enables once-only message delivery guarantee."
|
||||
},
|
||||
{
|
||||
"value": "client",
|
||||
"description": "Messages are acknowledged once the message listener implementation has called \"jakarta.jms.Message#acknowledge()\". This mode gives the application (rather than the JMS provider) complete control over message acknowledgement."
|
||||
},
|
||||
{
|
||||
"value": "dups_ok",
|
||||
"description": "Similar to auto acknowledgment except that said acknowledgment is lazy. As a consequence, the messages might be delivered more than once. This mode enables at-least-once message delivery guarantee."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "spring.jpa.hibernate.ddl-auto",
|
||||
"values": [
|
||||
|
|
|
@ -70,8 +70,6 @@ org.springframework.boot.autoconfigure.jdbc.JndiDataSourceAutoConfiguration
|
|||
org.springframework.boot.autoconfigure.jdbc.XADataSourceAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.jms.JndiConnectionFactoryAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.jms.activemq.ActiveMQAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.jms.artemis.ArtemisAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.jooq.JooqAutoConfiguration
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test;
|
|||
import org.messaginghub.pooled.jms.JmsPoolConnectionFactory;
|
||||
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration;
|
||||
import org.springframework.boot.jms.autoconfigure.JmsAutoConfiguration;
|
||||
import org.springframework.boot.test.context.FilteredClassLoader;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -47,8 +47,8 @@ import org.junit.jupiter.api.io.TempDir;
|
|||
import org.messaginghub.pooled.jms.JmsPoolConnectionFactory;
|
||||
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.jms.artemis.ArtemisAutoConfiguration.PropertiesArtemisConnectionDetails;
|
||||
import org.springframework.boot.jms.autoconfigure.JmsAutoConfiguration;
|
||||
import org.springframework.boot.test.context.FilteredClassLoader;
|
||||
import org.springframework.boot.test.context.assertj.AssertableApplicationContext;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
|
|
|
@ -1974,6 +1974,7 @@ bom {
|
|||
"spring-boot-jackson",
|
||||
"spring-boot-jarmode-tools",
|
||||
"spring-boot-jetty",
|
||||
"spring-boot-jms",
|
||||
"spring-boot-jsonb",
|
||||
"spring-boot-loader",
|
||||
"spring-boot-loader-classic",
|
||||
|
|
|
@ -66,6 +66,7 @@ dependencies {
|
|||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-jackson", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-jetty", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-jms", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-jsonb", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-mail", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-reactor-netty", configuration: "autoConfigurationMetadata"))
|
||||
|
@ -83,6 +84,7 @@ dependencies {
|
|||
configurationProperties(project(path: ":spring-boot-project:spring-boot-docker-compose", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-jackson", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-jetty", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-jms", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-mail", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-reactor-netty", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-test-autoconfigure", configuration: "configurationPropertiesMetadata"))
|
||||
|
@ -100,6 +102,7 @@ dependencies {
|
|||
implementation(project(path: ":spring-boot-project:spring-boot-devtools"))
|
||||
implementation(project(path: ":spring-boot-project:spring-boot-docker-compose"))
|
||||
implementation(project(path: ":spring-boot-project:spring-boot-jackson"))
|
||||
implementation(project(path: ":spring-boot-project:spring-boot-jms"))
|
||||
implementation(project(path: ":spring-boot-project:spring-boot-jsonb"))
|
||||
implementation(project(path: ":spring-boot-project:spring-boot-reactor-netty"))
|
||||
implementation(project(path: ":spring-boot-project:spring-boot-test"))
|
||||
|
|
|
@ -11,7 +11,7 @@ This section answers questions that arise from using messaging with Spring Boot.
|
|||
|
||||
If your JMS broker does not support transacted sessions, you have to disable the support of transactions altogether.
|
||||
If you create your own javadoc:org.springframework.jms.config.JmsListenerContainerFactory[], there is nothing to do, since, by default it cannot be transacted.
|
||||
If you want to use the javadoc:org.springframework.boot.autoconfigure.jms.DefaultJmsListenerContainerFactoryConfigurer[] to reuse Spring Boot's default, you can disable transacted sessions, as follows:
|
||||
If you want to use the javadoc:org.springframework.boot.jms.autoconfigure.DefaultJmsListenerContainerFactoryConfigurer[] to reuse Spring Boot's default, you can disable transacted sessions, as follows:
|
||||
|
||||
include-code::MyJmsConfiguration[]
|
||||
|
||||
|
|
|
@ -180,7 +180,7 @@ include-code::MyBean[]
|
|||
|
||||
TIP: See the javadoc:org.springframework.jms.annotation.EnableJms[format=annotation] API documentation for more details.
|
||||
|
||||
If you need to create more javadoc:org.springframework.jms.config.JmsListenerContainerFactory[] instances or if you want to override the default, Spring Boot provides a javadoc:org.springframework.boot.autoconfigure.jms.DefaultJmsListenerContainerFactoryConfigurer[] that you can use to initialize a javadoc:org.springframework.jms.config.DefaultJmsListenerContainerFactory[] with the same settings as the one that is auto-configured.
|
||||
If you need to create more javadoc:org.springframework.jms.config.JmsListenerContainerFactory[] instances or if you want to override the default, Spring Boot provides a javadoc:org.springframework.boot.jms.autoconfigure.DefaultJmsListenerContainerFactoryConfigurer[] that you can use to initialize a javadoc:org.springframework.jms.config.DefaultJmsListenerContainerFactory[] with the same settings as the one that is auto-configured.
|
||||
|
||||
For instance, the following example exposes another factory that uses a specific javadoc:org.springframework.jms.support.converter.MessageConverter[]:
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -18,8 +18,8 @@ package org.springframework.boot.docs.howto.messaging.disabletransactedjmssessio
|
|||
|
||||
import jakarta.jms.ConnectionFactory;
|
||||
|
||||
import org.springframework.boot.autoconfigure.jms.DefaultJmsListenerContainerFactoryConfigurer;
|
||||
import org.springframework.boot.jms.ConnectionFactoryUnwrapper;
|
||||
import org.springframework.boot.jms.autoconfigure.DefaultJmsListenerContainerFactoryConfigurer;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.jms.config.DefaultJmsListenerContainerFactory;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -18,8 +18,8 @@ package org.springframework.boot.docs.messaging.jms.receiving.custom;
|
|||
|
||||
import jakarta.jms.ConnectionFactory;
|
||||
|
||||
import org.springframework.boot.autoconfigure.jms.DefaultJmsListenerContainerFactoryConfigurer;
|
||||
import org.springframework.boot.jms.ConnectionFactoryUnwrapper;
|
||||
import org.springframework.boot.jms.autoconfigure.DefaultJmsListenerContainerFactoryConfigurer;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.jms.config.DefaultJmsListenerContainerFactory;
|
||||
|
|
|
@ -18,7 +18,7 @@ package org.springframework.boot.docs.howto.messaging.disabletransactedjmssessio
|
|||
|
||||
import jakarta.jms.ConnectionFactory
|
||||
import org.springframework.boot.jms.ConnectionFactoryUnwrapper
|
||||
import org.springframework.boot.autoconfigure.jms.DefaultJmsListenerContainerFactoryConfigurer
|
||||
import org.springframework.boot.jms.autoconfigure.DefaultJmsListenerContainerFactoryConfigurer
|
||||
import org.springframework.context.annotation.Bean
|
||||
import org.springframework.context.annotation.Configuration
|
||||
import org.springframework.jms.config.DefaultJmsListenerContainerFactory
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
package org.springframework.boot.docs.messaging.jms.receiving.custom
|
||||
|
||||
import jakarta.jms.ConnectionFactory
|
||||
import org.springframework.boot.autoconfigure.jms.DefaultJmsListenerContainerFactoryConfigurer
|
||||
import org.springframework.boot.jms.ConnectionFactoryUnwrapper
|
||||
import org.springframework.boot.jms.autoconfigure.DefaultJmsListenerContainerFactoryConfigurer
|
||||
import org.springframework.context.annotation.Bean
|
||||
import org.springframework.context.annotation.Configuration
|
||||
import org.springframework.jms.config.DefaultJmsListenerContainerFactory
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
plugins {
|
||||
id "java-library"
|
||||
id "org.springframework.boot.auto-configuration"
|
||||
id "org.springframework.boot.configuration-properties"
|
||||
id "org.springframework.boot.deployed"
|
||||
id "org.springframework.boot.optional-dependencies"
|
||||
}
|
||||
|
||||
description = "Spring Boot JMS"
|
||||
|
||||
dependencies {
|
||||
api(project(":spring-boot-project:spring-boot"))
|
||||
api("jakarta.jms:jakarta.jms-api")
|
||||
api("org.springframework:spring-jms")
|
||||
|
||||
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
|
||||
optional("jakarta.transaction:jakarta.transaction-api")
|
||||
optional("org.messaginghub:pooled-jms") {
|
||||
exclude group: "org.apache.geronimo.specs", module: "geronimo-jms_2.0_spec"
|
||||
}
|
||||
optional("org.springframework:spring-jdbc")
|
||||
|
||||
testImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
||||
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-autoconfigure")))
|
||||
testImplementation("org.assertj:assertj-core")
|
||||
testImplementation("org.awaitility:awaitility")
|
||||
testImplementation("org.junit.jupiter:junit-jupiter")
|
||||
testImplementation("org.mockito:mockito-core")
|
||||
testImplementation("org.mockito:mockito-junit-jupiter")
|
||||
|
||||
testRuntimeOnly("ch.qos.logback:logback-classic")
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2021 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.jms;
|
||||
package org.springframework.boot.jms.autoconfigure;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.jms;
|
||||
package org.springframework.boot.jms.autoconfigure;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
|
@ -22,8 +22,8 @@ import io.micrometer.observation.ObservationRegistry;
|
|||
import jakarta.jms.ConnectionFactory;
|
||||
import jakarta.jms.ExceptionListener;
|
||||
|
||||
import org.springframework.boot.autoconfigure.jms.JmsProperties.Listener.Session;
|
||||
import org.springframework.boot.context.properties.PropertyMapper;
|
||||
import org.springframework.boot.jms.autoconfigure.JmsProperties.Listener.Session;
|
||||
import org.springframework.jms.config.DefaultJmsListenerContainerFactory;
|
||||
import org.springframework.jms.support.converter.MessageConverter;
|
||||
import org.springframework.jms.support.destination.DestinationResolver;
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.jms;
|
||||
package org.springframework.boot.jms.autoconfigure;
|
||||
|
||||
import io.micrometer.observation.ObservationRegistry;
|
||||
import jakarta.jms.ConnectionFactory;
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.jms;
|
||||
package org.springframework.boot.jms.autoconfigure;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.List;
|
||||
|
@ -34,11 +34,11 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
|||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnSingleCandidate;
|
||||
import org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration.JmsRuntimeHints;
|
||||
import org.springframework.boot.autoconfigure.jms.JmsProperties.DeliveryMode;
|
||||
import org.springframework.boot.autoconfigure.jms.JmsProperties.Template;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.PropertyMapper;
|
||||
import org.springframework.boot.jms.autoconfigure.JmsAutoConfiguration.JmsRuntimeHints;
|
||||
import org.springframework.boot.jms.autoconfigure.JmsProperties.DeliveryMode;
|
||||
import org.springframework.boot.jms.autoconfigure.JmsProperties.Template;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.jms;
|
||||
package org.springframework.boot.jms.autoconfigure;
|
||||
|
||||
import jakarta.jms.ConnectionFactory;
|
||||
import org.messaginghub.pooled.jms.JmsPoolConnectionFactory;
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,16 +14,19 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.jms;
|
||||
package org.springframework.boot.jms.autoconfigure;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationPropertiesSource;
|
||||
|
||||
/**
|
||||
* Configuration properties for connection factory pooling.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.1.0
|
||||
*/
|
||||
@ConfigurationPropertiesSource
|
||||
public class JmsPoolConnectionFactoryProperties {
|
||||
|
||||
/**
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.jms;
|
||||
package org.springframework.boot.jms.autoconfigure;
|
||||
|
||||
import java.time.Duration;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.jms;
|
||||
package org.springframework.boot.jms.autoconfigure;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
|
@ -29,8 +29,8 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
|||
import org.springframework.boot.autoconfigure.condition.ConditionalOnJndi;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.autoconfigure.jms.JndiConnectionFactoryAutoConfiguration.JndiOrPropertyCondition;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.jms.autoconfigure.JndiConnectionFactoryAutoConfiguration.JndiOrPropertyCondition;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Conditional;
|
||||
import org.springframework.jms.core.JmsTemplate;
|
|
@ -17,4 +17,4 @@
|
|||
/**
|
||||
* Auto-configuration for JMS.
|
||||
*/
|
||||
package org.springframework.boot.autoconfigure.jms;
|
||||
package org.springframework.boot.jms.autoconfigure;
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"groups": [],
|
||||
"properties": [],
|
||||
"hints": [
|
||||
{
|
||||
"name": "spring.jms.listener.session.acknowledge-mode",
|
||||
"values": [
|
||||
{
|
||||
"value": "auto",
|
||||
"description": "Messages sent or received from the session are automatically acknowledged. This is the simplest mode and enables once-only message delivery guarantee."
|
||||
},
|
||||
{
|
||||
"value": "client",
|
||||
"description": "Messages are acknowledged once the message listener implementation has called \"jakarta.jms.Message#acknowledge()\". This mode gives the application (rather than the JMS provider) complete control over message acknowledgement."
|
||||
},
|
||||
{
|
||||
"value": "dups_ok",
|
||||
"description": "Similar to auto acknowledgment except that said acknowledgment is lazy. As a consequence, the messages might be delivered more than once. This mode enables at-least-once message delivery guarantee."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "spring.jms.template.session.acknowledge-mode",
|
||||
"values": [
|
||||
{
|
||||
"value": "auto",
|
||||
"description": "Messages sent or received from the session are automatically acknowledged. This is the simplest mode and enables once-only message delivery guarantee."
|
||||
},
|
||||
{
|
||||
"value": "client",
|
||||
"description": "Messages are acknowledged once the message listener implementation has called \"jakarta.jms.Message#acknowledge()\". This mode gives the application (rather than the JMS provider) complete control over message acknowledgement."
|
||||
},
|
||||
{
|
||||
"value": "dups_ok",
|
||||
"description": "Similar to auto acknowledgment except that said acknowledgment is lazy. As a consequence, the messages might be delivered more than once. This mode enables at-least-once message delivery guarantee."
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
org.springframework.boot.jms.autoconfigure.JmsAutoConfiguration
|
||||
org.springframework.boot.jms.autoconfigure.JndiConnectionFactoryAutoConfiguration
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.jms;
|
||||
package org.springframework.boot.jms.autoconfigure;
|
||||
|
||||
import jakarta.jms.Session;
|
||||
import org.junit.jupiter.api.Test;
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.jms;
|
||||
package org.springframework.boot.jms.autoconfigure;
|
||||
|
||||
import io.micrometer.observation.ObservationRegistry;
|
||||
import jakarta.jms.ConnectionFactory;
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.jms;
|
||||
package org.springframework.boot.jms.autoconfigure;
|
||||
|
||||
import java.time.Duration;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.jms;
|
||||
package org.springframework.boot.jms.autoconfigure;
|
||||
|
||||
import javax.naming.Context;
|
||||
|
|
@ -6,6 +6,6 @@ description = "Starter for JMS messaging using Apache ActiveMQ"
|
|||
|
||||
dependencies {
|
||||
api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter"))
|
||||
api("org.springframework:spring-jms")
|
||||
api(project(":spring-boot-project:spring-boot-jms"))
|
||||
api("org.apache.activemq:activemq-client")
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@ description = "Starter for JMS messaging using Apache Artemis"
|
|||
|
||||
dependencies {
|
||||
api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter"))
|
||||
api("org.springframework:spring-jms")
|
||||
api(project(":spring-boot-project:spring-boot-jms"))
|
||||
api("org.apache.activemq:artemis-jakarta-client")
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ dependencies {
|
|||
api(project(":spring-boot-project:spring-boot-autoconfigure-all"))
|
||||
api("org.testcontainers:testcontainers")
|
||||
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-jms"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker"))
|
||||
dockerTestImplementation("ch.qos.logback:logback-classic")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -28,8 +28,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
|||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.jms.activemq.ActiveMQAutoConfiguration;
|
||||
import org.springframework.boot.jms.autoconfigure.JmsAutoConfiguration;
|
||||
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
|
||||
import org.springframework.boot.testsupport.container.TestImage;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -27,8 +27,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
|||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.jms.activemq.ActiveMQAutoConfiguration;
|
||||
import org.springframework.boot.jms.autoconfigure.JmsAutoConfiguration;
|
||||
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
|
||||
import org.springframework.boot.testsupport.container.SymptomaActiveMQContainer;
|
||||
import org.springframework.boot.testsupport.container.TestImage;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -28,8 +28,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
|||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.jms.artemis.ArtemisAutoConfiguration;
|
||||
import org.springframework.boot.jms.autoconfigure.JmsAutoConfiguration;
|
||||
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
|
||||
import org.springframework.boot.testsupport.container.TestImage;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
|
Loading…
Reference in New Issue