作者:Sheiy

国内能用的国外DNS

https://unfiltered.adguard-dns.com/dns-query https://doh.dnslify.com/dns-query https://dns10.quad9.net/dns-query https://doh.dns.sb/dns-query https://

Sheiy Sheiy 发布于 2023-07-05

SpringBoot自定义Parent及Maven父子项目deploy

sheiy/base-framework (github.com)

Sheiy Sheiy 发布于 2023-06-28

docker 构建指定平台的镜像

docker buildx build -f ./Dockerfile --platform=linux/amd64 -t sheiy/ffmpeg6-openjre8 .

Sheiy Sheiy 发布于 2023-06-26

获取系统中的所有枚举

先看做成RESTful接口后返回的效果,最外层为枚举名,key为枚举的values,value中为枚举的get和is开头的可访问的方法对应的返回值:

Sheiy Sheiy 发布于 2023-04-12

让Spring的HTTP文件服务接口在文件未改变时响应304状态码

如果有一个接口用来获取用户上传的图片用户网页展示类似下面这样: @GetMapping("/file/{filename}") public void getFile(@PathVariable String filename, HttpServletResponse respons

Sheiy Sheiy 发布于 2023-04-12

SpringData系列扩展Repository自定义查询方法

首先通常情况下我们有如下这种接口来查询数据库 public interface LabelRepository extends PagingAndSortingRepository<Label, String> { List<Label> findAllByTextIn(Set<Stri

Sheiy Sheiy 发布于 2023-04-12

使用spring-data-redis+redis的zset实现一个简单的排行榜

核心代码如下: /** * ZSet实现,排行榜 */ class SimpleLeaderboard implements Leaderboard{ private final String leaderboardName; private final RedisTempl

Sheiy Sheiy 发布于 2023-04-12

SpringAop编程式实现切面(Advisor)

定义切点(Pointcut) SpringAop提供了接口org.springframework.aop.Pointcut该接口用于描述接入点,SpringAop同时提供了一些抽象类,切入普通方法可实现org.spri

Sheiy Sheiy 发布于 2023-04-12

使自己的注解支持SpringEL表达式

注解支持SpringEL表达式的意义 如SpringSeuciry的@PreAuthorize("@hasAnyRole('ADMIN')")其中ADMIN可以使用方法参数上的变量也可以使用自己的bean来校验ʌ

Sheiy Sheiy 发布于 2023-04-12

MySQL中的锁

数据库默认加的锁 InnDB 对于UPDATE、DELETE、INSERT语句,自动给涉及数据集加排他锁(X) MyISAM 执行SELECT语句Ò

Sheiy Sheiy 发布于 2023-04-12