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")

被折叠的 条评论
为什么被折叠?



