ITeye博客

CommandLineRunner 的使用

e_e · 2019-01-28 10:19 · springboot · 开源软件 · Markdown

@SpringBootApplication
@EnableJpaAuditing
public class ContractElementApplication extends MyApplication implements CommandLineRunner {
    public static void main(String[] args) {
        run(ContractElementApplication.class, args);
}

    @Autowired
private ElementDatasourceConfig elementDatasourceConfig;

@Override
public void run(String... args) throws Exception {
        elementDatasourceConfig.getConfig();

}
}

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。