参考:
https://www.iteye.com/blog/phoenixfu-2429768
pom.xml中添加如下代码即可
<pluginRepositories>
<pluginRepository>
<id>alimaven spring plugin</id>
<name>alimaven spring plugin</name>
<url>https://maven.aliyun.com/repository/spring-plugin</url>
</pluginRepository>
</pluginRepositories>
如图
完整pom.xml代码
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- 继承 BDF3 提供的依赖管理的父项目 -->
<parent>
<groupId>com.bstek.bdf3</groupId>
<artifactId>bdf3-starter-parent</artifactId>
<version>1.1.0-SNAPSHOT</version>
</parent>
<artifactId>bdf3-sample</artifactId>
<dependencies>
<!-- 添加 BDF3 提供的预定义依赖 Starter,BDF3 还提供了其他的 Starter -->
<dependency>
<groupId>com.bstek.bdf3</groupId>
<artifactId>bdf3-starter</artifactId>
</dependency>
<!-- 开发测试工具 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>provided</scope>
</dependency>
<!-- 数据库驱动,正式场景改为 MySQL、Oracle 等数据库驱动 -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
</dependencies>
<!-- BDF3 提供的模块存放的 maven 私服仓库 -->
<repositories>
<repository>
<id>bsdn-maven-repository</id>
<url>http://nexus.bsdn.org/content/groups/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>alimaven spring plugin</id>
<name>alimaven spring plugin</name>
<url>https://maven.aliyun.com/repository/spring-plugin</url>
</pluginRepository>
</pluginRepositories>
</project>
右侧Plugins就不再报红了
另外SampleApplication.java代码
package com.bstek.bdf3.sample;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
/**
* @author Kevin Yang (mailto:kevin@cellbang.com)
* @since 2016年12月10日
*/
@SpringBootApplication // Spring Boot 启动类注解
@EnableCaching // 开启缓存功能注解
public class SampleApplication {
public static void main(String[] args) throws Exception {
SpringApplication.run(SampleApplication.class, args);
}
}