springboot
yepk
http://www yepk cn
展开
-
springboot+Sharding-JDBC实现读写分离
技术选型SpringBoot + hikari + Sharding-JDBC + MyBatis使用Sharding-JDBC配置读写分离,优点在于数据源完全有Sharding托管,写操作自动执行master库,读操作自动执行slave库。不需要程序员在程序中关注这个实现了。核心jar包<dependency> <groupId>org.springframework.boot</groupId> <a转载 2020-12-06 10:51:23 · 705 阅读 · 0 评论 -
springboot集成kafka再次优化版本
1. 引依赖包 <dependency> <groupId>org.springframework.kafka</groupId> <artifactId>spring-kafka</artifactId></dependency>2. 配置类/** * @author :yepk * @version :1.0 * @apiNote :kafka配置 * @date :2020-03-原创 2020-07-09 09:01:59 · 658 阅读 · 0 评论 -
springboot集成kafka
1. 引依赖包 <dependency> <groupId>org.springframework.kafka</groupId> <artifactId>spring-kafka</artifactId></dependency>2. 配置类/** * @author :yepk * @version :1.0 * @apiNote :kafka配置 * @date :2020-03-原创 2020-06-20 12:47:41 · 441 阅读 · 0 评论 -
easypoi插入超链接
今天遇到个问题,在excel中插入超链接,用于直接打开表格链接的文件1. 类似这种,ctrl+鼠标左键能直接打开,下面用easypoi来实现2. 查看easypoi文档,字段@Excel注解属性 isHyperlink = true 打开超链接插入功能3. 实际代码实现实体类字段属性开启超链接@Excel(name = "参数(input)", orderNum = "12", isHyperlink = true)private String input;@Excel(name .原创 2020-06-19 10:10:38 · 3767 阅读 · 3 评论 -
springboot集成点评cat监控
1. 引包<!-- 点评cat--><dependency> <groupId>com.dianping.cat</groupId> <artifactId>cat-client</artifactId> <version>3.0.0</version></dependency>2. 引入cat的核心过滤器import com.dianping.cat原创 2020-06-19 10:08:19 · 1446 阅读 · 0 评论 -
springboot注入分页插件(pagehelper)不生效
soringboot使用pagehelper分页插件不生效解决办法@Bean public Interceptor[] plugins() { return new Interceptor[]{new PageInterceptor()}; }原创 2019-07-16 10:52:11 · 1526 阅读 · 0 评论 -
springmvc 同类多视图解析器配置 thymeleaf freemarker 等
很多业务场景需要多前端资源,不一定只有一个前端页面文件夹字,所以后台也需要配置相应的资源解析器此配置满足thymeleaf 解析不同路径的模板 /** 后台用模板解析器 **/ @Bean(value = "adminTemplateResolver") public SpringResourceTemplateResolver adminTemplateResolver() {...原创 2019-07-31 15:14:59 · 458 阅读 · 0 评论