ClassPathResource 在类路径下读取资源

public final String getPath()
public boolean exists()
public InputStream getInputStream()

WebUtils 获取web资源工具类

public static String getRealPath(ServletContext servletContext, String path)
public static Object getSessionAttribute(HttpServletRequest request, String name)
public static File getTempDir(ServletContext servletContext)

ServletRequestUtils 提供获取请求参数 并自动类型转换的功能

public static Integer getIntParameter(ServletRequest request, String name)
public static int[] getIntParameters(ServletRequest request, String name)
public static Long getLongParameter(ServletRequest request, String name)

StringUtils 提供对字符串操作的工具类

public static String[] split(String toSplit, String delimiter)
public static String collectionToCommaDelimitedString(Collection<?> coll)
public static boolean hasLength(String str)

SerializationUtils 提供序列化与反序列化

public static byte[] serialize(Object object)
public static Object deserialize(byte[] bytes)

FactoryBean<T> 通过实现该接口可以将我们自定义的Bean注入到Spring的容器当中去

public interface FactoryBean<T> {
T getObject() throws Exception;
Class<?> getObjectType();
boolean isSingleton();
}

ApplicationContextAware 实现这个接口可以将 ApplicationContext 注入进来

public interface ApplicationContextAware extends Aware {
void setApplicationContext(ApplicationContext applicationContext) throws BeansException;
}

InitializingBean 实现该接口可以做一些初始化动作,afterPropertiesSet方法会在容器初始化后被自动调用

public interface InitializingBean {
void afterPropertiesSet() throws Exception;
}

DisposableBean 实现该接口可以再Spring容器销毁时调用,可以在这个方法中做一些比如清理资源的动作

public interface DisposableBean {
void destroy() throws Exception;
}

BeanNameAware 实现该接口,Spring容器在启动后会把当前Bean的名字注入进来

public interface BeanNameAware extends Aware {
void setBeanName(String name);
}

ResourceLoaderAware 实现该接口可以注入ResourceLoader对象,通过它可以很方便的加载一些系统资源

public interface ResourceLoaderAware extends Aware {
void setResourceLoader(ResourceLoader resourceLoader);
}

最新文章

  1. inline-block和float
  2. 使用PowerDesigner把oom设计图导出jpg格式的图片
  3. aptana studio 3汉化方法 及支持jquery的方法
  4. BZOJ4347 : [POI2016]Nim z utrudnieniem
  5. input中如何输入逆写的中文句子
  6. pku3670 Eating Together
  7. 字符串(后缀数组||SAM):NOI2015 品酒大会
  8. 用java写bp神经网络(一)
  9. nginx-lua实现简单权限控制
  10. Android高仿雅虎天气(两)---代码结构分析
  11. find用法详解
  12. 28. pt-table-sync
  13. spark常见异常汇总
  14. [PA2014]Bohater
  15. 【Visual Studio 扩展工具】使用ComponentOne中的GroupDefinition和SortDefinition属性保存和还原布局
  16. tips:Java基本数据类型大小比较
  17. Debug的使用
  18. Scala进阶之路-面向对象编程之类的成员详解
  19. Spark ML 几种 归一化(规范化)方法总结
  20. ThinkPHP学习(一)

热门文章

  1. jsp中获取当前项目名称
  2. try语句...
  3. 教程 | 一文入门Python数据分析库Pandas
  4. pandas 的数据结构Series与DataFrame
  5. 马哥 Linux运维基础进阶和shell入门
  6. vsftp添加用户及测试
  7. C语言sprintf与sscanf函数
  8. 统一日志监控系统 springboot websocket 简单版 王代军-作品
  9. Tree通用的系列方法列表-treepanel
  10. Chipscope使用