![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
SpringBoot
是小小郭啊
这个作者很懒,什么都没留下…
展开
-
在SpringBoot中集成Swagger(随笔)
在SpringBoot中集成Swagger(随笔)本项目是在Swagger3.0版本下的使用导入相关依赖 <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-boot-starter</artifactId> <version>3.0.0</version>原创 2021-05-05 18:33:23 · 72 阅读 · 0 评论 -
在SpringBoot中简单使用Shiro(随笔)
导入相关依赖<!-- https://mvnrepository.com/artifact/org.apache.shiro/shiro-spring --> <dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-spring</artifactId> <ve..原创 2021-05-02 22:22:20 · 84 阅读 · 0 评论 -
在SpringBoot中简单使用Spring Security(随笔)
在SpringBoot中简单使用Spring Security(随笔)导入相关依赖 ;<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId></dependency>定义一个Spring Security配置类继承自WebSec原创 2021-04-29 21:06:43 · 89 阅读 · 1 评论 -
在Spring Boot中嵌入Thymeleaf模板引擎(随笔)
在Spring Boot中嵌入Thymeleaf模板引擎(随笔)1.模板引擎: 是为了使用户界面与业务数据(内容)分离而产生的,它可以生成特定格式的文档,用于网站的模板引擎会生成一个标准的HTML文档。使用模板引擎的目的就是为了使前后端分离。2.Thymeleaf 官网解释:Thymeleaf is a modern server-side Java template engine for both web and standalone environments.(翻译:Thymeleaf是原创 2021-04-11 11:06:46 · 149 阅读 · 0 评论 -
SpringBoot中的拦截器Interceptor(随笔)
SpringBoot中的拦截器Interceptor(随笔)1)定义拦截器:定义一个拦截器类实现HandlerInterceptor接口,重写preHangle()方法;public class OneInterceptor implements HandlerInterceptor { @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object原创 2021-04-09 21:20:42 · 538 阅读 · 4 评论 -
SpringBoot中的日志(随笔)
SpringBoot中的日志(随笔)SpringBoot中默认日志技术为logback。log back是由log4j创始人设计的又一款开源日志组件,其当前分为三个模块:logback-core:是其他两个模块的基础;logback-classic:是log4j的一个改良版本;logback-access:与Servlet容器集成提供通过Http来访问日志的功能。Springboot中的logback用法1)在主配置文件中对logback进行配置:logging: level: wa原创 2021-04-09 20:08:51 · 54 阅读 · 0 评论 -
SpringBoot中Filter(过滤器)的使用
SpringBoot中Filter(过滤器)的使用(随笔)1)注解方式(基于Servlet3.0+版本) 新建Filter类(实现Filter接口),在Filter类上加@WebFilter(需要过滤的请求) 注解;@WebFilter("/*") //过滤所有请求public class OneFilter implements Filter 在SpringBoot启动类上加@ServletComponentScan(包名)注解,扫描filter与 servlet类所在的包。2)原创 2021-04-09 18:25:41 · 205 阅读 · 0 评论 -
SpringBoot中使用Servlet的方式
SpringBoot中使用Servlet的方式1)注解方式(对于Servlet3.0+版本的使用) 定义Servlet类继承自HttpServlet,并在Servlet类上加@WebServlet注解;@WebServlet("/first") //指定访问路径public class OneServlet extends HttpServlet 在项目启动类上加@ServletComponentScan注解2)通过配置方式(对于Servlet2.5+版本的使用) 定义Servl原创 2021-04-09 15:35:08 · 98 阅读 · 0 评论