Skip to content

Commit 6877212

Browse files
authored
Merge pull request #1 from wssll789/master
Init project
2 parents e3fe1b0 + c3c63b0 commit 6877212

6 files changed

Lines changed: 155 additions & 19 deletions

File tree

.gitignore

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
1-
# Compiled class file
2-
*.class
1+
target/
2+
!.mvn/wrapper/maven-wrapper.jar
33

4-
# Log file
5-
*.log
4+
### STS ###
5+
.apt_generated
6+
.classpath
7+
.factorypath
8+
.project
9+
.settings
10+
.springBeans
11+
.sts4-cache
612

7-
# BlueJ files
8-
*.ctxt
13+
### IntelliJ IDEA ###
14+
.idea
15+
*.iws
16+
*.iml
17+
*.ipr
918

10-
# Mobile Tools for Java (J2ME)
11-
.mtj.tmp/
12-
13-
# Package Files #
14-
*.jar
15-
*.war
16-
*.ear
17-
*.zip
18-
*.tar.gz
19-
*.rar
20-
21-
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
22-
hs_err_pid*
19+
### NetBeans ###
20+
nbproject/private/
21+
build/
22+
nbbuild/
23+
dist/
24+
nbdist/
25+
.nb-gradle/

pom.xml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
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+
<groupId>com.abstractfive</groupId>
7+
<artifactId>java</artifactId>
8+
<version>0.0.1-SNAPSHOT</version>
9+
<packaging>jar</packaging>
10+
11+
<name>java</name>
12+
<description>Demo project for Spring Boot</description>
13+
14+
<parent>
15+
<groupId>org.springframework.boot</groupId>
16+
<artifactId>spring-boot-starter-parent</artifactId>
17+
<version>2.0.0.RELEASE</version>
18+
<relativePath/> <!-- lookup parent from repository -->
19+
</parent>
20+
21+
<properties>
22+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
23+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
24+
<java.version>1.8</java.version>
25+
</properties>
26+
27+
<dependencies>
28+
<!-- spring boot -->
29+
<dependency>
30+
<groupId>org.springframework.boot</groupId>
31+
<artifactId>spring-boot-starter-web</artifactId>
32+
</dependency>
33+
<dependency>
34+
<groupId>org.springframework.boot</groupId>
35+
<artifactId>spring-boot-starter-test</artifactId>
36+
<scope>test</scope>
37+
</dependency>
38+
39+
<!-- spring boot 邮件服务 -->
40+
<!--<dependency>-->
41+
<!--<groupId>org.springframework.boot</groupId>-->
42+
<!--<artifactId>spring-boot-starter-mail</artifactId>-->
43+
<!--</dependency>-->
44+
<!-- spring boot mybatis -->
45+
<!--<dependency>-->
46+
<!--<groupId>org.mybatis.spring.boot</groupId>-->
47+
<!--<artifactId>mybatis-spring-boot-starter</artifactId>-->
48+
<!--<version>1.3.0</version>-->
49+
<!--</dependency>-->
50+
<!--<dependency>-->
51+
<!--<groupId>mysql</groupId>-->
52+
<!--<artifactId>mysql-connector-java</artifactId>-->
53+
<!--</dependency>-->
54+
55+
<!-- jedis服务 -->
56+
<!--<dependency>-->
57+
<!--<groupId>redis.clients</groupId>-->
58+
<!--<artifactId>jedis</artifactId>-->
59+
<!--<version>2.9.0</version>-->
60+
<!--</dependency>-->
61+
62+
<!-- 阿里json解析 -->
63+
<dependency>
64+
<groupId>com.alibaba</groupId>
65+
<artifactId>fastjson</artifactId>
66+
<version>1.2.32</version>
67+
</dependency>
68+
69+
</dependencies>
70+
71+
<build>
72+
<plugins>
73+
<plugin>
74+
<groupId>org.springframework.boot</groupId>
75+
<artifactId>spring-boot-maven-plugin</artifactId>
76+
</plugin>
77+
</plugins>
78+
</build>
79+
80+
81+
</project>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package com.abstractfive;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
6+
@SpringBootApplication
7+
public class JavaApplication {
8+
9+
public static void main(String[] args) {
10+
SpringApplication.run(JavaApplication.class, args);
11+
}
12+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.abstractfive.controller;
2+
3+
import org.springframework.web.bind.annotation.PathVariable;
4+
import org.springframework.web.bind.annotation.RequestMapping;
5+
import org.springframework.web.bind.annotation.RestController;
6+
7+
/**
8+
* test
9+
* Created by 张老西 on 2018/4/3.
10+
*/
11+
@RestController
12+
@RequestMapping(value = "/test")
13+
public class TestController {
14+
15+
/**
16+
* 测试一哈
17+
* @param userName
18+
* @return
19+
*/
20+
@RequestMapping("/{userName}")
21+
public String test(@PathVariable String userName){
22+
return userName;
23+
}
24+
}

src/main/resources/application.properties

Whitespace-only changes.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.abstractfive;
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 JavaApplicationTests {
11+
12+
@Test
13+
public void contextLoads() {
14+
}
15+
16+
}

0 commit comments

Comments
 (0)