/*    */ package com.picc.grab;
/*    */ 
/*    */ import javax.servlet.ServletContext;
/*    */ import javax.servlet.ServletException;
/*    */ import org.slf4j.Logger;
/*    */ import org.slf4j.LoggerFactory;
/*    */ import org.springframework.beans.factory.annotation.Autowired;
/*    */ import org.springframework.boot.SpringApplication;
/*    */ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
/*    */ import org.springframework.boot.autoconfigure.SpringBootApplication;
/*    */ import org.springframework.boot.autoconfigure.web.ServerProperties;
/*    */ import org.springframework.boot.web.servlet.ServletComponentScan;
/*    */ import org.springframework.boot.web.servlet.ServletContextInitializer;
/*    */
/*    */ @SpringBootApplication
/*    */ @EnableAutoConfiguration
/*    */ @ServletComponentScan
/*    */ public class PiccgrabApplication
/*    */   implements ServletContextInitializer
/*    */ {
/*    */   @Autowired
/*    */   private ServerProperties serverProperties;
/* 23 */   private static Logger log = LoggerFactory.getLogger(PiccgrabApplication.class);
/*    */
/*    */   public static void main(String[] args) {
/* 26 */     SpringApplication.run(PiccgrabApplication.class, args);
/* 27 */     log.info("---------------------------  start Application success!");
/*    */   }
/*    */ 
/*    */   
/*    */   public void onStartup(ServletContext servletContext) throws ServletException {
/* 32 */     servletContext.getSessionCookieConfig().setName(this.serverProperties.getSession().getCookie().getName());
/*    */   }
/*    */ }
