Shiro简介 Apache Shiro是一个功能强大、灵活的,开源的安全框架。它可以干净利落地处理身份验证、授权、企业会话管理和加密。 Authentication(认证), Authorization(授权), Session Management(会话管理), Cryptography(加密
项目中常见配置 服务端口 服务名称 容器类型,如tomcat、undertow程池大小、请求日志和目录 连接池配置 Sql连接配置 info配置 模板配置 资源配置 # Tomcat server: tomcat: uri-encoding: UTF-8 max-threa
配置文件 在配置文件application.yml中配置MySql数据库连接池和Mybatis扫描包以及PageHelper分页插件 server: port: 8080 servlet: context-path: / spring: # mvc: # view: #
Spring Boot 概述 Build Anything with Spring Boot:Spring Boot is the starting point for building all Spring-based applications. Spring Boot is designed
每次问到 Spring Boot, 面试官非常喜欢问这个问题:“讲述一下 SpringBoot 自动装配原理?”。 我觉得我们可以从以下几个方面回答: 什么是 SpringBoot 自动装配? SpringBoot 是如何实现自动装配的?如何实现按需加载? 如何实现一个 Starter? 使用
安装插件 除了安装 Jenkins 推荐的一些插件,还需要安装如下插件: Maven Integration Maven Info Publish Over SSH Extended Choice Parameter Git Parameter 远程服务器配置 目录及脚本 在远程服务器上,需要
基本实现 httpclient版本 <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId>
故事背景 以Spring Cache Redis为例,Nacos配置中心配置了cacheManager的ttl参数,以@NacosValue的形式注入并配置为cacheManager的参数。 了解Spring Cache的朋友们应该明白,这里的cacheManager是spring初始化时初始化的一
在使用Spring Boot进行项目开发时,遇到的需求是需要对用户上传的数据进行过滤,比如去除< ' ^ %等敏感字符 自己在做的时候想到了两个办法去实现 (1)写一个过滤方法,在有数据操作的地方调用方法进行过滤,将过滤以后的字符串重新赋值 public static String
有时候我们会遇到这么一些需求,在Filter中获取一些参数进行处理,同时将处理好的参数重新添加到Request对象中,这时候我们在Filter中直接使用request.setAttribute()是无效的。可以使用HttpServletRequestWrapper类来解决向Request添加额外参数
解决办法:添加前置过滤器,强制将scheme配置为https,将serverPort配置为443 @Slf4j public class MyPreFilter implements Filter { @Override public void doFilter(ServletRe
(1)断点切入点 public class OAuth2LoginAuthenticationFilter extends AbstractAuthenticationProcessingFilter { public Authentication attemptAuthenticatio
OAuth2获取Code (1)跳转Bigcommerce地址:https://login.bigcommerce.com/oauth2/authorize?client_id=55s0zc5yt0x1b70wgnq12cv2r0kid5i&redirect_uri=https://xkgdu.ss
Spring Security或者OAuth2中设置某个开头的路径拦截,并且放行某个子路径: @Override public void configure(HttpSecurity http) throws Exception { http.csrf().disable()
Skywalking与Zipkin的区别 颗粒度:Skywalking方法级(展示的更详细),方法中所有的调用都展示出来了,如数据库调用、redis调用,第三方网络调用,而Zipkin只能展示接口级 UI界面:Skywalking完胜,国产开源,更适合国人眼球 代码侵入性:Skywalking无代