1、在GitEgg工程的根目录,最上级父pom.xml文件中引入需要依赖的库及Maven插件,设置编码方式:
4.0.0 com.gitegg.cloud GitEgg-Cloudgitegg-cloud pom 1.0-SNAPSHOT gitegg-common gitegg-oauth gitegg-gateway gitegg-plugin gitegg-service gitegg-service-api 1.8 3.8.1 UTF-8 UTF-8 UTF-8 1.0-SNAPSHOT 2.3.3.RELEASE Hoxton.SR8 org.projectlombok lombokorg.springframework.boot spring-boot-dependencies${spring.boot.version} pom import org.springframework.cloud spring-cloud-dependencies${spring.cloud.version} pom import ${project.name} src/main/resources src/main/java ** @SpringBootApplication public class GitEggSystemApplication { public static void main(String[] args) { SpringApplication.run(GitEggSystemApplication.class,args); } }
4、在gitegg-service-system工程的resources目录下新建application.yml文件:
server: port: 8001 spring: application: name: gitegg-service-system
5、在GitEggSystemApplication类上右键,Run ‘GitEggSystemApplicat…’ ,运行项目,可以看到最基础的SpringBoot项目启动成功:
本文源码在https://gitee.com/wmz1930/GitEgg 的chapter-04分支。
GitEgg-Cloud是一款基于SpringCloud整合搭建的企业级微服务应用开发框架,开源项目地址:Gitee: https://gitee.com/wmz1930/GitEgg
GitHub: https://github.com/wmz1930/GitEgg
欢迎感兴趣的小伙伴Star支持一下。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)