关键词 spring Java eclipse bean 多例模式 prototype 懒加载 lazy-init 写在前面 功能简述:对于多例模式的懒加载配置是否生效的测试。 刚接触,摸索中,低级错误,只是做个记录,轻喷。 (有错误)Xml配置文件(片段) <?xml version="1.0" ...
分类:
其他好文 时间:
2021-02-18 13:55:34
阅读次数:
0
异常处理 1、设置默认错误页面 默认情况下,Spring Boot提供/error处理所有错误的映射,所有我们平时程序出错会弹出如下第二张图页面 对于机器客户端,它将生成JSON响应,其中包含错误,HTTP状态和异常消息的详细信息。对于浏览器客户端,响应一个“ whitelabel”错误视图,以HT ...
分类:
编程语言 时间:
2021-02-18 13:30:23
阅读次数:
0
1、maven依赖 <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.28</version> </dependency> <!-- JSONObject对象依赖的ja ...
分类:
编程语言 时间:
2021-02-18 13:29:38
阅读次数:
0
0x01、环境搭建 下载地址:https://codeload.github.com/apache/shiro/zip/shiro-root-1.2.4 环境:Tomcat 8.5.27 + idea 2020.2 + jdk 1.8 +maven 3.6 下载之后之后直接打开,并open这个web ...
分类:
其他好文 时间:
2021-02-18 13:25:23
阅读次数:
0
IDEA 警告 No archetype found in remote catalog. Defaulting to internal catalog 新建Maven项目,遇到警告: No archetype found in remote catalog. Defaulting to inter ...
分类:
其他好文 时间:
2021-02-18 13:05:15
阅读次数:
0
<build> <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.properties</include> <include>**/*.xml</include> </includ ...
分类:
其他好文 时间:
2021-02-18 13:03:49
阅读次数:
0
一.导入坐标 <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-web</artifactId></dependency><dependency> <groupId>org ...
分类:
编程语言 时间:
2021-02-18 13:02:46
阅读次数:
0
Spring Security简介 历史 添加parent和web依赖 SpringBootApplication @MapperScan@SpringBootApplication public class SpringSecurityApplication{ public static void ...
分类:
编程语言 时间:
2021-02-17 14:45:56
阅读次数:
0
秒杀就是抢购的功能,会有很多人抢购,所以要求扛得住高并发 秒杀的商品信息存入Redis缓存(因为访问数据量大,所以不直接对数据库进行操作) 秒杀商品存入Redis来提升访问速度。 1.秒杀列表数据 2.秒杀详情页数据 spring定时任务-定时将秒杀商品存入Redis中。 定时将秒杀商品存入Redi ...
分类:
其他好文 时间:
2021-02-17 14:44:35
阅读次数:
0
解决idea创建Maven项目时 No archetype found in remote catalog. Defaulting to internal catalog 下载archetype-catalog.xml下载地址:https://repo1.maven.org/maven2/arche ...
分类:
其他好文 时间:
2021-02-17 14:41:35
阅读次数:
0