Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Mikite
spring-boot-examples
提交
b254a27a
S
spring-boot-examples
项目概览
Mikite
/
spring-boot-examples
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
1
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,发现更多精彩内容 >>
提交
b254a27a
编写于
9月 12, 2017
作者:
微笑很纯洁
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add spring-boot-thymeleaf
上级
70d15853
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
83 addition
and
0 deletion
+83
-0
README.md
README.md
+1
-0
README_EN.md
README_EN.md
+1
-0
spring-boot-thymeleaf/pom.xml
spring-boot-thymeleaf/pom.xml
+35
-0
spring-boot-thymeleaf/src/main/java/com/neo/thymeleaf/HelloController.java
...leaf/src/main/java/com/neo/thymeleaf/HelloController.java
+15
-0
spring-boot-thymeleaf/src/main/java/com/neo/thymeleaf/ThymeleafApplication.java
...src/main/java/com/neo/thymeleaf/ThymeleafApplication.java
+20
-0
spring-boot-thymeleaf/src/main/resources/application.properties
...-boot-thymeleaf/src/main/resources/application.properties
+1
-0
spring-boot-thymeleaf/src/main/resources/templates/hello.html
...ng-boot-thymeleaf/src/main/resources/templates/hello.html
+10
-0
未找到文件。
README.md
浏览文件 @
b254a27a
...
...
@@ -21,6 +21,7 @@ Spring boot使用的各种示例,以最简单、最实用为标准
-
[
spring-boot-multi-mongodb
](
https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-multi-mongodb
)
:spring boot和mongodb多数据源的使用
-
[
spring-boot-package-war
](
https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-package-war
)
:spring-boot打包成war包示例
-
[
spring-boot-shiro
](
https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-shiro
)
:springboot 整合shiro rbac示例
-
[
spring-boot-thymeleaf
](
https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-thymeleaf
)
:简单 spring boot thymeleaf 脚手架
-
[
Favorites-web
](
https://github.com/cloudfavorites/favorites-web
)
:云收藏(springboot实战开源软件)
...
...
README_EN.md
浏览文件 @
b254a27a
...
...
@@ -22,4 +22,5 @@ Spring Boot Examples, Use the simplest and most useful scene demo.
-
[
spring-boot-multi-mongodb
](
https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-multi-mongodb
)
:Spring Boot + multiMongodb
-
[
spring-boot-package-war
](
https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-package-war
)
:Spring Boot package war
-
[
spring-boot-shiro
](
https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-shiro
)
:spring boot shiro rbac demo
-
[
spring-boot-thymeleaf
](
https://github.com/ityouknow/spring-boot-examples/tree/master/spring-boot-thymeleaf
)
:simple spring boot thymeleaf demo
-
[
Favorites-web
](
https://github.com/cloudfavorites/favorites-web
)
:Open source projects developed using Spring Boot
spring-boot-thymeleaf/pom.xml
0 → 100644
浏览文件 @
b254a27a
<?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>
<artifactId>
spring-boot-thymeleaf
</artifactId>
<name>
spring-boot-thymeleaf
</name>
<description>
spring-boot-thymeleaf
</description>
<parent>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<version>
1.5.6.RELEASE
</version>
</parent>
<properties>
<java.version>
1.7
</java.version>
</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-thymeleaf
</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
spring-boot-thymeleaf/src/main/java/com/neo/thymeleaf/HelloController.java
0 → 100644
浏览文件 @
b254a27a
package
com.neo.thymeleaf
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
@Controller
public
class
HelloController
{
@RequestMapping
(
"/hello"
)
public
String
hello
(
Model
model
,
@RequestParam
(
value
=
"name"
,
required
=
false
,
defaultValue
=
"World"
)
String
name
)
{
model
.
addAttribute
(
"name"
,
name
);
return
"hello"
;
}
}
spring-boot-thymeleaf/src/main/java/com/neo/thymeleaf/ThymeleafApplication.java
0 → 100644
浏览文件 @
b254a27a
package
com.neo.thymeleaf
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.boot.web.support.SpringBootServletInitializer
;
@SpringBootApplication
public
class
ThymeleafApplication
extends
SpringBootServletInitializer
{
@Override
protected
SpringApplicationBuilder
configure
(
SpringApplicationBuilder
application
)
{
return
application
.
sources
(
ThymeleafApplication
.
class
);
}
public
static
void
main
(
String
[]
args
)
throws
Exception
{
SpringApplication
.
run
(
ThymeleafApplication
.
class
,
args
);
}
}
spring-boot-thymeleaf/src/main/resources/application.properties
0 → 100644
浏览文件 @
b254a27a
spring.thymeleaf.cache
:
false
\ No newline at end of file
spring-boot-thymeleaf/src/main/resources/templates/hello.html
0 → 100644
浏览文件 @
b254a27a
<!DOCTYPE html>
<html
lang=
"en"
xmlns:th=
"http://www.thymeleaf.org"
>
<head>
<meta
charset=
"UTF-8"
/>
<title>
Hello Thymeleaf!
</title>
</head>
<body>
<p
th:text=
"'Hello, ' + ${name} + '!'"
/>
</body>
</html>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录