forked from xuwujing/springBoot-study
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
100 changed files
with
4,461 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/target/ | ||
/log/ | ||
/logs/ | ||
.classpath | ||
.project | ||
.settings | ||
.myeclipse | ||
##filter databfile¡¢sln file## | ||
*.mdb | ||
*.ldb | ||
*.sln | ||
##class file## | ||
*.com | ||
*.class | ||
*.dll | ||
*.exe | ||
*.o | ||
*.so | ||
# compression file | ||
*.7z | ||
*.dmg | ||
*.gz | ||
*.iso | ||
*.jar | ||
*.rar | ||
*.tar | ||
*.zip | ||
*.via | ||
*.tmp | ||
*.err | ||
*.log | ||
# OS generated files # | ||
.DS_Store | ||
.DS_Store? | ||
._* | ||
.Spotlight-V100 | ||
.Trashes | ||
Icon? | ||
ehthumbs.db | ||
Thumbs.db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,204 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>1.0.0</groupId> | ||
<artifactId>springBoot-kafka-storm</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
|
||
<name>springBoot-kafka-storm</name> | ||
<url>http://maven.apache.org</url> | ||
|
||
<!-- <parent> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-parent</artifactId> | ||
<version>1.5.9.RELEASE</version> | ||
<relativePath/> | ||
</parent> --> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<java.version>1.7</java.version> | ||
<springboot.version>1.5.9.RELEASE</springboot.version> | ||
<mybatis-spring-boot>1.2.0</mybatis-spring-boot> | ||
<mysql-connector>5.1.44</mysql-connector> | ||
<slf4j.version>1.7.25</slf4j.version> | ||
<logback.version>1.2.3</logback.version> | ||
<kafka.version>1.0.0</kafka.version> | ||
<storm.version>1.1.1</storm.version> | ||
<fastjson.version>1.2.41</fastjson.version> | ||
</properties> | ||
|
||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-web</artifactId> | ||
<version>${springboot.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-thymeleaf</artifactId> | ||
<version>${springboot.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-data-jpa</artifactId> | ||
<version>${springboot.version}</version> | ||
</dependency> | ||
|
||
|
||
|
||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-devtools</artifactId> | ||
<version>${springboot.version}</version> | ||
<optional>true</optional> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-test</artifactId> | ||
<version>${springboot.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
|
||
<!-- Spring Boot Mybatis 依赖 --> | ||
<dependency> | ||
<groupId>org.mybatis.spring.boot</groupId> | ||
<artifactId>mybatis-spring-boot-starter</artifactId> | ||
<version>${mybatis-spring-boot}</version> | ||
</dependency> | ||
|
||
<!-- MySQL 连接驱动依赖 --> | ||
<dependency> | ||
<groupId>mysql</groupId> | ||
<artifactId>mysql-connector-java</artifactId> | ||
<version>${mysql-connector}</version> | ||
</dependency> | ||
|
||
<!--权限控制 --> | ||
<!-- <dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-security</artifactId> | ||
</dependency> --> | ||
|
||
|
||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
<version>${slf4j.version}</version> | ||
</dependency> | ||
|
||
|
||
<dependency> | ||
<groupId>ch.qos.logback</groupId> | ||
<artifactId>logback-classic</artifactId> | ||
<version>${logback.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>ch.qos.logback</groupId> | ||
<artifactId>logback-core</artifactId> | ||
<version>${logback.version}</version> | ||
</dependency> | ||
|
||
|
||
<!-- kafka --> | ||
<dependency> | ||
<groupId>org.apache.kafka</groupId> | ||
<artifactId>kafka_2.12</artifactId> | ||
<version>${kafka.version}</version> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>org.apache.zookeeper</groupId> | ||
<artifactId>zookeeper</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-log4j12</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>log4j</groupId> | ||
<artifactId>log4j</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
|
||
<dependency> | ||
<groupId>org.apache.kafka</groupId> | ||
<artifactId>kafka-clients</artifactId> | ||
<version>${kafka.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.kafka</groupId> | ||
<artifactId>kafka-streams</artifactId> | ||
<version>${kafka.version}</version> | ||
</dependency> | ||
|
||
|
||
<!--storm相关jar --> | ||
<dependency> | ||
<groupId>org.apache.storm</groupId> | ||
<artifactId>storm-core</artifactId> | ||
<version>${storm.version}</version> | ||
<!--排除相关依赖 --> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>org.apache.logging.log4j</groupId> | ||
<artifactId>log4j-slf4j-impl</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>org.apache.logging.log4j</groupId> | ||
<artifactId>log4j-1.2-api</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>org.apache.logging.log4j</groupId> | ||
<artifactId>log4j-web</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-log4j12</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>ring-cors</artifactId> | ||
<groupId>ring-cors</groupId> | ||
</exclusion> | ||
</exclusions> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.storm</groupId> | ||
<artifactId>storm-kafka</artifactId> | ||
<version>${storm.version}</version> | ||
</dependency> | ||
|
||
|
||
<!--fastjson 相关jar --> | ||
<dependency> | ||
<groupId>com.alibaba</groupId> | ||
<artifactId>fastjson</artifactId> | ||
<version>${fastjson.version}</version> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<!--运用SpringBoot 插件 使用spring-boot-devtools模块的应用,当classpath中的文件有改变时,会自动重启! --> | ||
<plugin> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-maven-plugin</artifactId> | ||
<configuration> | ||
<fork>true</fork> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
25 changes: 25 additions & 0 deletions
25
springBoot-kafka-storm/src/main/java/com/pancm/Application.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.pancm; | ||
|
||
import org.mybatis.spring.annotation.MapperScan; | ||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
/** | ||
* | ||
* Title: Application | ||
* Description: | ||
* springBoot 主程序 | ||
* Version:1.0.0 | ||
* @author pancm | ||
* @date 2018年1月5日 | ||
*/ | ||
@SpringBootApplication | ||
@MapperScan("com.pancm.dao") | ||
public class Application{ | ||
|
||
public static void main(String[] args) { | ||
// 启动嵌入式的 Tomcat 并初始化 Spring 环境及其各 Spring 组件 | ||
SpringApplication.run(Application.class, args); | ||
System.out.println("程序正在运行..."); | ||
} | ||
|
||
} |
80 changes: 80 additions & 0 deletions
80
springBoot-kafka-storm/src/main/java/com/pancm/bean/User.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
package com.pancm.bean; | ||
/** | ||
* | ||
* Title: User | ||
* Description:用户pojo类 | ||
* Version:1.0.0 | ||
* @author pancm | ||
* @date 2017年9月26日 | ||
*/ | ||
public class User { | ||
/** 编号 */ | ||
private int id; | ||
/** 姓名 */ | ||
private String name; | ||
|
||
/** 年龄 */ | ||
private int age; | ||
|
||
public User(){ | ||
} | ||
/** | ||
* 构造方法 | ||
* @param id 编号 | ||
* @param name 姓名 | ||
*/ | ||
public User(int id, String name) { | ||
super(); | ||
this.id = id; | ||
this.name = name; | ||
} | ||
|
||
/** | ||
* 获取编号 | ||
* @return id | ||
*/ | ||
public int getId() { | ||
return id; | ||
} | ||
|
||
/** | ||
* 设置编号 | ||
* @param id | ||
*/ | ||
public void setId(int id) { | ||
this.id = id; | ||
} | ||
|
||
/** | ||
* 获取姓名 | ||
* @return name | ||
*/ | ||
public String getName() { | ||
return name; | ||
} | ||
|
||
/** | ||
* 设置姓名 | ||
* @param name | ||
*/ | ||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
/** | ||
* 获取年龄 | ||
* @return age | ||
*/ | ||
public int getAge() { | ||
return age; | ||
} | ||
/** | ||
* 设置年龄 | ||
* @param int age | ||
*/ | ||
public void setAge(int age) { | ||
this.age = age; | ||
} | ||
|
||
|
||
|
||
} |
11 changes: 11 additions & 0 deletions
11
springBoot-kafka-storm/src/main/java/com/pancm/bean/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* | ||
*/ | ||
/** | ||
* Title: package-info | ||
* Description: 实体类 | ||
* Version:1.0.0 | ||
* @author pancm | ||
* @date 2018年1月4日 | ||
*/ | ||
package com.pancm.bean; |
Oops, something went wrong.