Spring Boot 是支持在系统加载的时候配置随机数的 1.添加config/random.properties文件 #随机32位MD5字符串 user.random.secret=${random.value} #随机int数字 user.random.intNumber=${random.i ...
分类:
编程语言 时间:
2021-05-24 04:07:16
阅读次数:
0
定义一系列的算法,把每一个算法封装起来, 并且使它们可相互替换。 策略模式把对象本身和运算规则区分开来,其功能非常强大,因为这个设计模式本身的核心思想就是面向对象编程的多形性的思想。 原来我们这么写: function computed(method, count) { let total; if ...
分类:
其他好文 时间:
2021-05-24 03:55:28
阅读次数:
0
前 如果你想在Spring Cloud Gateway中使用Sentinel Starter,你需要添加Spring - Cloud -alibaba- Sentinel - Gateway依赖,并添加Spring - Cloud - Starter - Gateway依赖,让Spring Clou ...
分类:
其他好文 时间:
2021-05-24 01:48:53
阅读次数:
0
报错信息:Expected '$(student - name)' to be an inline constant of type java.lang.String in @org.springframework.beans.factory.annotation.Value 这样使用会报错,原因是 ...
分类:
其他好文 时间:
2021-05-24 00:03:03
阅读次数:
0
新建springboot项目 相关依赖 <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </depende ...
分类:
其他好文 时间:
2021-05-23 23:13:22
阅读次数:
0
import lombok.extern.slf4j.Slf4j; import org.springframework.util.StringUtils; import java.util.ArrayList; import java.util.List; import java.util.Sta ...
分类:
其他好文 时间:
2021-05-03 12:46:12
阅读次数:
0
splay 伸展树 struct node1{ int son[2],fa; int siz,val,cnt; }a[N*100]; int rt[N*4],seg; int v[N],maxn; struct Splay{ inline int get(int x){ return x==a[a[ ...
分类:
其他好文 时间:
2021-04-30 12:45:13
阅读次数:
0
抽取为接口后, springboot事务开启,不在报错。 @Transactional public interface DescriptionService { public Description addDescription(Description description) ; 启动类 @Sp ...
分类:
其他好文 时间:
2021-04-30 12:36:32
阅读次数:
0
JWT认证 官网:https://github.com/jpadilla/django-rest-framework-jwt 在用户注册或登录后,我们想记录用户的登录状态,或者为用户创建身份认证的凭证。我们不再使用Session认证机制,而使用Json Web Token(本质就是token)认证机 ...
分类:
其他好文 时间:
2021-04-24 13:24:49
阅读次数:
0
首发于Enaium的个人博客 不用XML只用注解 首先需要创建6个注解 SQL用于输入SQL语句 @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface SQL { String[] valu ...
分类:
其他好文 时间:
2021-04-22 16:14:47
阅读次数:
0