在Eclipse中创建Spring Boot项目有两种方法,
1. 创建一个单纯的Gradle项目,然后转换为Dynamic Web Module项目,添加SpringBoot的引用,如:
http://blog.youkuaiyun.com/haojinming/article/details/79295255 中所示。
此时build.gradle文件如下:
/*
* This build file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java Library project to get you started.
* For more details take a look at the Java Libraries chapter in the Gradle
* user guide available at https://docs.gradle.org/3.5/userguide/java_library_plugin.html
*/
// Apply the java-library plugin to add support for Java Library
apply plugin: 'java-library'
// In this section you declare where to find the dependencies of your project
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
maven {url 'http://maven.aliyun.com/nexus/content/groups/public/'