File tree Expand file tree Collapse file tree 2 files changed +0
-27
lines changed
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp Expand file tree Collapse file tree 2 files changed +0
-27
lines changed Original file line number Diff line number Diff line change 20
20
import org .springframework .amqp .rabbit .config .RabbitListenerConfigUtils ;
21
21
import org .springframework .amqp .rabbit .config .SimpleRabbitListenerContainerFactory ;
22
22
import org .springframework .amqp .rabbit .connection .ConnectionFactory ;
23
- import org .springframework .beans .factory .annotation .Autowired ;
24
23
import org .springframework .boot .autoconfigure .condition .ConditionalOnClass ;
25
24
import org .springframework .boot .autoconfigure .condition .ConditionalOnMissingBean ;
26
25
import org .springframework .context .annotation .Bean ;
27
26
import org .springframework .context .annotation .Configuration ;
28
- import org .springframework .transaction .PlatformTransactionManager ;
29
27
30
28
/**
31
29
* Configuration for Spring AMQP annotation driven endpoints.
37
35
@ ConditionalOnClass (EnableRabbit .class )
38
36
class RabbitAnnotationDrivenConfiguration {
39
37
40
- @ Autowired (required = false )
41
- private PlatformTransactionManager transactionManager ;
42
-
43
38
@ Bean
44
39
@ ConditionalOnMissingBean (name = "rabbitListenerContainerFactory" )
45
40
public SimpleRabbitListenerContainerFactory rabbitListenerContainerFactory (
46
41
ConnectionFactory connectionFactory , RabbitProperties config ) {
47
42
SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory ();
48
43
factory .setConnectionFactory (connectionFactory );
49
- if (this .transactionManager != null
50
- && config .getListener ().isUseTransactionManager ()) {
51
- factory .setTransactionManager (this .transactionManager );
52
- }
53
44
return factory ;
54
45
}
55
46
Original file line number Diff line number Diff line change @@ -62,12 +62,6 @@ public class RabbitProperties {
62
62
*/
63
63
private String addresses ;
64
64
65
- private Listener listener = new Listener ();
66
-
67
- public Listener getListener () {
68
- return this .listener ;
69
- }
70
-
71
65
public String getHost () {
72
66
if (this .addresses == null ) {
73
67
return this .host ;
@@ -162,16 +156,4 @@ public void setVirtualHost(String virtualHost) {
162
156
this .virtualHost = ("" .equals (virtualHost ) ? "/" : virtualHost );
163
157
}
164
158
165
- public static class Listener {
166
- private boolean useTransactionManager = false ;
167
-
168
- public boolean isUseTransactionManager () {
169
- return this .useTransactionManager ;
170
- }
171
-
172
- public void setUseTransactionManager (boolean useTransactionManager ) {
173
- this .useTransactionManager = useTransactionManager ;
174
- }
175
- }
176
-
177
159
}
You can’t perform that action at this time.
0 commit comments