- 博客(54)
- 收藏
- 关注
原创 SpringBoot - 发布订阅(ApplicationListener和ApplicationEventPublisher)
SpringBoot - 发布订阅(ApplicationListener和ApplicationEventPublisher)
2023-03-28 16:51:33
585
原创 SpringBoot - 获取Web请求中Request和Response对象
SpringBoot - 获取Web请求中Request和Response对象
2023-03-10 08:01:46
531
原创 SpringCloud - Alibaba
SpringCloud - Alibaba项目聚合模块NacosSpring Cloud Alibaba Nacos DiscoverySpring Cloud Alibaba Nacos Config项目聚合模块版本依赖关系<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSch
2022-02-16 17:10:26
364
原创 排序算法(面试)
什么是程序?程序 = 算法 + 数据结构如何衡量一个算法的优劣性时间复杂度空间复杂度常数项时间:位运算比乘除快一些常用的排序算法1. 选择算法时间复杂度:n^2/** * <p> * 选择排序:每次循环找出最小的数下标放在数组最前面 * </p> * * @author sw * @data 2022/1/25 20:52 */public class Test { public static void main(String[
2022-02-07 16:12:32
383
原创 Spring-Boot - ApplicationEvent 与 ApplicationListener 的使用
继承ApplicationEvent抽象类后,HeartbeatEvent整个类就是信息的载体。实现ApplicationListener<信息类>接口后,可以监听响应信息。使用ApplicationContext.publishEvent发送事件,监听器会根据信息类型过滤出响应的信息...
2021-12-20 10:39:36
585
原创 服务配置 - Config
服务配置 - Config服务端导入依赖:<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-config-server</artifactId></dependency>yml配置:server: port: 8888spring: application: nam
2021-12-09 11:05:22
358
原创 熔断限流 - Hystrix
添加依赖: <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-hystrix</artifactId> </dependency>主启动类添加: @EnableCircuitBreaker简单使用:/** * @author sw .
2021-10-29 16:21:42
107
原创 项目(模块)打包插件
项目打包插件有主程序时(一个小程序)没有主程序时(一个依赖jar)有主程序时(一个小程序) <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artif
2021-09-29 17:56:27
114
原创 文件导出问题 - 项目地址
文件导出Docx和Pdf文件导出Swagger2自动导出api文档Docx和Pdf文件导出Gitee地址:https://gitee.com/homelives/docx-and—pdf-file-exportSwagger2自动导出api文档Gitee地址:https://gitee.com/homelives/swagger2-document-generation
2021-09-26 10:28:46
122
原创 文件下载 - 中文名乱码问题
@ApiOperation("根据id获取文件流") @GetMapping("/fileStream/{fileId}") public void getFileOutStream(@PathVariable Long fileId, HttpServletRequest request, HttpServletResponse response) { InputStream inputStream = null; OutputStream outStrea
2021-09-26 10:05:21
138
原创 SpringBoot-MVC集中配置
@Configurationpublic class WebMvcConfig implements WebMvcConfigurer { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**") .allowedOrigins("*"); }}
2021-09-08 18:15:34
104
原创 Mybatis-plus多表关联分页查询
Mapper层/** * 获取应用信息 * * @return */IPage<ModuleVo> getModules(IPage<ModuleVo> page, @Param("keyWord") String keyWord);Service层@Overridepublic IPage<ModuleVo> getPage(ModuleQueryParam param) { IPage<ModuleVo> page = new
2021-08-20 11:22:40
182
原创 网关 - Gateway
网关网关介绍自定义全局过滤器网关介绍自定义全局过滤器@Slf4j@Componentpublic class MyGatewayFilter implements GlobalFilter, Ordered { @Override public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) { log.info("================进入过滤器=
2021-08-17 15:29:04
114
原创 DependencyManagement使用详解
DependencyManagement详细使用方法:https://blog.youkuaiyun.com/mark_to_win/article/details/88740948
2021-08-01 00:03:05
148
原创 MAVEN项目制定JDK编译版本
<properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> <encoding>UTF-8</encoding></properties>
2021-03-29 09:54:31
471
原创 Idea -集成Vue
Idea集成Vue:https://blog.youkuaiyun.com/lianghecai52171314/article/details/106113723Idea基于Eslint格式化代码:https://blog.youkuaiyun.com/zysen1995/article/details/107035499/
2021-03-19 21:44:03
85
原创 Idea集成Vue
https://blog.youkuaiyun.com/linzhefeng89/article/details/104839482/
2021-03-17 14:29:31
176
原创 SpringMVC - 文件上传
导入jar包<dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> <version>1.4</version> </dependency> <dependency> <groupId>commons-io&..
2021-03-16 20:58:07
71
原创 SpringMVC - 转换器
日期转化器<!--开启SpringMVC支持,指定自定义的转换工厂--><mvc:annotation-driven conversion-service="conversionService"/><!--注入配置工厂--><bean id="conversionService" class="org.springframework.context.support.ConversionServiceFactoryBean"> <prope
2021-03-16 19:26:06
78
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人