摘要:
没有自定义CacheManager的情况下,默认缓存键的默认名称为cacheName::key 生成规则如下: 使用@Cacheable配置时,会调用org.springframework.data.redis.cache.RedisCache#createCacheKey方法 其中参数key为@C 阅读全文
摘要:
package com.atguigu.gateway.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; i 阅读全文
摘要:
1.引入依赖(基于SpringBoot项目) <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> 2. 阅读全文
摘要:
1.TCP方式 package com.atguigu; import org.junit.Test; import java.io.*; import java.net.InetAddress; import java.net.ServerSocket; import java.net.Socke 阅读全文
摘要:
CommandLineRunner的实现类可以在SpringBoot启动时启动(通过@Order可以控制执行顺序) 例: @Slf4j @Component @Order(1) public class StatisticReportPoolRunner implements CommandLine 阅读全文
摘要:
<div class="container"> <div class="list"></div> <div class="list"></div> <div class="list"></div> <div class="list"></div> <div class="list"></div> < 阅读全文
摘要:
两种方式: 1)使用\进行转义,如:select * from employees where last_name like '_\_%'; 2)使用escpae声明转义字符:select * from employees where last_name like '_$_%' ESCAPE '$' 阅读全文
摘要:
mysql中+仅仅只有一个功能:运算符 如果两个操作数均为数值型,则进行加法运算,如select 100 + 90 如果其中一方为字符型,则会试图将字符型数值转化为数值型,如果转换成功,则继续做加法运算,如果转换失败,则将字符型数值转换为0;注意如果一方为null,则结果必为null 在mysql中 阅读全文
摘要:
1.请求编码设置: 对于get请求,即使不设置字符集,接收参数也没有问题 但是对于post请求,必须设置字符集request.setCharacterEncoding("UTF-8"),且在获取参数之前设置才有效 2.响应编码设置: 方式一: response.setCharacterEncodin 阅读全文
摘要:
对于浏览器来说,/会被解析为类似http://ip:port的形式,如<a href="/"> 而/如果被服务器解析,则会被解析为类似http://ip:port/工程名的形式,如: 1.<url-pattern>/servlet1</url-pattern> 2.serverContext.get 阅读全文