Skip to content

Commit

Permalink
+
Browse files Browse the repository at this point in the history
  • Loading branch information
Relucent committed Jul 15, 2020
1 parent 7b4321e commit 743e3a3
Show file tree
Hide file tree
Showing 39 changed files with 494 additions and 571 deletions.
82 changes: 36 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,48 @@
# spring-boot-example

Spring Boot 示例

---
Spring Boot 示例项目

```
mvn clean package
java -jar target/spring-boot-hello-0.0.1-SNAPSHOT.war
java -Dloader.path="lib/" -jar target/spring-boot-hello-0.0.1-SNAPSHOT.war

```

Spring Boot 2.x
---

### 示例代码

- [spring-boot-example-hello](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-hello):第一个SpringBoot项目

- [spring-boot-example-thymeleaf](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-thymeleaf):Thymeleaf 示例

- [spring-boot-example-scheduler](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-scheduler):定时任务示例

- [spring-boot-example-banner](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-banner):定制 Banner 示例

- [spring-boot-example-command-line-runner](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-command-line-runner):CommandLineRunner 使用示例

- [spring-boot-example-actuator](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-actuator):Spring Boot Actuator 使用示例

- [spring-boot-example-mail](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-mail):邮件服务示例

- [spring-boot-example-jpa](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-jpa):spring data jpa的使用示例

- [spring-boot-example-mybatis](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-mybatis):Mybatis 使用示例

- [spring-boot-example-mybatis-multi-source](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-mybatis-multi-source):Mybatis 使用示例(多数据源)

- [spring-boot-example-redis](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-redis):Redis 使用示例

- [spring-boot-example-mongodb](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-mongodb):Mongodb 使用示例

- [spring-boot-example-null-include-lib-pack](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-null-include-lib-pack):打包时排除依赖包的示例(打包时候将依赖JAR分离)

- [spring-boot-example-shiro](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-shiro):集成Shiro安全框架示例

- [spring-boot-example-elasticsearch](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-elasticsearch):集成 Elasticsearch(全文搜索引擎) 示例

- [spring-boot-example-activemq](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-activemq):集成 Activemq(消息队列)示例

- [spring-boot-example-session](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-session):集成SpringSession示例


Spring Boot 1.x
---
- [spring-boot-example-web](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-web): SpringBoot1.x示例



| Module名称 | Modul 介绍 |
| ----- | ----- |
| [spring-boot-example-activemq](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-activemq) | Spring Boot 集成 ActiveMQ 消息队列示例|
| [spring-boot-example-actuator](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-actuator) | Spring Boot Actuator 使用示例|
| [spring-boot-example-autoconfigure-exclude](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-autoconfigure-exclude) | Spring Boot 排除自动配置示例|
| [spring-boot-example-banner](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-banner) | Spring Boot 定制 Banner 示例|
| [spring-boot-example-command-line-runner](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-command-line-runner) | CommandLineRunner 使用示例|
| [spring-boot-example-elasticsearch](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-elasticsearch) | Spring Boot 集成 Elasticsearch(全文搜索引擎) 示例|
| [spring-boot-example-hello](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-hello) | 第一个SpringBoot项目|
| [spring-boot-example-jasypt](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-jasypt) | Spring Boot 使用jasypt对配置文件加解密|
| [spring-boot-example-jpa](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-jpa) | Spring Boot 集成JPA示例|
| [spring-boot-example-kafka](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-kafka) | Spring Boot 集成 Kafka 消息队列|
| [spring-boot-example-mail](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-mail) | Spring Boot 集成邮件服务示例|
| [spring-boot-example-mongodb](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-mongodb) | Spring Boot 集成 MongoDB示例|
| [spring-boot-example-mybatis](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-mybatis) | Spring Boot 集成 Mybatis示例|
| [spring-boot-example-mybatis-extends](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-mybatis-extends) | Spring Boot Mybatis Mapper继承写法示例|
| [spring-boot-example-mybatis-multi-source](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-mybatis-multi-source) | Spring Boot 集成 Mybatis多数据源示例|
| [spring-boot-example-mybatis-plus](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-mybatis-plus) | Spring Boot 集成 Mybatis Plus 示例|
| [spring-boot-example-mybatis-plus-dynamic-source](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-mybatis-plus-dynamic-source) | Spring Boot 集成 Mybatis Plus多数据源示例|
| [spring-boot-example-null-include-lib-pack](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-null-include-lib-pack) | 打包时排除依赖包的示例(打包时候将依赖JAR分离)|
| [spring-boot-example-redis](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-redis) | Spring Boot 集成 Redis 示例|
| [spring-boot-example-rocketmq](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-rocketmq) | Spring Boot 集成 RocketMQ 消息队列示例|
| [spring-boot-example-scheduler](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-scheduler) | Spring Boot 集成 Scheduler 定时调度框架示例|
| [spring-boot-example-security](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-security) | Spring Boot 集成集成 Spring Security 安全框架示例|
| [spring-boot-example-security-custom](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-security-custom) | Spring Boot 集成集成 Spring Security 安全框架自定义示例|
| [spring-boot-example-session](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-session) | Spring Boot 集成Spring Session (分布式会话)示例|
| [spring-boot-example-shiro](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-shiro) | Spring Boot 集成 Shiro 安全框架示例|
| [spring-boot-example-starter](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-starter) | Spring Boot Starter 自定义实例|
| [spring-boot-example-swagger](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-swagger) | Spring Boot 集成 Swagger API文档工具示例|
| [spring-boot-example-thymeleaf](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-thymeleaf) | Spring Boot 集成 Undertow (web服务器)示例|
| [spring-boot-example-undertow](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-undertow) | Spring Boot Thymeleaf 使用示例|
| [spring-boot-example-web](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-web) | SpringBoot1.x示例|
| [spring-boot-example-webflux](https://github.com/Relucent/spring-boot-example/tree/master/spring-boot-example-webflux) | Spring Boot 集成 Webflux 示例|

50 changes: 47 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,56 @@
<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>yyl</groupId>
<artifactId>spring-boot-example</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>${revision}</version>
<packaging>pom</packaging>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.15.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<revision>1.0.0-SNAPSHOT</revision>
<java.version>1.8</java.version>
<spring-boot.version>2.1.2.RELEASE</spring-boot.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>

<modules>
<module>spring-boot-example-activemq</module>
<module>spring-boot-example-actuator</module>
<module>spring-boot-example-autoconfigure-exclude</module>
<module>spring-boot-example-banner</module>
<module>spring-boot-example-command-line-runner</module>
<module>spring-boot-example-elasticsearch</module>
<module>spring-boot-example-hello</module>
<module>spring-boot-example-jasypt</module>
<module>spring-boot-example-jpa</module>
<module>spring-boot-example-kafka</module>
<module>spring-boot-example-mail</module>
<module>spring-boot-example-mongodb</module>
<module>spring-boot-example-mybatis</module>
<module>spring-boot-example-mybatis-extends</module>
<module>spring-boot-example-mybatis-multi-source</module>
<module>spring-boot-example-mybatis-plus</module>
<module>spring-boot-example-mybatis-plus-dynamic-source</module>
<module>spring-boot-example-null-include-lib-pack</module>
<module>spring-boot-example-redis</module>
<module>spring-boot-example-rocketmq</module>
<module>spring-boot-example-scheduler</module>
<module>spring-boot-example-security</module>
<module>spring-boot-example-security-custom</module>
<module>spring-boot-example-session</module>
<module>spring-boot-example-shiro</module>
<module>spring-boot-example-starter</module>
<module>spring-boot-example-swagger</module>
<module>spring-boot-example-thymeleaf</module>
<module>spring-boot-example-web</module>
<module>spring-boot-example-webflux</module>
</modules>

</project>
23 changes: 6 additions & 17 deletions spring-boot-example-activemq/pom.xml
Original file line number Diff line number Diff line change
@@ -1,28 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>yyl</groupId>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>yyl</groupId>
<artifactId>spring-boot-example</artifactId>
<version>${revision}</version>
</parent>
<artifactId>spring-boot-example-activemq</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>

<name>spring-boot-example-activemq</name>
<description>Demo project for Spring Boot</description>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.2.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>

<dependencies>

<!-- _spring-boot-web -->
Expand Down
24 changes: 7 additions & 17 deletions spring-boot-example-actuator/pom.xml
Original file line number Diff line number Diff line change
@@ -1,28 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>yyl</groupId>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>yyl</groupId>
<artifactId>spring-boot-example</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>spring-boot-example-actuator</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>

<name>spring-boot-example-actuator</name>
<description>Demo project for Spring Boot</description>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.2.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>

<dependencies>

<!-- _spring-boot-web -->
Expand Down
26 changes: 8 additions & 18 deletions spring-boot-example-autoconfigure-exclude/pom.xml
Original file line number Diff line number Diff line change
@@ -1,28 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>yyl</groupId>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>yyl</groupId>
<artifactId>spring-boot-example</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>spring-boot-example-autoconfigure-exclude</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>

<name>spring-boot-example-autoconfigure-exclude</name>
<description>Demo project for Spring Boot</description>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.2.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>

<dependencies>

<!-- _spring-boot-web -->
Expand Down Expand Up @@ -55,4 +45,4 @@
</plugins>
</build>

</project>
</project>
24 changes: 7 additions & 17 deletions spring-boot-example-banner/pom.xml
Original file line number Diff line number Diff line change
@@ -1,28 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>yyl</groupId>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>yyl</groupId>
<artifactId>spring-boot-example</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>spring-boot-example-banner</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>spring-boot-example-banner</name>
<description>Demo project for Spring Boot</description>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.2.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>

<dependencies>

<!-- _spring-boot -->
Expand Down
24 changes: 7 additions & 17 deletions spring-boot-example-command-line-runner/pom.xml
Original file line number Diff line number Diff line change
@@ -1,28 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>yyl</groupId>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>yyl</groupId>
<artifactId>spring-boot-example</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>spring-boot-example-command-line-runner</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>

<name>spring-boot-example-command-line-runner</name>
<description>Demo project for Spring Boot</description>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.2.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>

<dependencies>

<!-- _spring-boot-web -->
Expand Down
27 changes: 9 additions & 18 deletions spring-boot-example-elasticsearch/pom.xml
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>yyl</groupId>
<artifactId>spring-boot-example-elasticsearch</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>

<description>Demo project for Spring Boot</description>

<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.2.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
<groupId>yyl</groupId>
<artifactId>spring-boot-example</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>spring-boot-example-elasticsearch</artifactId>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<name>spring-boot-example-elasticsearch</name>
<description>Demo project for Spring Boot</description>

<dependencies>

Expand Down Expand Up @@ -54,4 +45,4 @@
</plugins>
</build>

</project>
</project>
Loading

0 comments on commit 743e3a3

Please sign in to comment.