Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
灰非灰乀
spring-boot-examples
提交
6391aece
S
spring-boot-examples
项目概览
灰非灰乀
/
spring-boot-examples
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-boot-examples
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6391aece
编写于
3月 13, 2018
作者:
微笑很纯洁
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add Spring Boot 2.0 Hello
上级
146e37c1
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
112 addition
and
3 deletion
+112
-3
README.md
README.md
+1
-2
README_EN.md
README_EN.md
+2
-1
spring-boot-hello/pom.xml
spring-boot-hello/pom.xml
+66
-0
spring-boot-hello/src/main/java/com/neo/HelloApplication.java
...ng-boot-hello/src/main/java/com/neo/HelloApplication.java
+12
-0
spring-boot-hello/src/main/java/com/neo/controller/HelloController.java
...llo/src/main/java/com/neo/controller/HelloController.java
+13
-0
spring-boot-hello/src/main/resources/application.properties
spring-boot-hello/src/main/resources/application.properties
+0
-0
spring-boot-hello/src/test/java/com/neo/HelloApplicationTests.java
...ot-hello/src/test/java/com/neo/HelloApplicationTests.java
+18
-0
未找到文件。
README.md
浏览文件 @
6391aece
...
...
@@ -13,10 +13,9 @@ Spring Boot使用的各种示例,以最简单、最实用为标准
**示例代码**
-
[
spring-boot-hello
](
https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-hello
)
:Spring Boot 2.0 Hello World 示例
-
[
spring-boot-banner
](
https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-banner
)
:Spring Boot 定制 Banner 示例
**参考文章**
-
[
Spring Boot 2.0(一):【重磅】Spring Boot 2.0权威发布
](
http://www.ityouknow.com/springboot/2018/03/01/spring-boot-2.0.html
)
...
...
README_EN.md
浏览文件 @
6391aece
...
...
@@ -11,8 +11,9 @@ Spring Boot Examples, Use the simplest and most useful scene demo.
## Spring Boot 2.0
-
[
spring-boot-banner
](
https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-banner
)
:Spring Boot Customized Banner
-
[
spring-boot-hello
](
https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-hello
)
:Spring Boot 2.0 Hello World Demo
-
[
spring-boot-banner
](
https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-banner
)
:Spring Boot Customized Banner
---
...
...
spring-boot-hello/pom.xml
0 → 100644
浏览文件 @
6391aece
<?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>
com.neo
</groupId>
<artifactId>
spring-boot-hello
</artifactId>
<version>
1.0
</version>
<packaging>
jar
</packaging>
<name>
spring-boot-hello
</name>
<description>
Demo project for Spring Boot
</description>
<parent>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<version>
2.0.0.RELEASE
</version>
</parent>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<java.version>
1.8
</java.version>
<docker.image.prefix>
springboot
</docker.image.prefix>
</properties>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
<!-- Docker maven plugin -->
<plugin>
<groupId>
com.spotify
</groupId>
<artifactId>
docker-maven-plugin
</artifactId>
<version>
1.0.0
</version>
<configuration>
<imageName>
${docker.image.prefix}/${project.artifactId}
</imageName>
<dockerDirectory>
src/main/docker
</dockerDirectory>
<resources>
<resource>
<targetPath>
/
</targetPath>
<directory>
${project.build.directory}
</directory>
<include>
${project.build.finalName}.jar
</include>
</resource>
</resources>
</configuration>
</plugin>
<!-- Docker maven plugin -->
</plugins>
</build>
</project>
spring-boot-hello/src/main/java/com/neo/HelloApplication.java
0 → 100644
浏览文件 @
6391aece
package
com.neo
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
@SpringBootApplication
public
class
HelloApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
HelloApplication
.
class
,
args
);
}
}
spring-boot-hello/src/main/java/com/neo/controller/HelloController.java
0 → 100644
浏览文件 @
6391aece
package
com.neo.controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
public
class
HelloController
{
@RequestMapping
(
"/"
)
public
String
index
()
{
return
"Hello Spring Boot 2.0!"
;
}
}
\ No newline at end of file
spring-boot-hello/src/main/resources/application.properties
0 → 100644
浏览文件 @
6391aece
spring-boot-hello/src/test/java/com/neo/HelloApplicationTests.java
0 → 100644
浏览文件 @
6391aece
package
com.neo
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.test.context.junit4.SpringRunner
;
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
public
class
HelloApplicationTests
{
@Test
public
void
contextLoads
()
{
System
.
out
.
println
(
"Hello Spring Boot 2.0!"
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录