Created
October 30, 2015 23:09
-
-
Save ekirastogi/9454842aca076ebb5094 to your computer and use it in GitHub Desktop.
Spring Boot : How to create a Bootstrap class.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ekiras.bootstrap; | |
import org.springframework.beans.factory.InitializingBean; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.stereotype.Component; | |
import java.util.logging.Logger; | |
/** | |
* Created by ekansh on 31/10/15. | |
*/ | |
@Component | |
public class Bootstrap implements InitializingBean{ | |
Logger logger = Logger.getLogger(getClass().getName()); | |
@Override | |
public void afterPropertiesSet() throws Exception { | |
System.out.println("##########################################"); | |
System.out.println("##########################################"); | |
System.out.println(" START BOOTSTRAP CODE "); | |
System.out.println("##########################################"); | |
System.out.println("##########################################"); | |
// write the bootstrap code here | |
System.out.println("##########################################"); | |
System.out.println("##########################################"); | |
System.out.println(" END BOOTSTRAP CODE "); | |
System.out.println("##########################################"); | |
System.out.println("##########################################"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment