Skip to content

Commit 61fec34

Browse files
committed
🎉 spring-boot-demo-websocket 初始化
1 parent ef36fd3 commit 61fec34

File tree

5 files changed

+150
-0
lines changed

5 files changed

+150
-0
lines changed

spring-boot-demo-websocket/.gitignore

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/target/
2+
!.mvn/wrapper/maven-wrapper.jar
3+
4+
### STS ###
5+
.apt_generated
6+
.classpath
7+
.factorypath
8+
.project
9+
.settings
10+
.springBeans
11+
.sts4-cache
12+
13+
### IntelliJ IDEA ###
14+
.idea
15+
*.iws
16+
*.iml
17+
*.ipr
18+
19+
### NetBeans ###
20+
/nbproject/private/
21+
/build/
22+
/nbbuild/
23+
/dist/
24+
/nbdist/
25+
/.nb-gradle/

spring-boot-demo-websocket/pom.xml

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
6+
<artifactId>spring-boot-demo-websocket</artifactId>
7+
<version>1.0.0-SNAPSHOT</version>
8+
9+
<name>spring-boot-demo-websocket</name>
10+
<description>Demo project for Spring Boot</description>
11+
12+
<parent>
13+
<groupId>com.xkcoding</groupId>
14+
<artifactId>spring-boot-demo</artifactId>
15+
<version>1.0.0-SNAPSHOT</version>
16+
</parent>
17+
18+
<properties>
19+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
20+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
21+
<java.version>1.8</java.version>
22+
<oshi.version>3.9.1</oshi.version>
23+
</properties>
24+
25+
<dependencies>
26+
<dependency>
27+
<groupId>org.springframework.boot</groupId>
28+
<artifactId>spring-boot-starter-web</artifactId>
29+
</dependency>
30+
31+
<dependency>
32+
<groupId>org.springframework.boot</groupId>
33+
<artifactId>spring-boot-starter-websocket</artifactId>
34+
</dependency>
35+
36+
<dependency>
37+
<groupId>org.springframework.boot</groupId>
38+
<artifactId>spring-boot-starter-test</artifactId>
39+
<scope>test</scope>
40+
</dependency>
41+
42+
<dependency>
43+
<groupId>com.github.oshi</groupId>
44+
<artifactId>oshi-core</artifactId>
45+
<version>${oshi.version}</version>
46+
</dependency>
47+
48+
<dependency>
49+
<groupId>cn.hutool</groupId>
50+
<artifactId>hutool-all</artifactId>
51+
</dependency>
52+
53+
<dependency>
54+
<groupId>com.google.guava</groupId>
55+
<artifactId>guava</artifactId>
56+
</dependency>
57+
58+
<dependency>
59+
<groupId>org.projectlombok</groupId>
60+
<artifactId>lombok</artifactId>
61+
<optional>true</optional>
62+
</dependency>
63+
</dependencies>
64+
65+
<build>
66+
<finalName>spring-boot-demo-websocket</finalName>
67+
<plugins>
68+
<plugin>
69+
<groupId>org.springframework.boot</groupId>
70+
<artifactId>spring-boot-maven-plugin</artifactId>
71+
</plugin>
72+
</plugins>
73+
</build>
74+
75+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package com.xkcoding.websocket;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
import org.springframework.scheduling.annotation.EnableScheduling;
6+
7+
/**
8+
* <p>
9+
* 启动器
10+
* </p>
11+
*
12+
* @package: com.xkcoding.websocket
13+
* @description: 启动器
14+
* @author: yangkai.shen
15+
* @date: Created in 2018-12-14 14:58
16+
* @copyright: Copyright (c) 2018
17+
* @version: V1.0
18+
* @modified: yangkai.shen
19+
*/
20+
@SpringBootApplication
21+
@EnableScheduling
22+
public class SpringBootDemoWebsocketApplication {
23+
24+
public static void main(String[] args) {
25+
SpringApplication.run(SpringBootDemoWebsocketApplication.class, args);
26+
}
27+
28+
}
29+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
server:
2+
port: 8080
3+
servlet:
4+
context-path: /demo
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.xkcoding.websocket;
2+
3+
import org.junit.Test;
4+
import org.junit.runner.RunWith;
5+
import org.springframework.boot.test.context.SpringBootTest;
6+
import org.springframework.test.context.junit4.SpringRunner;
7+
8+
@RunWith(SpringRunner.class)
9+
@SpringBootTest
10+
public class SpringBootDemoWebsocketApplicationTests {
11+
12+
@Test
13+
public void contextLoads() {
14+
}
15+
16+
}
17+

0 commit comments

Comments
 (0)