🎉 1.0.0-RC5

This commit is contained in:
smallchill 2019-01-21 17:48:03 +08:00
parent 84f8aa2069
commit 1992671f1f
13 changed files with 38 additions and 46 deletions

View File

@ -5,7 +5,7 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-tool</artifactId>
<version>1.0.0-RC4</version>
<version>1.0.0-RC5</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -21,14 +21,9 @@ import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.SecureUtil;
import org.springblade.core.tool.api.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.propertyeditors.CustomDateEditor;
import org.springframework.web.bind.ServletRequestDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
/**
@ -38,22 +33,6 @@ import java.util.List;
*/
public class BladeController {
/**
* ============================ BINDER =================================================
*/
/**
* initBinder
*
* @param binder binder
*/
@InitBinder
protected void initBinder(ServletRequestDataBinder binder) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
dateFormat.setLenient(false);
binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, false));
}
/**
* ============================ REQUEST =================================================
*/

View File

@ -46,7 +46,7 @@ public class RequestLogAspect {
* @throws Throwable 异常
*/
@Around(
"execution(!static org.springblade.core.tool.api.R<*> *(..)) && " +
"execution(!static org.springblade.core.tool.api.R *(..)) && " +
"(@within(org.springframework.stereotype.Controller) || " +
"@within(org.springframework.web.bind.annotation.RestController))"
)

View File

@ -73,11 +73,11 @@ mybatis-plus:
map-underscore-to-camel-case: true
cache-enabled: false
#swagger公共信息
#swagger配置信息
swagger:
title: SpringBlade 接口文档系统
description: SpringBlade 接口文档系统
version: 1.0.0
version: 2.0.0
license: Powered By SpringBlade
licenseUrl: https://springblade.org
terms-of-service-url: https://springblade.org

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>1.0.0-RC4</version>
<version>1.0.0-RC5</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>1.0.0-RC4</version>
<version>1.0.0-RC5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -37,6 +37,12 @@
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>1.0.0-RC4</version>
<version>1.0.0-RC5</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>1.0.0-RC4</version>
<version>1.0.0-RC5</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>1.0.0-RC4</version>
<version>1.0.0-RC5</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -6,7 +6,7 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-tool</artifactId>
<version>1.0.0-RC4</version>
<version>1.0.0-RC5</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -35,7 +35,7 @@ import java.util.Optional;
@Setter
@ToString
@ApiModel(description = "返回信息")
@NoArgsConstructor(access = AccessLevel.PRIVATE)
@NoArgsConstructor
public class R<T> implements Serializable {
private static final long serialVersionUID = 1L;
@ -217,7 +217,7 @@ public class R<T> implements Serializable {
* @param flag 成功状态
* @return R
*/
public static R status(boolean flag) {
public static <T> R<T> status(boolean flag) {
return flag ? success(BladeConstant.DEFAULT_SUCCESS_MESSAGE) : fail(BladeConstant.DEFAULT_FAILURE_MESSAGE);
}

View File

@ -20,6 +20,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.AllArgsConstructor;
import org.springblade.core.tool.jackson.MappingApiJackson2HttpMessageConverter;
import org.springblade.core.tool.support.xss.XssFilter;
import org.springblade.core.tool.utils.Charsets;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -30,7 +31,6 @@ import org.springframework.http.converter.json.AbstractJackson2HttpMessageConver
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import javax.servlet.DispatcherType;
import java.nio.charset.StandardCharsets;
import java.util.List;
/**
@ -51,7 +51,7 @@ public class MessageConfiguration implements WebMvcConfigurer {
@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
converters.removeIf(x -> x instanceof StringHttpMessageConverter || x instanceof AbstractJackson2HttpMessageConverter);
converters.add(new StringHttpMessageConverter(StandardCharsets.UTF_8));
converters.add(new StringHttpMessageConverter(Charsets.UTF_8));
converters.add(new ByteArrayHttpMessageConverter());
converters.add(new ResourceHttpMessageConverter());
converters.add(new ResourceRegionHttpMessageConverter());

29
pom.xml
View File

@ -5,7 +5,7 @@
<groupId>org.springblade</groupId>
<artifactId>blade-tool</artifactId>
<version>1.0.0-RC4</version>
<version>1.0.0-RC5</version>
<packaging>pom</packaging>
<name>blade-tool</name>
<description>
@ -36,22 +36,23 @@
</scm>
<properties>
<blade.tool.version>1.0.0-RC4</blade.tool.version>
<blade.tool.version>1.0.0-RC5</blade.tool.version>
<java.version>1.8</java.version>
<maven.plugin.version>3.8.0</maven.plugin.version>
<swagger.version>2.9.2</swagger.version>
<swagger.models.version>1.5.21</swagger.models.version>
<swagger.bootstrapui.version>1.8.8</swagger.bootstrapui.version>
<mybatis.plus.version>3.0.6</mybatis.plus.version>
<mybatis.plus.version>3.0.7.1</mybatis.plus.version>
<curator.framework.version>4.0.1</curator.framework.version>
<protostuff.version>1.6.0</protostuff.version>
<disruptor.version>3.4.2</disruptor.version>
<spring.boot.admin.version>2.0.2</spring.boot.admin.version>
<mica.auto.version>0.0.1</mica.auto.version>
<spring.boot.version>2.0.7.RELEASE</spring.boot.version>
<spring.cloud.version>Finchley.SR2</spring.cloud.version>
<spring.platform.version>Cairo-SR5</spring.platform.version>
<spring.platform.version>Cairo-RELEASE</spring.platform.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
@ -120,6 +121,12 @@
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--<dependency>
<groupId>org.springframework.cloud</groupId>
@ -133,20 +140,20 @@
<groupId>org.springframework.retry</groupId>
<artifactId>spring-retry</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.dreamlu</groupId>
<artifactId>mica-auto</artifactId>
<version>0.0.1</version>
<version>${mica.auto.version}</version>
</dependency>
<!--<dependency>
<groupId>org.springframework</groupId>
@ -252,7 +259,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<version>2.10.1</version>
<executions>
<execution>
<phase>package</phase>