会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
甜菜波波
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
32
33
34
35
36
37
38
39
40
···
114
下一页
2021年6月10日
Spring 中 @ControllerAdvice的使用场景
摘要: @ControllerAdvice ,很多初学者可能都没有听说过这个注解,实际上,这是一个非常有用的注解,顾名思义,这是一个增强的 Controller。使用这个 Controller ,可以实现三个方面的功能: 全局异常处理 全局数据绑定 全局数据预处理 灵活使用这三个功能,可以帮助我们简化很多工
阅读全文
posted @ 2021-06-10 15:42 甜菜波波
阅读(514)
评论(0)
推荐(0)
2021年6月4日
SpringBoot读取Resource下文件的几种方式
摘要: sPathResource classPathResource = new ClassPathResource("excleTemplate/test.xlsx");InputStream inputStream =classPathResource.getInputStream();第二种File
阅读全文
posted @ 2021-06-04 17:40 甜菜波波
阅读(1586)
评论(0)
推荐(0)
Spring Boot之自定义Starter实现Demo
摘要: 本篇博客我们来自己实现一个类似与其它Spring Boot的starter。最简单的实现吧,不包括任何的业务逻辑。目的是只要引入了我们这个starter,就可以自动配置我们这个项目中的一个Bean(我们的例子中的FooService)。首先肯定是要创建一个Project了,我们直接创建一个Maven
阅读全文
posted @ 2021-06-04 17:12 甜菜波波
阅读(212)
评论(0)
推荐(0)
Spring boot配置Dubbo三种方式
摘要: 方式一使用注解的方式导入dubbo-starter在application.properties配置属性使用@Service暴露服务使用@Reference引用服务使用@EnableDubbo开启注解Dubbo功能或者配置包扫描dubbo.scan.base-packages=com.atguigu
阅读全文
posted @ 2021-06-04 15:58 甜菜波波
阅读(2484)
评论(0)
推荐(0)
2021年6月3日
JAVA打印日志使用slf4j
摘要: slf4j可以使用占位符。logger.info("receive message={}", backmessage);如果是log4j需要用+把字符串拼接起来,logger.info("receive message="+ backmessage);1.maven 加入jar包 <dependen
阅读全文
posted @ 2021-06-03 17:50 甜菜波波
阅读(590)
评论(0)
推荐(0)
2021年5月25日
guava创建线程池
摘要: private static ListeningExecutorService executorService = MoreExecutors.listeningDecorator(Executors.newCachedThreadPool());public static void main( S
阅读全文
posted @ 2021-05-25 16:31 甜菜波波
阅读(1256)
评论(0)
推荐(0)
apollo的用法1
摘要: [ { "id": "1", "name": "测试1" }, { "id": "1", "name": "测试2" } ] @ApolloJsonValue("${test.roles}")private List<Map<String, Object>> roles; [ "1", "2", "
阅读全文
posted @ 2021-05-25 15:24 甜菜波波
阅读(831)
评论(0)
推荐(0)
好用的excl工具easyexcl
摘要: 1.maven <dependency> <groupId>com.alibaba</groupId> <artifactId>easyexcel</artifactId> <version>2.2.6</version></dependency>2.demodata package com.dem
阅读全文
posted @ 2021-05-25 15:03 甜菜波波
阅读(140)
评论(0)
推荐(0)
git cherry-pick 教程
摘要: 对于多分支的代码库,将代码从一个分支转移到另一个分支是常见需求。 这时分两种情况。一种情况是,你需要另一个分支的所有代码变动,那么就采用合并(git merge)。另一种情况是,你只需要部分代码变动(某几个提交),这时可以采用 Cherry pick。 一、基本用法 git cherry-pick命
阅读全文
posted @ 2021-05-25 14:32 甜菜波波
阅读(503)
评论(0)
推荐(0)
轻量级http请求工具forest
摘要: 以下例子基于Spring Boot 第一步:添加Maven依赖 直接添加以下maven依赖即可 <dependency> <groupId>com.dtflys.forest</groupId> <artifactId>forest-spring-boot-starter</artifactId>
阅读全文
posted @ 2021-05-25 14:08 甜菜波波
阅读(2784)
评论(0)
推荐(0)
上一页
1
···
32
33
34
35
36
37
38
39
40
···
114
下一页
公告