From 61fec3451a49249ba90ea50108787c1f9df27997 Mon Sep 17 00:00:00 2001 From: "Yangkai.Shen" <237497819@qq.com> Date: Fri, 14 Dec 2018 23:56:29 +0800 Subject: [PATCH] =?UTF-8?q?:tada:=20spring-boot-demo-websocket=20=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spring-boot-demo-websocket/.gitignore | 25 +++++++ spring-boot-demo-websocket/pom.xml | 75 +++++++++++++++++++ .../SpringBootDemoWebsocketApplication.java | 29 +++++++ .../src/main/resources/application.yml | 4 + ...ringBootDemoWebsocketApplicationTests.java | 17 +++++ 5 files changed, 150 insertions(+) create mode 100644 spring-boot-demo-websocket/.gitignore create mode 100644 spring-boot-demo-websocket/pom.xml create mode 100644 spring-boot-demo-websocket/src/main/java/com/xkcoding/websocket/SpringBootDemoWebsocketApplication.java create mode 100644 spring-boot-demo-websocket/src/main/resources/application.yml create mode 100644 spring-boot-demo-websocket/src/test/java/com/xkcoding/websocket/SpringBootDemoWebsocketApplicationTests.java diff --git a/spring-boot-demo-websocket/.gitignore b/spring-boot-demo-websocket/.gitignore new file mode 100644 index 0000000..82eca33 --- /dev/null +++ b/spring-boot-demo-websocket/.gitignore @@ -0,0 +1,25 @@ +/target/ +!.mvn/wrapper/maven-wrapper.jar + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/build/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ \ No newline at end of file diff --git a/spring-boot-demo-websocket/pom.xml b/spring-boot-demo-websocket/pom.xml new file mode 100644 index 0000000..6a6babe --- /dev/null +++ b/spring-boot-demo-websocket/pom.xml @@ -0,0 +1,75 @@ + + + 4.0.0 + + spring-boot-demo-websocket + 1.0.0-SNAPSHOT + + spring-boot-demo-websocket + Demo project for Spring Boot + + + com.xkcoding + spring-boot-demo + 1.0.0-SNAPSHOT + + + + UTF-8 + UTF-8 + 1.8 + 3.9.1 + + + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-websocket + + + + org.springframework.boot + spring-boot-starter-test + test + + + + com.github.oshi + oshi-core + ${oshi.version} + + + + cn.hutool + hutool-all + + + + com.google.guava + guava + + + + org.projectlombok + lombok + true + + + + + spring-boot-demo-websocket + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/spring-boot-demo-websocket/src/main/java/com/xkcoding/websocket/SpringBootDemoWebsocketApplication.java b/spring-boot-demo-websocket/src/main/java/com/xkcoding/websocket/SpringBootDemoWebsocketApplication.java new file mode 100644 index 0000000..6351666 --- /dev/null +++ b/spring-boot-demo-websocket/src/main/java/com/xkcoding/websocket/SpringBootDemoWebsocketApplication.java @@ -0,0 +1,29 @@ +package com.xkcoding.websocket; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.scheduling.annotation.EnableScheduling; + +/** + *

+ * 启动器 + *

+ * + * @package: com.xkcoding.websocket + * @description: 启动器 + * @author: yangkai.shen + * @date: Created in 2018-12-14 14:58 + * @copyright: Copyright (c) 2018 + * @version: V1.0 + * @modified: yangkai.shen + */ +@SpringBootApplication +@EnableScheduling +public class SpringBootDemoWebsocketApplication { + + public static void main(String[] args) { + SpringApplication.run(SpringBootDemoWebsocketApplication.class, args); + } + +} + diff --git a/spring-boot-demo-websocket/src/main/resources/application.yml b/spring-boot-demo-websocket/src/main/resources/application.yml new file mode 100644 index 0000000..a02fbde --- /dev/null +++ b/spring-boot-demo-websocket/src/main/resources/application.yml @@ -0,0 +1,4 @@ +server: + port: 8080 + servlet: + context-path: /demo \ No newline at end of file diff --git a/spring-boot-demo-websocket/src/test/java/com/xkcoding/websocket/SpringBootDemoWebsocketApplicationTests.java b/spring-boot-demo-websocket/src/test/java/com/xkcoding/websocket/SpringBootDemoWebsocketApplicationTests.java new file mode 100644 index 0000000..d8660b7 --- /dev/null +++ b/spring-boot-demo-websocket/src/test/java/com/xkcoding/websocket/SpringBootDemoWebsocketApplicationTests.java @@ -0,0 +1,17 @@ +package com.xkcoding.websocket; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class SpringBootDemoWebsocketApplicationTests { + + @Test + public void contextLoads() { + } + +} +