package com.indoqa.quickstart.boot.main;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import com.indoqa.boot.lifecycle.AbstractStartupLifecycle;
import com.indoqa.quickstart.boot.main.resource.FrontendResource;

public class AppStartupLifecycle extends AbstractStartupLifecycle {

    private AnnotationConfigApplicationContext context;

    @Override
    public void didCreateSpringContext(AnnotationConfigApplicationContext context) {
        this.context = context;
    }

    @Override
    public void willCreateDefaultSparkRoutes() {
        // the FrontendResource must be registered before any Spark routes are registered
        this.context.register(FrontendResource.class);
    }
}

@@ -317,65 +317,8 @@
  %7B%0A%0A
-    private AnnotationConfigApplicationContext context;%0A%0A
     
@@ -347,30 +347,36 @@
 oid 
-did
+will
 Create
-SpringContext
+DefaultSparkRoutes
 (Ann
@@ -422,110 +422,8 @@
 ) %7B%0A
-        this.context = context;%0A    %7D%0A%0A    @Override%0A    public void willCreateDefaultSparkRoutes() %7B%0A
     
@@ -508,24 +508,24 @@
 istered%0A
+
         
 this.con
@@ -520,13 +520,8 @@
     
-this.
 cont

align with Indoqa boot lifecylce changes