FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

添加模板 · JavaCodeMood/SpringBootUnity@5e69137 · GitHub

Repository navigation

Commit 5e69137

Browse files
committed
添加模板
1 parent 5ab3551 commit 5e69137

7 files changed

Lines changed: 97 additions & 6 deletions

File tree

‎velocity/src/main/resources/config/application.properties‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@ spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
77
spring.jackson.time-zone=GMT+8
88

99
#other
10-
banner.location=config/banner-girl.txt
11-
10+
banner.location=config/banner-girl.txt

‎website/pom.xml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@
2525
<groupId>org.springframework.boot</groupId>
2626
<artifactId>spring-boot-starter-data-jpa</artifactId>
2727
</dependency>
28+
<dependency>
29+
<groupId>org.springframework.boot</groupId>
30+
<artifactId>spring-boot-starter-velocity</artifactId>
31+
</dependency>
32+
<dependency>
33+
<groupId>org.springframework.boot</groupId>
34+
<artifactId>spring-boot-starter-security</artifactId>
35+
</dependency>
2836
</dependencies>
2937

3038
<build>

‎website/src/main/java/info/xiaomo/website/XiaomoMain.java‎

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
1212
import org.springframework.scheduling.annotation.EnableAsync;
1313
import org.springframework.scheduling.annotation.EnableScheduling;
14+
import org.springframework.stereotype.Controller;
1415
import org.springframework.transaction.annotation.EnableTransactionManagement;
1516
import org.springframework.web.bind.annotation.RequestMapping;
1617
import org.springframework.web.bind.annotation.RequestMethod;
17-
import org.springframework.web.bind.annotation.RestController;
1818
import org.springframework.web.servlet.ModelAndView;
1919
import springfox.documentation.annotations.ApiIgnore;
2020
import springfox.documentation.builders.ApiInfoBuilder;
@@ -48,7 +48,7 @@
4848
@EnableScheduling
4949
@EnableAsync
5050
@EnableCaching
51-
@RestController
51+
@Controller
5252
@EnableSwagger2
5353
public class XiaomoMain {
5454

@@ -57,13 +57,41 @@ public static void main(String[] args) throws Exception {
5757
}
5858

5959

60-
@RequestMapping(value = "/",method = RequestMethod.GET)
60+
/**
61+
* 接口
62+
*
63+
* @return 接口
64+
*/
65+
@RequestMapping(value = "/", method = RequestMethod.GET)
6166
@ApiIgnore()
6267
@ApiOperation(value = "重定向到api首页")
63-
public ModelAndView index(){
68+
public ModelAndView index() {
6469
return new ModelAndView("redirect:/swagger-ui.html");
6570
}
6671

72+
/**
73+
* 后台
74+
*
75+
* @return 后台
76+
*/
77+
@RequestMapping(value = "/admin", method = RequestMethod.GET)
78+
public String admin() {
79+
return "admin/index";
80+
}
81+
82+
/**
83+
* 前台
84+
*
85+
* @return 前台
86+
*/
87+
@RequestMapping(value = "/web", method = RequestMethod.GET)
88+
public String web() {
89+
return "web/index";
90+
}
91+
92+
93+
94+
6795

6896
@Bean
6997
public Docket createRestApi() {
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport"
6+
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
7+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
8+
<title>Document</title>
9+
</head>
10+
<body>
11+
后台
12+
</body>
13+
</html>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport"
6+
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
7+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
8+
<title>Document</title>
9+
</head>
10+
<body>
11+
12+
</body>
13+
</html>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport"
6+
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
7+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
8+
<title>Document</title>
9+
</head>
10+
<body>
11+
前台
12+
</body>
13+
</html>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport"
6+
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
7+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
8+
<title>Document</title>
9+
</head>
10+
<body>
11+
<form method="post">
12+
<div><label> 用户名 : <input type="text" name="username"/> </label></div>
13+
<div><label> 密 码 : <input type="password" name="password"/> </label></div>
14+
<div><input type="submit" value="登录"/></div>
15+
</form>
16+
</body>
17+
</html>

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL