Compare commits
3
Commits
e477ad36ba
...
bde3725684
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bde3725684 | ||
|
|
0f2c656e31 | ||
|
|
cbd8f91a55 |
@@ -0,0 +1,11 @@
|
||||
package cn.hezhaohui.rabbitmq;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class Application {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(Application.class, args);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package cn.hezhaohui.rabbitmq;
|
||||
package cn.hezhaohui.rabbitmq.amqp;
|
||||
|
||||
import org.springframework.amqp.core.Message;
|
||||
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
package cn.hezhaohui.rabbitmq;
|
||||
package cn.hezhaohui.rabbitmq.amqp;
|
||||
|
||||
import cn.hezhaohui.rabbitmq.entity.Message;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.Data;
|
||||
import org.springframework.amqp.core.AmqpTemplate;
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package cn.hezhaohui.rabbitmq;
|
||||
package cn.hezhaohui.rabbitmq.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -7,5 +7,5 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
public class Message {
|
||||
private String content;
|
||||
final private String content;
|
||||
}
|
||||
@@ -7,5 +7,5 @@ spring:
|
||||
host: localhost
|
||||
port: 5672
|
||||
username: wonder
|
||||
password: Dn293830
|
||||
password: dn293830
|
||||
virtual-host: /template
|
||||
@@ -1,5 +1,6 @@
|
||||
package cn.hezhaohui.rabbitmq;
|
||||
|
||||
import cn.hezhaohui.rabbitmq.amqp.MessageProducer;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
Reference in New Issue
Block a user