随笔分类 -  后端开发

java 元注解
摘要:java元注解的作用是注解其他注解,java5.0定义了四个标准的元注解:@Target、@Retention、@Inherit、@Documented。 1)@Target:用于描述注解可以修饰的类型。其可选值为:(ElementType.TYPE) ANNOTATION_TYPE(注解类型声明) 阅读全文

posted @ 2017-02-21 15:43 nycqw 阅读(142) 评论(0) 推荐(0)

java获取web项目根路径
摘要://获取web 项目根路径 public static String getWebPath() { String sysPath = ""; try { //SfgkUtil 为该方法所在类名称 if(SfgkUtil.class.getClassLoader().getResource(File. 阅读全文

posted @ 2017-02-16 21:36 nycqw 阅读(261) 评论(0) 推荐(0)

File 类常用操作
摘要:File 类只能用来记录文件信息,不能对文件的内容进行访问。 1、创建文件[夹]引用 1)文件夹 File folder = new File("C:\\one\\two"); File subFolder = new File(folder, "\\three"); 2)文件 File file1 阅读全文

posted @ 2017-02-16 21:22 nycqw 阅读(145) 评论(0) 推荐(0)

导航