随笔分类 -  springboot

摘要:@Component @Intercepts({ @Signature( type = StatementHandler.class, method = "prepare", args = {Connection.class, Integer.class }) }) public class Sql 阅读全文
posted @ 2022-06-17 13:51 陳丶 阅读(883) 评论(0) 推荐(0)
摘要:@WebFilter(urlPatterns = "/*", filterName = "sqlFilter") @Configuration public class SqlFilter implements Filter { @Override public void init(FilterCo 阅读全文
posted @ 2022-06-17 13:50 陳丶 阅读(966) 评论(0) 推荐(0)
摘要:shiro所需要的包 <dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-cas</artifactId> <version>1.2.4</version> </dependency> <dependency> <gr 阅读全文
posted @ 2022-06-17 13:44 陳丶 阅读(830) 评论(0) 推荐(0)
摘要:Shiro介绍:Shiro是一个强大且易用的Java安全框架,执行身份验证、授权、密码和会话管理。使用Shiro的易于理解的API,您可以快速、轻松地获得任何应用程序,从最小的移动应用程序到最大的网络和企业应用程序。 本片文章主要做登录和权限的认证 注:仅作参考,不做任何教学 所有框架:spring 阅读全文
posted @ 2021-07-20 16:02 陳丶 阅读(50) 评论(0) 推荐(0)
摘要:<!-- websocket --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-websocket</artifactId> </dependency> /** * 阅读全文
posted @ 2021-05-07 16:07 陳丶 阅读(303) 评论(0) 推荐(0)
摘要:/** * redis * 工具类 * */ @Component public class RedisUtil { @Autowired private RedisTemplate<String, Object> redisTemplate; /** * 指定缓存失效时间 */ public bo 阅读全文
posted @ 2021-05-07 15:46 陳丶 阅读(193) 评论(0) 推荐(0)
摘要:# Redis数据库索引(默认为0) spring.redis.database=1 # Redis服务器地址 spring.redis.host=127.0.0.1 # Redis服务器连接端口 spring.redis.port=6379 # Redis服务器连接密码(默认为空) spring. 阅读全文
posted @ 2021-05-07 15:36 陳丶 阅读(907) 评论(0) 推荐(0)
摘要:四个默认加载配置文件地方的优先级,四个文件相同配置有优先级概念 不同位置相互补充 外部配置文件不建议使用,不符合maven项目结构,打包会打不进去 阅读全文
posted @ 2019-02-14 15:22 陳丶 阅读(154) 评论(0) 推荐(0)
摘要:编写是没有提示的话在pom中添加依赖,如下: <!-- 配置文件处理器 编写配置时会有提示 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-proce 阅读全文
posted @ 2019-02-13 15:35 陳丶 阅读(1343) 评论(0) 推荐(0)
摘要:springboot pom不需要指定版本号 springboot会自己管理版本号 <!-- 支持热部署 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</ar 阅读全文
posted @ 2019-02-13 15:01 陳丶 阅读(500) 评论(0) 推荐(0)