StandAloneApplication 추가

master
mjkhan21 1 year ago
parent 9c6861be1b
commit 86be114249

@ -4,7 +4,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Import;
import org.springframework.test.context.ContextConfiguration;
/**xit-foundation.jar spring boot
/**Spring Boot xit-foundation.jar
* <p>
* <ul><li> spring </li>
* <li> 'context-' xml </li>

@ -0,0 +1,37 @@
package cokr.xit.foundation.boot;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration;
import org.springframework.context.annotation.Import;
import org.springframework.test.context.ContextConfiguration;
/**Spring Boot xit-foundation.jar stand-alone
* <p>
* <ul><li> spring </li>
* <li> 'context-' xml </li>
* <li> classpath*:spring/context-*.xml .</li>
* </ul>
* @author mjkhan
*/
@SpringBootApplication(exclude = {
WebMvcAutoConfiguration.class
})
@Import({
CommonConfig.class,
DatasourceConfig.class,
TransactionConfig.class,
})
@ContextConfiguration("classpath:spring/context-*.xml")
public class StandAloneApplication implements CommandLineRunner {
@Override
public void run(String... args) throws Exception {}
protected static void start(Class<?> klass, String... args) {
SpringApplication app = new SpringApplication(klass);
app.setWebApplicationType(WebApplicationType.NONE);
app.run(args);
}
}
Loading…
Cancel
Save