Skip to content

Commit

Permalink
library-sbweb delete
Browse files Browse the repository at this point in the history
  • Loading branch information
feifei.liu committed Aug 31, 2017
1 parent 345dbf4 commit 5d2e358
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 98 deletions.
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/");
//// }
//}
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,19 @@
import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.messaging.handler.annotation.SendTo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
* Created by liuff on 2017/4/6.
*/
@Controller
public class WsController {
@RequestMapping("/ws")
public ModelAndView ws(ModelAndView mav) {
mav.setViewName("/ws");
return mav;
}

@MessageMapping("/welcome")
@SendTo("/topic/getResponse")
Expand Down
12 changes: 6 additions & 6 deletions library-sboot/src/main/resources/application-jpa.properties
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
spring.datasource.driver-class-name=org.postgresql.Driver
spring.datasource.url=jdbc:postgresql://192.168.106.129:5432/postgres
spring.datasource.username=postgres
spring.datasource.password=postgres
#spring.datasource.driver-class-name=org.postgresql.Driver
#spring.datasource.url=jdbc:postgresql://192.168.10.52:5432/postgres
#spring.datasource.url=jdbc:postgresql://192.168.106.129:5432/postgres
#spring.datasource.username=postgres
#spring.datasource.password=baihui
#spring.datasource.password=postgres
spring.datasource.driver-class-name=org.postgresql.Driver
spring.datasource.url=jdbc:postgresql://192.168.16.58:5432/test
spring.datasource.username=postgres
spring.datasource.password=baihui

spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
Expand Down
20 changes: 10 additions & 10 deletions library-sboot/src/main/resources/application-thymeleaf.properties
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.
4 changes: 3 additions & 1 deletion library-sboot/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ server.port=8800
book.author=feifei.liu
book.name=Spring Boot

spring.profiles.active=author,logback,thymeleaf,jpa
spring.profiles.active=author,logback,thymeleaf,jpa
#spring.mvc.static-path-pattern=/**
#spring.resources.static-locations=classpath:/views/,classpath:/static/
23 changes: 0 additions & 23 deletions library-sbweb/pom.xml

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions library-sbweb/src/main/resources/application.properties

This file was deleted.

1 change: 0 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<module>library-spring</module>
<module>library-sboot</module>
<module>library-game</module>
<module>library-sbweb</module>
</modules>
<packaging>pom</packaging>

Expand Down

0 comments on commit 5d2e358

Please sign in to comment.