Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
老丢丢
SpringBoot2Demo
提交
d901aba2
S
SpringBoot2Demo
项目概览
老丢丢
/
SpringBoot2Demo
通知
3
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SpringBoot2Demo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
d901aba2
编写于
10月 28, 2020
作者:
Q
qinxiaodong@pannk.com
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
first application
上级
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
163 addition
and
0 deletion
+163
-0
.gitignore
.gitignore
+26
-0
README.md
README.md
+3
-0
first-application/pom.xml
first-application/pom.xml
+21
-0
first-application/src/main/java/com/pannk/demo/firstapplication/FirstApplication.java
...ava/com/pannk/demo/firstapplication/FirstApplication.java
+28
-0
first-application/src/main/java/com/pannk/demo/firstapplication/HelloController.java
...java/com/pannk/demo/firstapplication/HelloController.java
+18
-0
first-application/src/main/resources/application-dev.yml
first-application/src/main/resources/application-dev.yml
+0
-0
first-application/src/main/resources/application.yml
first-application/src/main/resources/application.yml
+8
-0
pom.xml
pom.xml
+59
-0
未找到文件。
.gitignore
0 → 100644
浏览文件 @
d901aba2
# Compiledclass file
*.class
target
logs/
#Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java(J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.ear
*.zip
*.tar.gz
*.rar
*.iml
.idea
#virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
\ No newline at end of file
README.md
0 → 100644
浏览文件 @
d901aba2
## SpringBoot2课程代码
### first-application
\ No newline at end of file
first-application/pom.xml
0 → 100644
浏览文件 @
d901aba2
<?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"
>
<parent>
<artifactId>
springboot-demo
</artifactId>
<groupId>
com.pannk
</groupId>
<version>
1.0
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
first-application
</artifactId>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
first-application/src/main/java/com/pannk/demo/firstapplication/FirstApplication.java
0 → 100644
浏览文件 @
d901aba2
package
com.pannk.demo.firstapplication
;
import
org.springframework.boot.Banner
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* 第一个SpringBoot程序
* @author 老丢丢
*/
@SpringBootApplication
@RestController
public
class
FirstApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
application
=
new
SpringApplication
(
FirstApplication
.
class
);
application
.
setBannerMode
(
Banner
.
Mode
.
OFF
);
application
.
run
();
}
@GetMapping
(
"/index"
)
public
String
index
(){
return
"Hello,Spring Boot"
;
}
}
first-application/src/main/java/com/pannk/demo/firstapplication/HelloController.java
0 → 100644
浏览文件 @
d901aba2
package
com.pannk.demo.firstapplication
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* Created by wolf on 20-10-28.
*/
@RestController
@RequestMapping
(
"/hello"
)
public
class
HelloController
{
@GetMapping
(
"/say"
)
public
String
sayHello
(
String
name
){
return
"Hello,"
+
name
;
}
}
first-application/src/main/resources/application-dev.yml
0 → 100644
浏览文件 @
d901aba2
first-application/src/main/resources/application.yml
0 → 100644
浏览文件 @
d901aba2
server
:
port
:
8888
servlet
:
context-path
:
/first
spring
:
application
:
name
:
firstApplication
\ No newline at end of file
pom.xml
0 → 100644
浏览文件 @
d901aba2
<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.pannk
</groupId>
<artifactId>
springboot-demo
</artifactId>
<packaging>
pom
</packaging>
<version>
1.0
</version>
<description>
SpringBoot2课程demo
</description>
<modules>
<module>
first-application
</module>
</modules>
<parent>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<version>
2.2.10.RELEASE
</version>
<relativePath/>
</parent>
<properties>
<java.version>
1.8
</java.version>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<project.reporting.outputEncoding>
UTF-8
</project.reporting.outputEncoding>
</properties>
<dependencies>
</dependencies>
<!-- 构建过程的设置 Build Settings -->
<build>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-compiler-plugin
</artifactId>
<version>
3.8.1
</version>
<configuration>
<source>
${java.version}
</source>
<target>
${java.version}
</target>
</configuration>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-surefire-plugin
</artifactId>
<version>
2.22.2
</version>
<configuration>
<skipTests>
true
</skipTests>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>
public
</id>
<name>
Nexus aliyun
</name>
<url>
http://maven.aliyun.com/nexus/content/groups/public
</url>
</repository>
</repositories>
</project>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录