com.base4j.mybatis.MybatisStarter Maven / Gradle / Ivy
package com.base4j.mybatis;
import com.base4j.mybatis.tool.SpringContextHelper;
import org.springframework.boot.SpringApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;
/**
* Created by panlc on 2017-03-13.
*/
@Configuration
@EnableTransactionManagement
@ComponentScan("com.base4j.mybatis")
public class MybatisStarter {
public static void main(String[] args) {
SpringApplication.run(MybatisStarter.class);
Object mybatisConfig = SpringContextHelper.getBeanById("mybatisConfig");
System.out.println(mybatisConfig);
}
}