├── .gitignore
├── README.md
├── pom.xml
├── push.txt
├── src
├── main
│ ├── java
│ │ └── com
│ │ │ └── sunney
│ │ │ ├── Application.java
│ │ │ ├── service
│ │ │ ├── KafkaConsumerService.java
│ │ │ ├── KafkaService.java
│ │ │ ├── UserDto.java
│ │ │ └── impl
│ │ │ │ ├── KafkaConsumerServiceImpl.java
│ │ │ │ └── KafkaServiceImpl.java
│ │ │ └── task
│ │ │ └── ProducerTast.java
│ └── resources
│ │ ├── applicationContext.xml
│ │ ├── spring-kafka-consumer.xml
│ │ └── spring-kafka-producer.xml
└── test
│ └── java
│ └── com
│ └── sunney
│ └── AppTest.java
└── 说明.txt
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | .settings
3 | .classpath
4 | .project
5 | target
6 |
7 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | spring-integration-kafka 1.3.0.RELEASE 应用
2 |
3 |
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | org.springframework.boot
6 | spring-boot-starter-parent
7 | 1.3.3.RELEASE
8 |
9 | com.sunney
10 | kafka-demo
11 | jar
12 | 1.0-SNAPSHOT
13 | kafka-demo
14 | http://maven.apache.org
15 |
16 |
17 | org.springframework.boot
18 | spring-boot-starter-web
19 |
20 |
21 | org.springframework.integration
22 | spring-integration-kafka
23 | 1.3.0.RELEASE
24 |
25 |
26 | junit
27 | junit
28 | 4.11
29 | test
30 |
31 |
32 | org.apache.avro
33 | avro
34 | 1.7.7
35 |
36 |
37 | com.alibaba
38 | fastjson
39 | 1.2.7
40 |
41 |
42 | com.wanrong
43 | common-share
44 | 1.0
45 |
46 |
47 |
48 | kafak-demo
49 |
50 |
51 | src/main/resources
52 | true
53 |
54 |
55 |
56 |
57 | maven-compiler-plugin
58 | 3.3
59 |
60 | 1.7
61 | 1.7
62 |
63 |
64 |
65 | org.springframework.boot
66 | spring-boot-maven-plugin
67 | 1.3.3.RELEASE
68 |
69 |
70 |
71 | repackage
72 |
73 |
74 |
75 |
76 |
78 | false
79 |
80 |
81 |
82 | org.apache.maven.plugins
83 | maven-resources-plugin
84 | 2.6
85 |
86 |
87 | @
88 |
89 |
90 |
91 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/push.txt:
--------------------------------------------------------------------------------
1 | Git提交到多个远程仓库
2 | 输入:
3 | git remote add origin git@git.oschina.net:sunney/kafka-demo.git
4 | 再添加另一个:
5 | git remote set-url --add origin git@git.oschina.net:sunney/kafka-demo.git
6 | 提交
7 | git push origin --all
8 | 查看 origin
9 | git remote -v
10 |
11 | origin git@github.com:sunney2010/kafka-demo.git (fetch)
12 | origin git@github.com:sunney2010/kafka-demo.git (push)
13 | origin git@git.oschina.net:sunney/kafka-demo.git (push)
14 |
15 | 正确
--------------------------------------------------------------------------------
/src/main/java/com/sunney/Application.java:
--------------------------------------------------------------------------------
1 | package com.sunney;
2 |
3 | import java.util.HashSet;
4 | import java.util.Set;
5 |
6 | import org.springframework.boot.SpringApplication;
7 | import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
8 | import org.springframework.boot.autoconfigure.SpringBootApplication;
9 | import org.springframework.boot.web.servlet.ServletComponentScan;
10 | import org.springframework.context.ApplicationContext;
11 | import org.springframework.context.annotation.ComponentScan;
12 | import org.springframework.scheduling.annotation.EnableScheduling;
13 |
14 | /**
15 | * Hello world!
16 | */
17 | @SpringBootApplication
18 | @EnableScheduling
19 | @ComponentScan
20 | @EnableAutoConfiguration
21 | @ServletComponentScan
22 | public class Application {
23 |
24 | public static ApplicationContext applicationContext;
25 |
26 | public static void main(String[] args) throws Exception {
27 |
28 | SpringApplication app = new SpringApplication(Application.class);
29 | app.setWebEnvironment(false);
30 | Set