摘要:
springboot默认使用hikaricp连接池,如果要使用其他的连接池,如:druid,c3p0等等,需要另行配置。 首先要引入依赖 jdbc的启动器<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spri 阅读全文
摘要:
首先要写一个自己的拦截器,实现HandlerInterceptor接口,并且实现接口中的三个方法,同时添加 @Component 注解,把自己的拦截器放入容器 中管理,方便以后的注入使用。 @Component public class MyIntercepor implements Handler 阅读全文