首页>代码>spring boot使用不指定Maven parent pom来创建可执行的spring boot项目>/executable-without-parent/src/main/java/com/memorynotfound/springboot/Application.java
package com.memorynotfound.springboot;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import javax.annotation.PostConstruct;

@SpringBootApplication
public class Application {

    private static Logger log = LoggerFactory.getLogger(Application.class);

    @Value("${domain}")
    private String domain;

    public static void main(String[] args) throws Exception {
        SpringApplication.run(Application.class, args);
    }

    @PostConstruct
    private void init() {
        log.info("creating an executable jar/war with spring boot without parent pom at " + domain);
    }

}
最近下载更多
oulingqiao  LV13 2023年9月25日
Gxb001020  LV10 2021年6月22日
最近浏览更多
微信网友_6658069491355648  LV2 2023年10月10日
oulingqiao  LV13 2023年9月25日
503382513  LV10 2023年9月6日
hhvivi  LV2 2023年7月2日
我睡觉时不困  LV7 2023年6月15日
sdhfkh  LV4 2023年6月12日
guviva  LV6 2023年6月12日
szf123  LV12 2023年6月5日
dmyafda  LV5 2023年3月26日
Boss绝  LV9 2023年2月20日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友