上一页 1 ··· 41 42 43 44 45 46 47 48 49 ··· 100 下一页
摘要: 看源码 WebMvcAutoConfiguration.java 优先级:访问:localhost:8080/ resources > static >public 关闭模板缓存 spring: thymeleaf: cache: false https://www.cnblogs.com/wt70 阅读全文
posted @ 2020-07-20 19:14 市丸银 阅读(161) 评论(0) 推荐(0)
摘要: 一、优先级 1、文件路径 file:./config/ file:./config/*/ file:./ classpath:/config/ classpath:/ 2、优先级 二、配置不同的开发环境 application.yml spring: profiles: active: online 阅读全文
posted @ 2020-07-20 17:41 市丸银 阅读(173) 评论(0) 推荐(0)
摘要: 官方文档 https://docs.spring.io/spring-boot/docs/2.3.1.RELEASE/reference/html/spring-boot-features.html#boot-features-external-config-yaml 一、基础 1、注意事项 key 阅读全文
posted @ 2020-07-20 17:17 市丸银 阅读(210) 评论(0) 推荐(0)
摘要: https://www.cnblogs.com/zhihaospace/p/12342622.html 配置失败用空再试 一、maven <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/PO 阅读全文
posted @ 2020-07-20 11:33 市丸银 阅读(173) 评论(0) 推荐(0)
摘要: json字符串 一、基础 1、序列化 对象->字符串 python dumps() js string** 2、反序列化 字符串->对象 python loads() js parse 二、jackson mvaen依赖 <dependency> <groupId>com.fasterxml.jac 阅读全文
posted @ 2020-07-20 07:41 市丸银 阅读(211) 评论(0) 推荐(0)
摘要: 一、正常乱码过滤器 web.xml <filter> <filter-name>encoding</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <in 阅读全文
posted @ 2020-07-20 07:29 市丸银 阅读(185) 评论(0) 推荐(0)
摘要: 非resful格式 传递普通参数 @GetMapping("/t1") public String test(@RequestParam("name") String name, Model model){ System.out.println(name); model.addAttribute(" 阅读全文
posted @ 2020-07-20 07:16 市丸银 阅读(155) 评论(0) 推荐(0)
摘要: 一、没有视图解析器的情况(忽略,不用) 视图解析器 <!-- 视图解析器 --> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" id="internalResourceViewResol 阅读全文
posted @ 2020-07-19 23:36 市丸银 阅读(186) 评论(0) 推荐(0)
摘要: 1、基本 @Controller 控制层 @Service 业务层 @Component 组件 @Repository dao 2、@RequestMapping url 三、restful 风格 与python的restful差不多 1、不用restful风格 访问链接 http://localh 阅读全文
posted @ 2020-07-19 23:18 市丸银 阅读(152) 评论(0) 推荐(0)
摘要: 1、添加jar包 <groupId>com.wt</groupId> <artifactId>springmvc</artifactId> <packaging>pom</packaging> <version>1.0-SNAPSHOT</version> <modules> <module>spr 阅读全文
posted @ 2020-07-19 22:19 市丸银 阅读(179) 评论(0) 推荐(0)
上一页 1 ··· 41 42 43 44 45 46 47 48 49 ··· 100 下一页