Compare commits
No commits in common. 'dev' and 'master' have entirely different histories.
5 changed files with 3 additions and 75 deletions
@ -0,0 +1,3 @@ |
|||||
|
# springboot-demo |
||||
|
|
||||
|
springboot-demo |
@ -1,39 +0,0 @@ |
|||||
<?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> |
|
||||
|
|
||||
<!--父工程--> |
|
||||
<parent> |
|
||||
<groupId>org.springframework.boot</groupId> |
|
||||
<artifactId>spring-boot-starter-parent</artifactId> |
|
||||
<version>2.3.2.RELEASE</version> |
|
||||
</parent> |
|
||||
|
|
||||
<groupId>cn.wolfcode</groupId> |
|
||||
<artifactId>springboot-docker-demo</artifactId> |
|
||||
<version>1.0-SNAPSHOT</version> |
|
||||
|
|
||||
<properties> |
|
||||
<maven.compiler.source>8</maven.compiler.source> |
|
||||
<maven.compiler.target>8</maven.compiler.target> |
|
||||
</properties> |
|
||||
|
|
||||
|
|
||||
<dependencies> |
|
||||
<dependency> |
|
||||
<groupId>org.springframework.boot</groupId> |
|
||||
<artifactId>spring-boot-starter-web</artifactId> |
|
||||
</dependency> |
|
||||
</dependencies> |
|
||||
|
|
||||
<build> |
|
||||
<plugins> |
|
||||
<plugin> |
|
||||
<groupId>org.springframework.boot</groupId> |
|
||||
<artifactId>spring-boot-maven-plugin</artifactId> |
|
||||
</plugin> |
|
||||
</plugins> |
|
||||
</build> |
|
||||
</project> |
|
@ -1,12 +0,0 @@ |
|||||
package cn.wolfcode; |
|
||||
|
|
||||
import org.springframework.boot.SpringApplication; |
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication; |
|
||||
|
|
||||
@SpringBootApplication |
|
||||
public class SpringBootDockerServer { |
|
||||
|
|
||||
public static void main(String[] args) { |
|
||||
SpringApplication.run(SpringBootDockerServer.class, args); |
|
||||
} |
|
||||
} |
|
@ -1,22 +0,0 @@ |
|||||
package cn.wolfcode.controller; |
|
||||
|
|
||||
import org.springframework.web.bind.annotation.GetMapping; |
|
||||
import org.springframework.web.bind.annotation.PathVariable; |
|
||||
import org.springframework.web.bind.annotation.RequestMapping; |
|
||||
import org.springframework.web.bind.annotation.RestController; |
|
||||
|
|
||||
import java.util.HashMap; |
|
||||
|
|
||||
@RestController |
|
||||
@RequestMapping("/users") |
|
||||
public class UserController { |
|
||||
|
|
||||
@GetMapping("/{name}") |
|
||||
public HashMap<Object, Object> index(@PathVariable String name) { |
|
||||
HashMap<Object, Object> map = new HashMap<>(); |
|
||||
map.put("id", Math.random() + 1); |
|
||||
map.put("name", name); |
|
||||
map.put("test", "test"); |
|
||||
return map; |
|
||||
} |
|
||||
} |
|
@ -1,2 +0,0 @@ |
|||||
server: |
|
||||
port: 9080 |
|
Loading…
Reference in new issue