2 metooj

尚未进行身份认证

我要认证

暂无相关简介

等级
TA的排名 41w+

Springboot读取配置文件(.yml)中自定义的集合数组(nacos配置中心为例)

springboot项目在配置文件中配置对象集合要怎么读取register: numberinfo : - registerNumber: 1 startTime: "08:00" endTime: "08:20" - registerNumber: 2 startTime: "08:21" endTime: "08:40" - registerNumber: 3 startTime: "08:41" en

2020-06-02 11:01:32

对象多级分组逆序

创建实体对象public class Work implements Comparable<Work>{ private String computer; private int num; private String date; private String partDate; public String getPartDate() { Date d = DateUtils.parseStr2Date(date, "yyyy-MM-

2020-05-26 16:11:41

四舍五入保留两位小数

/** * @Description: 四舍五入保留两位小数 **/public class RoundingOff { public static void main(String[] args) { String s="12.089"; System.out.println(changeString(s)); } public s...

2019-12-26 13:59:34

Springboot集成WebSocket 指定用户主动推送消息

import org.slf4j.Logger;import org.slf4j.LoggerFactory;import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configuration;import org.springframework.mes...

2019-07-09 17:47:28

java nsq

//com.sproutsocial:nsq-j:0.9.4public class NsqClient { @Test public void sub { Subscriber subscriber = new Subscriber("172.0.0.0"); //subscriber.setMaxFlushDelayMillis(30000); ...

2019-05-27 17:51:45

单例模式--懒汉式(双检锁)

/** * @description 线程安全 懒汉式 double-check locking */public class DoubleCheckSingleton implements Serializable { private static final long serialVersionUID = -6639300923461560175L; private ...

2019-05-24 09:08:21

解析excel

解析mysql导出的excel,为一下格式,fields字段,values为对应的值,位置为空的默认为空字符串{“fields”:[“id”,“name”,“age”],“values”:[[“1”,“aa”,“10”],[“2”," ",“12”],[“3”,“bbb”,“c2”],[“4”,“ccc”,“12”]]} public JSONObject uploadValueE...

2018-11-26 14:23:16

使用pac4j遇到的异常

visualize_1 | [2018-08-29 14:52:12][http-nio-8080-exec-1][org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet]] [DirectJDKLog.java:181] - Servlet.service() for ser...

2018-08-29 15:52:16

Springboot+mybatis多数据源配置

Master1DataSourceConfigpackage com.helowin.logic.stream.configure;import com.alibaba.druid.pool.DruidDataSource;import org.apache.ibatis.session.SqlSessionFactory;import org.mybatis.spring.Sq...

2018-07-28 23:02:54

前后端分离springboot+shiro+mybatis BASE64头像上传部分代码

//上传@PostMapping("/upload_avatar")public JSONObject uploadImage( MultipartHttpServletRequest request){ logger.info("start call api /upload_avatar"); byte[] data=null; try { List&...

2018-07-28 22:43:54
勋章 我的勋章
  • 勤写标兵Lv1
    勤写标兵Lv1
    授予每个自然周发布1篇到3篇原创IT博文的用户。本勋章将于次周周三上午根据用户上周的博文发布情况由系统自动颁发。