![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Spring
文章平均质量分 86
kuangniaokuang
没有方向感,只有向高飞~
狂鸟鵟
展开
-
SpringBoot+Postman+Axios
Get 最简单的get @GetMapping("/get1") public String get1() { return "hello world"; } 传参数的get @GetMapping("/get2") public String get2(String world) { return "hello" + world; } // @RequestParam @GetM...原创 2020-04-01 13:07:04 · 342 阅读 · 0 评论 -
RESTful API 拦截(过滤器,拦截器,切片
Filter: 只能拿到http请求的一些响应 import javax.servlet.Filter; @Component public class TimeFilter implements Filter{ @Override public void doFilter(ServletRequest request, ServletResponse response, Filter...原创 2020-01-07 17:01:08 · 565 阅读 · 0 评论 -
玩转Spring全家桶学习笔记(05如何配置单数据源)
SpringBoot生成时默认的启动类--类1 package com.cocabit.spring; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication ...原创 2019-02-16 15:34:53 · 945 阅读 · 1 评论 -
玩转Spring全家桶学习笔记(06如何配置多数据源)
application.properties文件配置 foo.datasource.url=jdbc:h2:mem:foo foo.datasource.username=sa foo.datasource.password= bar.datasource.url=jdbc:h2:mem:bar bar.datasource.username=sa bar.datasource.passwo...原创 2019-02-21 16:57:58 · 734 阅读 · 0 评论 -
玩转Spring全家桶学习笔记(07、08那些好用的连接池们)
●HikariCP Spring Boot 2.x 默认使⽤ HikariCP 配置 spring.datasource.hikari.* 配置 Spring Boot 1.x 默认使⽤ Tomcat 连接池,需要移除 tomcat-jdbc 依赖 spring.datasource.type=com.zaxxer.hikari.HikariDataSource ●Alibaba Dru...原创 2019-02-22 16:11:50 · 937 阅读 · 0 评论