예제 #1
0
 private static String[] getRuntimes(HttpServletRequest request) {
   Context context = Context.get();
   String environment = "defaultEnvironment";
   if (request.getParameter("env") != null) {
     environment = request.getParameter("env");
   } else if (context.getProperty("environment") != null) {
     environment = context.getProperty("environment");
   }
   Object obj = context.getBean(environment);
   if (obj != null) {
     SBTEnvironment bean = (SBTEnvironment) obj;
     return bean.getRuntimesArray();
   } else {
     return null;
   }
 }
예제 #2
0
 public String getParameter(String name) {
   if (env != null) {
     String value = env.getPropertyValueByName(name);
     if (value != null) {
       return value;
     }
   }
   return null;
 }