上一页 1 2 3 4 5 6 7 8 ··· 21 下一页
摘要: 我们要先从注册中心将服务下线 为了通用性,不管任何注册中心都能使用统一的逻辑,我们在项目提供下面的Controller: @RestController public class ServerDeRegisterController { @Autowired private ServiceRegis 阅读全文
posted @ 2022-09-21 12:09 yangxiaohui227 阅读(151) 评论(0) 推荐(0)
摘要: spring 整合mybatis和OpenFeign时,都是通过接口来实现的,如: @Repository public interface OrderMapper { int deleteByPrimaryKey(Long codId); } @FeignClient("coupon") publ 阅读全文
posted @ 2022-09-11 12:58 yangxiaohui227 阅读(197) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-09-08 15:57 yangxiaohui227 阅读(43) 评论(0) 推荐(0)
摘要: 一、定义一个BaseController public class BaseController { public HttpServletRequest getHttpServletRequest(){ ServletRequestAttributes requestAttributes = (Se 阅读全文
posted @ 2022-06-20 20:50 yangxiaohui227 阅读(241) 评论(0) 推荐(0)
摘要: 1.添加依赖<dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-core</artifactId></dependency>2.代码演示: public class Test 阅读全文
posted @ 2022-06-20 20:46 yangxiaohui227 阅读(399) 评论(0) 推荐(0)
摘要: 本次导出使用糊涂工具包的导出工具,对期进行小封装: @Target({ElementType.FIELD}) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface ExportProperty { /** * 导出字段名 阅读全文
posted @ 2022-03-24 15:26 yangxiaohui227 阅读(84) 评论(0) 推荐(0)
摘要: spring的这个工具有个大坑: @Test public void test2() { List<A> list = new ArrayList<>(); //com.sentinel.demo.kk.A; list.add(new A("kk.A")); User user = new User 阅读全文
posted @ 2022-03-11 17:48 yangxiaohui227 阅读(62) 评论(0) 推荐(0)
摘要: 一:redis的持久化 1. rdb(快照):简单的说就是将redis内存中的所有数据都保持的磁盘中,生成dump.rdb文件 保存策略:save xx kk 意思是在xx秒内,变化的key数量到达kk时就会生成一次dump.rdb文件,默认的策略有: save 900 1 save 300 10 阅读全文
posted @ 2022-03-09 17:43 yangxiaohui227 阅读(125) 评论(0) 推荐(0)
摘要: 一:aop的大致流程 1.我们需要往容器中注入AnnotationAwareAspectJAutoProxyCreator后置处理器,该后置处理器可以解析所有的切面 advisor 和生成代理类 2. 如果我们使用@EnableAspectJAutoProxy 或者 @EnableTransacti 阅读全文
posted @ 2022-02-11 14:43 yangxiaohui227 阅读(248) 评论(0) 推荐(1)
摘要: 1.CREATE USER 'yangxiaohui'@'192.168.56.10' IDENTIFIED BY 'yangxiaohui'; -- 创建一个用户,192.168.50.10 指得是只有这个ip地址才能登录 如果是允许所有用户登录使用%,如果指定某段ip:192.168.56% 2 阅读全文
posted @ 2022-01-10 17:54 yangxiaohui227 阅读(684) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 21 下一页