-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
feifei.liu
committed
Aug 31, 2017
1 parent
345dbf4
commit 5d2e358
Showing
9 changed files
with
53 additions
and
98 deletions.
There are no files selected for viewing
48 changes: 27 additions & 21 deletions
48
library-sboot/src/main/java/com/mine/library/sboot/javaconfig/WebMvcConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,27 @@ | ||
package com.mine.library.sboot.javaconfig; | ||
|
||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.data.web.config.EnableSpringDataWebSupport; | ||
import org.springframework.web.servlet.config.annotation.EnableWebMvc; | ||
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; | ||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; | ||
|
||
/** | ||
* Created by liuff on 2017/4/7. | ||
*/ | ||
@Configuration | ||
@EnableWebMvc | ||
@EnableSpringDataWebSupport | ||
public class WebMvcConfig extends WebMvcConfigurerAdapter{ | ||
@Override | ||
public void addViewControllers(ViewControllerRegistry registry) { | ||
super.addViewControllers(registry); | ||
registry.addViewController("/ws").setViewName("/ws"); | ||
} | ||
} | ||
//package com.mine.library.sboot.javaconfig; | ||
// | ||
//import org.springframework.context.annotation.Configuration; | ||
//import org.springframework.data.web.config.EnableSpringDataWebSupport; | ||
//import org.springframework.web.servlet.config.annotation.EnableWebMvc; | ||
//import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; | ||
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; | ||
// | ||
///** | ||
// * Created by liuff on 2017/4/7. | ||
// */ | ||
//@Configuration | ||
//@EnableWebMvc | ||
//@EnableSpringDataWebSupport | ||
//public class WebMvcConfig extends WebMvcConfigurerAdapter{ | ||
// @Override | ||
// public void addViewControllers(ViewControllerRegistry registry) { | ||
// super.addViewControllers(registry); | ||
// registry.addViewController("/ws").setViewName("/ws"); | ||
// } | ||
// | ||
//// @Override | ||
//// public void addResourceHandlers(ResourceHandlerRegistry registry) { | ||
//// registry.addResourceHandler("/static/**","/views/**") | ||
//// .addResourceLocations("/static/","/views/"); | ||
//// } | ||
//} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
library-sboot/src/main/resources/application-jpa.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 10 additions & 10 deletions
20
library-sboot/src/main/resources/application-thymeleaf.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
# THYMELEAF (ThymeleafAutoConfiguration) | ||
#是否开启模板缓存,默认是开启,开发时请关闭 | ||
#\uFFFD\u01F7\uFFFD\uFFFD\uFFFD\u0123\uFFFD\u5EFA\uFFFD\u68EC\u012C\uFFFD\uFFFD\uFFFD\u01FF\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u02B1\uFFFD\uFFFD\u0631\uFFFD | ||
spring.thymeleaf.cache=false | ||
spring.thymeleaf.check-template=true | ||
spring.thymeleaf.check-template-location=true | ||
#模板的媒体类型 | ||
spring.thymeleaf.check-template=true | ||
spring.thymeleaf.check-template-location=true | ||
#\u0123\uFFFD\uFFFD\uFFFD\u00FD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD | ||
spring.thymeleaf.content-type=text/html;charset=UTF-8 | ||
spring.thymeleaf.enabled=true | ||
spring.thymeleaf.enabled=true | ||
#spring.thymeleaf.excluded-view-names= # Comma-separated list of view names that should be excluded from resolution. | ||
#模板模式设置,默认为HTML5 | ||
#\u0123\uFFFD\uFFFD\u0123\u02BD\uFFFD\uFFFD\uFFFD\u00E3\uFFFD\u012C\uFFFD\uFFFD\u03AAHTML5 | ||
spring.thymeleaf.mode=HTML5 | ||
#前缀设置,Spring Boot默认模板,放置在classpath:/templates/目录下 | ||
#\u01F0\u05FA\uFFFD\uFFFD\uFFFD\u00E3\uFFFDSpring Boot\u012C\uFFFD\uFFFD\u0123\uFFFD\u58EC\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFDclasspath:/templates/\u013F\u00BC\uFFFD\uFFFD | ||
spring.thymeleaf.prefix=classpath:/views/ | ||
#后缀设置,默认为html | ||
spring.thymeleaf.suffix=.html | ||
#模板的编码设置,默认为UTF-8 | ||
#\uFFFD\uFFFD\u05FA\uFFFD\uFFFD\uFFFD\u00E3\uFFFD\u012C\uFFFD\uFFFD\u03AAhtml | ||
spring.thymeleaf.suffix=.html | ||
#\u0123\uFFFD\uFFFD\u0131\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u00E3\uFFFD\u012C\uFFFD\uFFFD\u03AAUTF-8 | ||
spring.thymeleaf.encoding=utf-8 | ||
#spring.thymeleaf.template-resolver-order= # Order of the template resolver in the chain. | ||
#spring.thymeleaf.view-names= # Comma-separated list of view names that can be resolved. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
library-sbweb/src/main/java/com/mine/library/sbweb/LibraryApplication.java
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters