mirror of
https://github.com/chillzhuang/blade-tool
synced 2024-12-12 20:29:27 +08:00
🎉 1.0.0-RC5
This commit is contained in:
parent
84f8aa2069
commit
1992671f1f
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springblade</groupId>
|
<groupId>org.springblade</groupId>
|
||||||
<artifactId>blade-tool</artifactId>
|
<artifactId>blade-tool</artifactId>
|
||||||
<version>1.0.0-RC4</version>
|
<version>1.0.0-RC5</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -21,14 +21,9 @@ import org.springblade.core.secure.BladeUser;
|
|||||||
import org.springblade.core.secure.utils.SecureUtil;
|
import org.springblade.core.secure.utils.SecureUtil;
|
||||||
import org.springblade.core.tool.api.R;
|
import org.springblade.core.tool.api.R;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
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 org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -38,22 +33,6 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public class BladeController {
|
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 =================================================
|
* ============================ REQUEST =================================================
|
||||||
*/
|
*/
|
||||||
|
@ -46,7 +46,7 @@ public class RequestLogAspect {
|
|||||||
* @throws Throwable 异常
|
* @throws Throwable 异常
|
||||||
*/
|
*/
|
||||||
@Around(
|
@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.stereotype.Controller) || " +
|
||||||
"@within(org.springframework.web.bind.annotation.RestController))"
|
"@within(org.springframework.web.bind.annotation.RestController))"
|
||||||
)
|
)
|
||||||
|
@ -73,11 +73,11 @@ mybatis-plus:
|
|||||||
map-underscore-to-camel-case: true
|
map-underscore-to-camel-case: true
|
||||||
cache-enabled: false
|
cache-enabled: false
|
||||||
|
|
||||||
#swagger公共信息
|
#swagger配置信息
|
||||||
swagger:
|
swagger:
|
||||||
title: SpringBlade 接口文档系统
|
title: SpringBlade 接口文档系统
|
||||||
description: SpringBlade 接口文档系统
|
description: SpringBlade 接口文档系统
|
||||||
version: 1.0.0
|
version: 2.0.0
|
||||||
license: Powered By SpringBlade
|
license: Powered By SpringBlade
|
||||||
licenseUrl: https://springblade.org
|
licenseUrl: https://springblade.org
|
||||||
terms-of-service-url: https://springblade.org
|
terms-of-service-url: https://springblade.org
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>blade-tool</artifactId>
|
<artifactId>blade-tool</artifactId>
|
||||||
<groupId>org.springblade</groupId>
|
<groupId>org.springblade</groupId>
|
||||||
<version>1.0.0-RC4</version>
|
<version>1.0.0-RC5</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>blade-tool</artifactId>
|
<artifactId>blade-tool</artifactId>
|
||||||
<groupId>org.springblade</groupId>
|
<groupId>org.springblade</groupId>
|
||||||
<version>1.0.0-RC4</version>
|
<version>1.0.0-RC5</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
@ -37,6 +37,12 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>commons-logging</groupId>
|
||||||
|
<artifactId>commons-logging</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>blade-tool</artifactId>
|
<artifactId>blade-tool</artifactId>
|
||||||
<groupId>org.springblade</groupId>
|
<groupId>org.springblade</groupId>
|
||||||
<version>1.0.0-RC4</version>
|
<version>1.0.0-RC5</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>blade-tool</artifactId>
|
<artifactId>blade-tool</artifactId>
|
||||||
<groupId>org.springblade</groupId>
|
<groupId>org.springblade</groupId>
|
||||||
<version>1.0.0-RC4</version>
|
<version>1.0.0-RC5</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>blade-tool</artifactId>
|
<artifactId>blade-tool</artifactId>
|
||||||
<groupId>org.springblade</groupId>
|
<groupId>org.springblade</groupId>
|
||||||
<version>1.0.0-RC4</version>
|
<version>1.0.0-RC5</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springblade</groupId>
|
<groupId>org.springblade</groupId>
|
||||||
<artifactId>blade-tool</artifactId>
|
<artifactId>blade-tool</artifactId>
|
||||||
<version>1.0.0-RC4</version>
|
<version>1.0.0-RC5</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -35,7 +35,7 @@ import java.util.Optional;
|
|||||||
@Setter
|
@Setter
|
||||||
@ToString
|
@ToString
|
||||||
@ApiModel(description = "返回信息")
|
@ApiModel(description = "返回信息")
|
||||||
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
@NoArgsConstructor
|
||||||
public class R<T> implements Serializable {
|
public class R<T> implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@ -217,7 +217,7 @@ public class R<T> implements Serializable {
|
|||||||
* @param flag 成功状态
|
* @param flag 成功状态
|
||||||
* @return R
|
* @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);
|
return flag ? success(BladeConstant.DEFAULT_SUCCESS_MESSAGE) : fail(BladeConstant.DEFAULT_FAILURE_MESSAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
|||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import org.springblade.core.tool.jackson.MappingApiJackson2HttpMessageConverter;
|
import org.springblade.core.tool.jackson.MappingApiJackson2HttpMessageConverter;
|
||||||
import org.springblade.core.tool.support.xss.XssFilter;
|
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.boot.web.servlet.FilterRegistrationBean;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
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 org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
|
|
||||||
import javax.servlet.DispatcherType;
|
import javax.servlet.DispatcherType;
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -51,7 +51,7 @@ public class MessageConfiguration implements WebMvcConfigurer {
|
|||||||
@Override
|
@Override
|
||||||
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
|
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
|
||||||
converters.removeIf(x -> x instanceof StringHttpMessageConverter || x instanceof AbstractJackson2HttpMessageConverter);
|
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 ByteArrayHttpMessageConverter());
|
||||||
converters.add(new ResourceHttpMessageConverter());
|
converters.add(new ResourceHttpMessageConverter());
|
||||||
converters.add(new ResourceRegionHttpMessageConverter());
|
converters.add(new ResourceRegionHttpMessageConverter());
|
||||||
|
29
pom.xml
29
pom.xml
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<groupId>org.springblade</groupId>
|
<groupId>org.springblade</groupId>
|
||||||
<artifactId>blade-tool</artifactId>
|
<artifactId>blade-tool</artifactId>
|
||||||
<version>1.0.0-RC4</version>
|
<version>1.0.0-RC5</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>blade-tool</name>
|
<name>blade-tool</name>
|
||||||
<description>
|
<description>
|
||||||
@ -36,22 +36,23 @@
|
|||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
<properties>
|
<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>
|
<java.version>1.8</java.version>
|
||||||
<maven.plugin.version>3.8.0</maven.plugin.version>
|
<maven.plugin.version>3.8.0</maven.plugin.version>
|
||||||
<swagger.version>2.9.2</swagger.version>
|
<swagger.version>2.9.2</swagger.version>
|
||||||
<swagger.models.version>1.5.21</swagger.models.version>
|
<swagger.models.version>1.5.21</swagger.models.version>
|
||||||
<swagger.bootstrapui.version>1.8.8</swagger.bootstrapui.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>
|
<curator.framework.version>4.0.1</curator.framework.version>
|
||||||
<protostuff.version>1.6.0</protostuff.version>
|
<protostuff.version>1.6.0</protostuff.version>
|
||||||
<disruptor.version>3.4.2</disruptor.version>
|
<disruptor.version>3.4.2</disruptor.version>
|
||||||
<spring.boot.admin.version>2.0.2</spring.boot.admin.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.boot.version>2.0.7.RELEASE</spring.boot.version>
|
||||||
<spring.cloud.version>Finchley.SR2</spring.cloud.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>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
|
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
|
||||||
@ -120,6 +121,12 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
|
<artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>commons-logging</groupId>
|
||||||
|
<artifactId>commons-logging</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!--<dependency>
|
<!--<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
@ -133,20 +140,20 @@
|
|||||||
<groupId>org.springframework.retry</groupId>
|
<groupId>org.springframework.retry</groupId>
|
||||||
<artifactId>spring-retry</artifactId>
|
<artifactId>spring-retry</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.projectlombok</groupId>
|
|
||||||
<artifactId>lombok</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-devtools</artifactId>
|
<artifactId>spring-boot-devtools</artifactId>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.dreamlu</groupId>
|
<groupId>net.dreamlu</groupId>
|
||||||
<artifactId>mica-auto</artifactId>
|
<artifactId>mica-auto</artifactId>
|
||||||
<version>0.0.1</version>
|
<version>${mica.auto.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!--<dependency>
|
<!--<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
@ -252,7 +259,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
<version>2.9.1</version>
|
<version>2.10.1</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
|
Loading…
Reference in New Issue
Block a user