示例#1
0
  @Override
  public void init(ServletConfig config) throws ServletException {
    super.init(config);

    SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(
        this, config.getServletContext());
  }
示例#2
0
  @Override
  public void init(ServletConfig config) throws ServletException {
    SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(
        this, config.getServletContext());

    ServletContext servletCtx = config.getServletContext();
    // 初始化路径
    // 保存文件的目录
    WORKPATH = servletCtx.getRealPath("/");
  }
  @Override
  public void init(ServletConfig config) throws ServletException {
    try {
      SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(
          this, config.getServletContext());

      ConfigurationHelper.preConfigureConfigPathFromServletContext(config.getServletContext());
      // check if API is enabled
      String value = csDao.getConfigValue(ENABLE_S3_API);
      if (value != null) {
        isS3APIEnabled = Boolean.valueOf(value);
      }
      logger.info("S3Engine :: Configuration value is : " + value);

    } catch (Exception e) {
      throw new ServletException("Error initializing awsapi: " + e.getMessage());
    }
  }