| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,5 +7,4 @@ spring.jackson.date-format=yyyy-MM-dd HH:mm:ss | |||
| 7 | 7 | spring.jackson.time-zone=GMT+8 | |
| 8 | 8 | ||
| 9 | 9 | #other | |
| 10 | - banner.location=config/banner-girl.txt | ||
| 11 | - | ||
| 10 | + banner.location=config/banner-girl.txt | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,6 +25,14 @@ | |||
| 25 | 25 | <groupId>org.springframework.boot</groupId> | |
| 26 | 26 | <artifactId>spring-boot-starter-data-jpa</artifactId> | |
| 27 | 27 | </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> | ||
| 28 | 36 | </dependencies> | |
| 29 | 37 | ||
| 30 | 38 | <build> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,10 +11,10 @@ | |||
| 11 | 11 | import org.springframework.data.jpa.repository.config.EnableJpaRepositories; | |
| 12 | 12 | import org.springframework.scheduling.annotation.EnableAsync; | |
| 13 | 13 | import org.springframework.scheduling.annotation.EnableScheduling; | |
| 14 | + import org.springframework.stereotype.Controller; | ||
| 14 | 15 | import org.springframework.transaction.annotation.EnableTransactionManagement; | |
| 15 | 16 | import org.springframework.web.bind.annotation.RequestMapping; | |
| 16 | 17 | import org.springframework.web.bind.annotation.RequestMethod; | |
| 17 | - import org.springframework.web.bind.annotation.RestController; | ||
| 18 | 18 | import org.springframework.web.servlet.ModelAndView; | |
| 19 | 19 | import springfox.documentation.annotations.ApiIgnore; | |
| 20 | 20 | import springfox.documentation.builders.ApiInfoBuilder; | |
@@ -48,7 +48,7 @@ | |||
| 48 | 48 | @EnableScheduling | |
| 49 | 49 | @EnableAsync | |
| 50 | 50 | @EnableCaching | |
| 51 | - @RestController | ||
| 51 | + @Controller | ||
| 52 | 52 | @EnableSwagger2 | |
| 53 | 53 | public class XiaomoMain { | |
| 54 | 54 | ||
@@ -57,13 +57,41 @@ public static void main(String[] args) throws Exception { | |||
| 57 | 57 | } | |
| 58 | 58 | ||
| 59 | 59 | ||
| 60 | - @RequestMapping(value = "/",method = RequestMethod.GET) | ||
| 60 | + /** | ||
| 61 | + * 接口 | ||
| 62 | + * | ||
| 63 | + * @return 接口 | ||
| 64 | + */ | ||
| 65 | + @RequestMapping(value = "/", method = RequestMethod.GET) | ||
| 61 | 66 | @ApiIgnore() | |
| 62 | 67 | @ApiOperation(value = "重定向到api首页") | |
| 63 | - public ModelAndView index(){ | ||
| 68 | + public ModelAndView index() { | ||
| 64 | 69 | return new ModelAndView("redirect:/swagger-ui.html"); | |
| 65 | 70 | } | |
| 66 | 71 | ||
| 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 | + | ||
| 67 | 95 | ||
| 68 | 96 | @Bean | |
| 69 | 97 | public Docket createRestApi() { | |
| Original file line number | Diff line number | Diff 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> | ||
| Original file line number | Diff line number | Diff 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> | ||
| Original file line number | Diff line number | Diff 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> | ||
| Original file line number | Diff line number | Diff 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> | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments