- 浏览: 4479 次
- 性别:
- 来自: 上海
最新评论
文章列表
静态资源配置
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
if (!this.resourceProperties.isAddMappings()) {
logger.debug("Default resource handling disabled");
return;
}
Integer cachePeriod = this.resourceProperties.getCache ...
package com.wushq.projects.test;
import java.util.List;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import static org.mockito.Mockito.*;
import static org.junit.Assert.*;
@RunWith(MockitoJUnitRunn ...
1. 关闭spring boot启动banner
① 使用SpringApplication
public static void main(String[] args) {
SpringApplication app = new SpringApplication(Example.class);
app.setBannerMode(Banner.Mode.OFF);
app.run(args);
}
② 使用SpringApplicationBuilder
public static void main(String[] args) {
ne ...
1. 安装jdk 1.6+ , maven 3.2+
2. 创建maven项目
3. 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 ...