摘要:
使用SpringMVC框架实现文件上传 1.配置上传文件解释器 @RequestMapping(value="upload") public String upload(MultipartFile file) throws Exception{ File destfile = new File("D 阅读全文
摘要:
单例模式 单例模式 单例模式通常有两种表现形式:懒汉式单例和饿汉式单例。 1.懒汉式单例:该模式特点是类在加载的过程的时候没有生成一个单例、只有当调用的时候才去创建这个单例。 1 public class LazySingleton 2 { 3 private static volatile Laz 阅读全文