小的知识点

来源:互联网 发布:淘宝鲜花速递 编辑:程序博客网 时间:2024/06/06 03:15

1.截取文件名的文件格式

fileName.substring(fileName.lastIndexof(".")); 

2.spring项目中,代码中用到properties文件中定义的数据

@Value"${username}"private String user; 

这样写就将properties文件中username的数据注入到user中。

3.Joda-Time时间组件包 可用来对时间进行格式化等操作

例如:

new DateTime().toString("/yyyy/MM/dd")
0 0
原创粉丝点击