09 2021 档案
摘要:1.只获取请求参数 当需要在aop中获取请求的参数而无需获取响应参数,并做拦截时,可以参考下面的方法(原理很简单,使用@Before在方法执行之前获取参数): package com.zxh.configure; import com.alibaba.fastjson.JSON; import co
阅读全文
摘要:有时需要在SpringBoot启动时进行一些初始化的操作,有以下几种方法: 1.实现CommandLineRunner接口 在启动类上实现CommandLineRunner接口,重写run方法 package com.zxh; import lombok.extern.slf4j.Slf4j; im
阅读全文
摘要:关于Zookeeper和Dubbo的原理在此略,请参考链接。默认已在本地安装了Zookeeper 1.服务提供者开发 1)新建一个SpringBoot的项目,导入依赖 <dependencies> <!--web--> <dependency> <groupId>org.springframewor
阅读全文