整数(毫秒数)转换为时分秒毫秒格式(xx小时xx分钟xx秒xxx)
import java.util.Scanner;
public static String secToTime(int time) {
开发中遇见这样一个问题,需要将历史数据刷新成时间戳形式
select (to_date('2019-07-03 10:43:57','yyyy-mm-dd hh24:mi:ss')
- to_date('1970-01-01 08:00:00','yyyy-mm-dd
hh24:mi:ss'))*86400000 from dual;
select (to_date('2019年12月5日','yyyy'年'mm'月'dd'日'')
- to_date('1970-01-01 08:00:00','yyyy-mm-dd hh24:mi:ss'))*86400000
a from dual ;
private void saveDataToFile(String
fileName,String data) {
BufferedWriter
writer = null;
File file = new
File('E:\\upload\\img\\'+ fileName +
'.json');
对象转为fastJson属性值为null时该属性不显示的问题
当JavaBean中某个属性为null时,转为FastJson后,该属性缺失。
这种情况下如果以FastJson为返回值给被人提供接口,那么返回的参数数量不固定。
因此,现在需要解决的是:无论某参数是否为null,转化为FastJson后都不让其“消失”。
在转化为JSONString方法中添加这个属性:SerializerFeature.WriteMapNullValue
public static void main(String[] args) {
@ApiOperation注解
一 简介
首先@ApiOperation注解不是Spring自带的,它是是swagger里的
注解@ApiOperation是用来构建Api文档的
@ApiOperation(value = “接口说明”,
httpMethod = “接口请求方式”, response =
“接口返回参数类型”, notes =
“接口发布说明”;其他参数可参考源码;
二 使用
详情参考:https://www.jianshu.com/p/8033ef83a8ed
之前多次在centos7环境下配置mysql开机自启动出现了错误、现留下篇文章已做记录
一、centos7与centos6相比有什么不同:
1 在centos7中服务不在是用service这个命令来启动与停止,也不再用chkconfig来设置开机启动与否!
在centos7中所有对服务的管理都集中到了systemctl当中;systemctl不再是合之前一样依赖/etc/init.d/下
二、创建systemctl管理mysql的配置文件:
视图-->显示符号,把显示所有符号前边的勾去掉即可
在使用update语句的时候我们有时候需要利用left
join 关联表,以下是正确操作:
WHERE a.inid=b.inid and
a.invid='值' and a.batchno='值' and b.areaid='值' and
b.storageid='值'