文章分类 - 实操 / HN
摘要:异常 package com.hainei.common.exception; import com.hainei.common.exception.code.BaseResponseCode; import com.hainei.common.exception.code.BusinessResp
阅读全文
摘要:异常的分类:① 异常的继承结构:基类为Throwable,Error和Exception继承Throwable,RuntimeException和IOException等继承Exception,具体的RuntimeException继承RuntimeException。 ② Error和Runtim
阅读全文
摘要:11111 不明确类型,用Object接收,再用instanceof进行类型判断 package com.zhetang.model.bo.realtime; import io.swagger.annotations.ApiModelProperty; import lombok.Data; im
阅读全文
摘要:对于日期的计算,虽然可以手写,但是也挺繁琐的,首先你得考虑平年闰年,你得考虑每个月多少天,然后再结合自己的业务,嵌入进去。 进行日期的加减操作,虽然可以写个工具类,但是在开发工程中,能引用能方便还是尽量方便的。SE中的Calendar日历类,就可以帮我们来处 理日期计算的问题,localDate则更
阅读全文
摘要:# For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html [mysqld] sql_mode=STRICT
阅读全文
摘要:利用 com.alibaba.fastjson 依赖来处理字符串和数组直接的关系。 package com.hainei.common.json; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; imp
阅读全文
摘要:在mybatis中使用concat('%',all,'%')时,如果all字段里面有空值,数据是查不出来的 SELECT * FROM wp_cbs_mbcd d WHERE concat(d.zyzmc, d.zyzbh) LIKE CONCAT('%', 21435, '%') 此时可以使用if
阅读全文
摘要:package com.hainei.samp.common.utils; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import org.springframework.stere
阅读全文
摘要:1,于由自己的服务器上已经安装好nginx(具体安装方法见我的另一篇文章,Linux中安装nginx),所以不再安装。 2,下载nginx_mod_h264_streaming-2.2.7.tar.gz(自己在网上搜吧)。 3,安装pcre,先看有没有安装。 [root@localhost vsft
阅读全文
摘要:springboot项目打成jar包,默认读取的classpath路径下的配置文件,config.properties是自定义配置文件。 如果要把config.properties配置放在jar包外面,方便修改配置, 1.在启动类或者配置类上添加@PropertySource注解,value参数配置
阅读全文
摘要:https://blog.csdn.net/wohaqiyi/article/details/79940380?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase&de
阅读全文
摘要:一个cron表达式有至少6个(也可能7个)有空格分隔的时间元素。按顺序依次为:{秒数} {分钟} {小时} {日期} {月份} {星期} {年份(可为空)} 秒(0~59) 分钟(0~59) 3 小时(0~23) 4 天(0~31) 5 月(0~11) 6 星期(1~7 1=SUN 或 SUN,MO
阅读全文