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
1a59698f
Commit
1a59698f
authored
Oct 07, 2013
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweak AMQP sample slightly
parent
1096ed6d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
SampleAmqpSimpleApplication.java
...amework/boot/sample/amqp/SampleAmqpSimpleApplication.java
+3
-4
No files found.
spring-boot-samples/spring-boot-sample-amqp/src/main/java/org/springframework/boot/sample/amqp/SampleAmqpSimpleApplication.java
View file @
1a59698f
...
...
@@ -16,25 +16,23 @@
package
org
.
springframework
.
boot
.
sample
.
amqp
;
import
org.springframework.amqp.core.AmqpTemplate
;
import
org.springframework.amqp.rabbit.connection.ConnectionFactory
;
import
org.springframework.amqp.rabbit.core.RabbitTemplate
;
import
org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer
;
import
org.springframework.amqp.rabbit.listener.adapter.MessageListenerAdapter
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor
;
@Configuration
@EnableAutoConfiguration
@ComponentScan
public
class
SampleAmqpSimpleApplication
{
@Autowired
private
RabbitTemplate
rabbit
Template
;
private
AmqpTemplate
amqp
Template
;
@Autowired
private
ConnectionFactory
connectionFactory
;
...
...
@@ -53,6 +51,7 @@ public class SampleAmqpSimpleApplication {
public
SimpleMessageListenerContainer
container
()
{
SimpleMessageListenerContainer
container
=
new
SimpleMessageListenerContainer
(
connectionFactory
);
Object
listener
=
new
Object
()
{
@SuppressWarnings
(
"unused"
)
public
void
handleMessage
(
String
foo
)
{
System
.
out
.
println
(
foo
);
}
...
...
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