Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
59b5c544
Commit
59b5c544
authored
Sep 04, 2018
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade to Rabbit AMQP Client to 5.4.0
Closes gh-14303
parent
0cd64ea6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
18 deletions
+6
-18
RabbitAutoConfiguration.java
...work/boot/autoconfigure/amqp/RabbitAutoConfiguration.java
+1
-11
RabbitProperties.java
...ngframework/boot/autoconfigure/amqp/RabbitProperties.java
+4
-5
pom.xml
spring-boot-project/spring-boot-dependencies/pom.xml
+1
-1
pom.xml
spring-boot-samples/spring-boot-sample-amqp/pom.xml
+0
-1
No files found.
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitAutoConfiguration.java
View file @
59b5c544
...
...
@@ -18,7 +18,6 @@ package org.springframework.boot.autoconfigure.amqp;
import
java.time.Duration
;
import
java.util.List
;
import
java.util.Objects
;
import
com.rabbitmq.client.Channel
;
...
...
@@ -42,7 +41,6 @@ import org.springframework.boot.context.properties.PropertyMapper;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Import
;
import
org.springframework.util.ReflectionUtils
;
/**
* {@link EnableAutoConfiguration Auto-configuration} for {@link RabbitTemplate}.
...
...
@@ -93,11 +91,6 @@ public class RabbitAutoConfiguration {
@ConditionalOnMissingBean
(
ConnectionFactory
.
class
)
protected
static
class
RabbitConnectionFactoryCreator
{
// Only available in rabbitmq-java-client 5.4.0 +
private
static
final
boolean
CAN_ENABLE_HOSTNAME_VERIFICATION
=
ReflectionUtils
.
findMethod
(
com
.
rabbitmq
.
client
.
ConnectionFactory
.
class
,
"enableHostnameVerification"
)
!=
null
;
@Bean
public
CachingConnectionFactory
rabbitConnectionFactory
(
RabbitProperties
properties
,
...
...
@@ -149,11 +142,8 @@ public class RabbitAutoConfiguration {
map
.
from
(
ssl:
:
getTrustStorePassword
).
to
(
factory:
:
setTrustStorePassphrase
);
map
.
from
(
ssl:
:
isValidateServerCertificate
).
to
((
validate
)
->
factory
.
setSkipServerCertificateValidation
(!
validate
));
map
.
from
(
ssl:
:
getVerifyHostname
)
.
when
(
Objects:
:
nonNull
)
map
.
from
(
ssl:
:
getVerifyHostname
)
.
to
(
factory:
:
setEnableHostnameVerification
);
if
(
ssl
.
getVerifyHostname
()
==
null
&&
CAN_ENABLE_HOSTNAME_VERIFICATION
)
{
factory
.
setEnableHostnameVerification
(
true
);
}
}
map
.
from
(
properties:
:
getConnectionTimeout
).
whenNonNull
()
.
asInt
(
Duration:
:
toMillis
).
to
(
factory:
:
setConnectionTimeout
);
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java
View file @
59b5c544
...
...
@@ -356,10 +356,9 @@ public class RabbitProperties {
private
boolean
validateServerCertificate
=
true
;
/**
* Whether to enable hostname verification. Requires AMQP client 4.8 or above and
* defaults to true when a suitable client version is used.
* Whether to enable hostname verification.
*/
private
Boolean
verifyHostnam
e
;
private
boolean
verifyHostname
=
tru
e
;
public
boolean
isEnabled
()
{
return
this
.
enabled
;
...
...
@@ -433,11 +432,11 @@ public class RabbitProperties {
this
.
validateServerCertificate
=
validateServerCertificate
;
}
public
B
oolean
getVerifyHostname
()
{
public
b
oolean
getVerifyHostname
()
{
return
this
.
verifyHostname
;
}
public
void
setVerifyHostname
(
B
oolean
verifyHostname
)
{
public
void
setVerifyHostname
(
b
oolean
verifyHostname
)
{
this
.
verifyHostname
=
verifyHostname
;
}
...
...
spring-boot-project/spring-boot-dependencies/pom.xml
View file @
59b5c544
...
...
@@ -141,7 +141,7 @@
<postgresql.version>
42.2.4
</postgresql.version>
<quartz.version>
2.3.0
</quartz.version>
<querydsl.version>
4.2.1
</querydsl.version>
<rabbit-amqp-client.version>
5.
3
.0
</rabbit-amqp-client.version>
<rabbit-amqp-client.version>
5.
4
.0
</rabbit-amqp-client.version>
<reactor-bom.version>
Californium-M2
</reactor-bom.version>
<rest-assured.version>
3.1.1
</rest-assured.version>
<reactive-streams.version>
1.0.2
</reactive-streams.version>
...
...
spring-boot-samples/spring-boot-sample-amqp/pom.xml
View file @
59b5c544
...
...
@@ -14,7 +14,6 @@
<description>
Spring Boot AMQP Sample
</description>
<properties>
<main.basedir>
${basedir}/../..
</main.basedir>
<rabbit-amqp-client.version>
5.4.0
</rabbit-amqp-client.version>
</properties>
<dependencies>
<!-- Compile -->
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment