mirror of
https://github.com/chillzhuang/SpringBlade.git
synced 2024-11-21 18:09:25 +08:00
🎉 2.6.0发布 升级Hoxton.SR1 适配最新架构
This commit is contained in:
parent
9ec08baead
commit
027d11d688
11
README.md
11
README.md
@ -1,9 +1,9 @@
|
||||
<p align="center">
|
||||
<img src="https://img.shields.io/badge/Release-V2.5.4-green.svg" alt="Downloads">
|
||||
<img src="https://img.shields.io/badge/Release-V2.6.0-green.svg" alt="Downloads">
|
||||
<img src="https://img.shields.io/badge/JDK-1.8+-green.svg" alt="Build Status">
|
||||
<img src="https://img.shields.io/badge/license-Apache%202-blue.svg" alt="Build Status">
|
||||
<img src="https://img.shields.io/badge/Spring%20Cloud-Greenwich.SR3-blue.svg" alt="Coverage Status">
|
||||
<img src="https://img.shields.io/badge/Spring%20Boot-2.1.9.RELEASE-blue.svg" alt="Downloads">
|
||||
<img src="https://img.shields.io/badge/Spring%20Cloud-Hoxton.SR1-blue.svg" alt="Coverage Status">
|
||||
<img src="https://img.shields.io/badge/Spring%20Boot-2.2.2.RELEASE-blue.svg" alt="Downloads">
|
||||
<a target="_blank" href="https://bladex.vip">
|
||||
<img src="https://img.shields.io/badge/Author-Small%20Chill-ff69b4.svg" alt="Downloads">
|
||||
</a>
|
||||
@ -12,11 +12,6 @@
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
## 2019年度最受欢迎中国开源软件评选
|
||||
* 请为SpringBlade投上一票,非常感谢~
|
||||
* 投票地址:[https://www.oschina.net/project/top_cn_2019](https://www.oschina.net/project/top_cn_2019)
|
||||
|
||||
## SpringBlade微服务开发平台
|
||||
* 采用前后端分离的模式,前端开源两个框架:[Sword](https://gitee.com/smallc/Sword) (基于 React、Ant Design)、[Saber](https://gitee.com/smallc/Saber) (基于 Vue、Element-UI)
|
||||
* 后端采用SpringCloud全家桶,并同时对其基础组件做了高度的封装,单独开源出一个框架:[BladeTool](https://github.com/chillzhuang/blade-tool)
|
||||
|
@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<artifactId>SpringBlade</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.5.4</version>
|
||||
<version>2.6.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>blade-auth</artifactId>
|
||||
|
@ -53,7 +53,12 @@ public class AuthController {
|
||||
String userType = Func.toStr(WebUtil.getRequest().getHeader(TokenUtil.USER_TYPE_HEADER_KEY), TokenUtil.DEFAULT_USER_TYPE);
|
||||
|
||||
TokenParameter tokenParameter = new TokenParameter();
|
||||
tokenParameter.getArgs().set("tenantId", tenantId).set("account", account).set("password", password).set("grantType", grantType).set("refreshToken", refreshToken).set("userType", userType);
|
||||
tokenParameter.getArgs().set("tenantId", tenantId)
|
||||
.set("account", account)
|
||||
.set("password", password)
|
||||
.set("grantType", grantType)
|
||||
.set("refreshToken", refreshToken)
|
||||
.set("userType", userType);
|
||||
|
||||
ITokenGranter granter = TokenGranterBuilder.getGranter(grantType);
|
||||
UserInfo userInfo = granter.grant(tokenParameter);
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>SpringBlade</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.5.4</version>
|
||||
<version>2.6.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>SpringBlade</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.5.4</version>
|
||||
<version>2.6.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@ -100,16 +100,16 @@
|
||||
<artifactId>swagger-models</artifactId>
|
||||
<version>${swagger.models.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-spring-ui</artifactId>
|
||||
<version>${knife4j.version}</version>
|
||||
</dependency>
|
||||
<!--<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
<version>${swagger.version}</version>
|
||||
</dependency>-->
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>swagger-bootstrap-ui</artifactId>
|
||||
<version>${swagger.bootstrapui.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@ -19,19 +19,17 @@ package org.springblade.gateway.config;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springblade.gateway.handler.SwaggerResourceHandler;
|
||||
import org.springblade.gateway.handler.SwaggerSecurityHandler;
|
||||
import org.springblade.gateway.handler.SwaggerUiHandler;
|
||||
import org.springblade.gateway.props.AuthProperties;
|
||||
import org.springblade.gateway.props.RouteProperties;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.filter.reactive.HiddenHttpMethodFilter;
|
||||
import org.springframework.web.reactive.function.server.RequestPredicates;
|
||||
import org.springframework.web.reactive.function.server.RouterFunction;
|
||||
import org.springframework.web.reactive.function.server.RouterFunctions;
|
||||
import org.springframework.web.server.ServerWebExchange;
|
||||
import org.springframework.web.server.WebFilterChain;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
/**
|
||||
* 路由配置信息
|
||||
@ -45,26 +43,17 @@ import reactor.core.publisher.Mono;
|
||||
public class RouterFunctionConfiguration {
|
||||
|
||||
private final SwaggerResourceHandler swaggerResourceHandler;
|
||||
private final SwaggerSecurityHandler swaggerSecurityHandler;
|
||||
private final SwaggerUiHandler swaggerUiHandler;
|
||||
|
||||
@Bean
|
||||
public RouterFunction routerFunction() {
|
||||
return RouterFunctions.route(RequestPredicates.GET("/swagger-resources")
|
||||
.and(RequestPredicates.accept(MediaType.ALL)), swaggerResourceHandler);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 解决springboot2.0.5版本出现的 Only one connection receive subscriber allowed.
|
||||
* 参考:https://github.com/spring-cloud/spring-cloud-gateway/issues/541
|
||||
*/
|
||||
@Bean
|
||||
public HiddenHttpMethodFilter hiddenHttpMethodFilter() {
|
||||
return new HiddenHttpMethodFilter() {
|
||||
@Override
|
||||
public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {
|
||||
return chain.filter(exchange);
|
||||
}
|
||||
};
|
||||
.and(RequestPredicates.accept(MediaType.ALL)), swaggerResourceHandler)
|
||||
.andRoute(RequestPredicates.GET("/swagger-resources/configuration/ui")
|
||||
.and(RequestPredicates.accept(MediaType.ALL)), swaggerUiHandler)
|
||||
.andRoute(RequestPredicates.GET("/swagger-resources/configuration/security")
|
||||
.and(RequestPredicates.accept(MediaType.ALL)), swaggerSecurityHandler);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -22,7 +22,6 @@ import org.springframework.boot.autoconfigure.web.reactive.error.DefaultErrorWeb
|
||||
import org.springframework.boot.web.reactive.error.ErrorAttributes;
|
||||
import org.springframework.cloud.gateway.support.NotFoundException;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.web.reactive.function.server.*;
|
||||
import org.springframework.web.server.ResponseStatusException;
|
||||
|
||||
@ -70,11 +69,11 @@ public class ErrorExceptionHandler extends DefaultErrorWebExceptionHandler {
|
||||
* 根据code获取对应的HttpStatus
|
||||
*
|
||||
* @param errorAttributes
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
protected HttpStatus getHttpStatus(Map<String, Object> errorAttributes) {
|
||||
int statusCode = (int) errorAttributes.get("code");
|
||||
return HttpStatus.valueOf(statusCode);
|
||||
protected int getHttpStatus(Map<String, Object> errorAttributes) {
|
||||
return (int) errorAttributes.get("code");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
package org.springblade.gateway.handler;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
@ -35,7 +35,7 @@ import springfox.documentation.swagger.web.SwaggerResourcesProvider;
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
@RequiredArgsConstructor
|
||||
public class SwaggerResourceHandler implements HandlerFunction<ServerResponse> {
|
||||
private final SwaggerResourcesProvider swaggerResources;
|
||||
|
||||
@ -48,7 +48,7 @@ public class SwaggerResourceHandler implements HandlerFunction<ServerResponse> {
|
||||
@Override
|
||||
public Mono<ServerResponse> handle(ServerRequest request) {
|
||||
return ServerResponse.status(HttpStatus.OK)
|
||||
.contentType(MediaType.APPLICATION_JSON_UTF8)
|
||||
.body(BodyInserters.fromObject(swaggerResources.get()));
|
||||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.body(BodyInserters.fromValue(swaggerResources.get()));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,51 @@
|
||||
/**
|
||||
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springblade.gateway.handler;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.reactive.function.BodyInserters;
|
||||
import org.springframework.web.reactive.function.server.HandlerFunction;
|
||||
import org.springframework.web.reactive.function.server.ServerRequest;
|
||||
import org.springframework.web.reactive.function.server.ServerResponse;
|
||||
import reactor.core.publisher.Mono;
|
||||
import springfox.documentation.swagger.web.SecurityConfigurationBuilder;
|
||||
|
||||
/**
|
||||
* SwaggerSecurityHandler
|
||||
*
|
||||
* @author lengleng
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class SwaggerSecurityHandler implements HandlerFunction<ServerResponse> {
|
||||
|
||||
/**
|
||||
* Handle the given request.
|
||||
*
|
||||
* @param request the request to handler
|
||||
* @return the response
|
||||
*/
|
||||
@Override
|
||||
public Mono<ServerResponse> handle(ServerRequest request) {
|
||||
return ServerResponse.status(HttpStatus.OK)
|
||||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.body(BodyInserters.fromValue(SecurityConfigurationBuilder.builder().build()));
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
/**
|
||||
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springblade.gateway.handler;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.reactive.function.BodyInserters;
|
||||
import org.springframework.web.reactive.function.server.HandlerFunction;
|
||||
import org.springframework.web.reactive.function.server.ServerRequest;
|
||||
import org.springframework.web.reactive.function.server.ServerResponse;
|
||||
import reactor.core.publisher.Mono;
|
||||
import springfox.documentation.swagger.web.UiConfigurationBuilder;
|
||||
|
||||
/**
|
||||
* SwaggerUiHandler
|
||||
*
|
||||
* @author lengleng
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class SwaggerUiHandler implements HandlerFunction<ServerResponse> {
|
||||
|
||||
/**
|
||||
* Handle the given request.
|
||||
*
|
||||
* @param request the request to handler
|
||||
* @return the response
|
||||
*/
|
||||
@Override
|
||||
public Mono<ServerResponse> handle(ServerRequest request) {
|
||||
return ServerResponse.status(HttpStatus.OK)
|
||||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.body(BodyInserters.fromValue(UiConfigurationBuilder.builder().build()));
|
||||
}
|
||||
}
|
@ -3,6 +3,9 @@ server:
|
||||
|
||||
spring:
|
||||
cloud:
|
||||
discovery:
|
||||
reactive:
|
||||
enabled: false
|
||||
gateway:
|
||||
discovery:
|
||||
locator:
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>blade-ops</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.5.4</version>
|
||||
<version>2.6.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.springblade</groupId>
|
||||
<artifactId>blade-ops</artifactId>
|
||||
<version>2.5.4</version>
|
||||
<version>2.6.0</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.springblade.develop.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
|
@ -16,9 +16,9 @@
|
||||
package org.springblade.develop.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
|
@ -17,7 +17,7 @@ package $!{package.Controller};
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
import javax.validation.Valid;
|
||||
|
@ -17,7 +17,7 @@ package $!{package.Controller};
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
import javax.validation.Valid;
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>blade-ops</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.5.4</version>
|
||||
<version>2.6.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@ -43,4 +43,49 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>${docker.plugin.version}</version>
|
||||
<configuration>
|
||||
<imageName>${docker.registry.url}/blade/${project.artifactId}:${project.version}</imageName>
|
||||
<dockerDirectory>${project.basedir}</dockerDirectory>
|
||||
<dockerHost>${docker.registry.host}</dockerHost>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>/</targetPath>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<include>${project.build.finalName}.jar</include>
|
||||
</resource>
|
||||
</resources>
|
||||
<registryUrl>${docker.registry.url}</registryUrl>
|
||||
<serverId>${docker.registry.url}</serverId>
|
||||
<pushImage>true</pushImage>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<!--suppress UnresolvedMavenProperty -->
|
||||
<copy overwrite="true"
|
||||
tofile="${session.executionRootDirectory}/target/${artifactId}.jar"
|
||||
file="${project.build.directory}/${artifactId}.jar" />
|
||||
</tasks>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>blade-ops</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.5.4</version>
|
||||
<version>2.6.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>blade-ops</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.5.4</version>
|
||||
<version>2.6.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>blade-ops</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.5.4</version>
|
||||
<version>2.6.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>SpringBlade</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.5.4</version>
|
||||
<version>2.6.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>blade-service-api</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.5.4</version>
|
||||
<version>2.6.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>blade-service-api</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.5.4</version>
|
||||
<version>2.6.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>blade-service-api</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.5.4</version>
|
||||
<version>2.6.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>blade-service-api</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.5.4</version>
|
||||
<version>2.6.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>blade-service-api</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.5.4</version>
|
||||
<version>2.6.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,13 +5,13 @@
|
||||
<parent>
|
||||
<artifactId>SpringBlade</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.5.4</version>
|
||||
<version>2.6.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>blade-service-api</artifactId>
|
||||
<name>${project.artifactId}</name>
|
||||
<version>2.5.4</version>
|
||||
<version>2.6.0</version>
|
||||
<packaging>pom</packaging>
|
||||
<description>SpringBlade 微服务API集合</description>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>blade-service</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.5.4</version>
|
||||
<version>2.6.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -18,9 +18,9 @@ package com.example.demo.controller;
|
||||
|
||||
import com.example.demo.entity.Notice;
|
||||
import com.example.demo.service.IDynamicService;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiOperationSupport;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
@ -19,6 +19,7 @@ package com.example.demo.controller;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.example.demo.entity.Notice;
|
||||
import com.example.demo.service.INoticeService;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.common.cache.CacheNames;
|
||||
|
@ -33,7 +33,7 @@ public class DemoLauncherServiceImpl implements LauncherService {
|
||||
@Override
|
||||
public void launcher(SpringApplicationBuilder builder, String appName, String profile) {
|
||||
Properties props = System.getProperties();
|
||||
PropsUtil.setProperty(props, "spring.cloud.nacos.config.ext-config[0].data-id", NacosConstant.dataId("example", profile));
|
||||
PropsUtil.setProperty(props, "spring.cloud.nacos.config.ext-config[0].data-id", NacosConstant.dataId("blade-demo", profile));
|
||||
PropsUtil.setProperty(props, "spring.cloud.nacos.config.ext-config[0].group", NacosConstant.NACOS_CONFIG_GROUP);
|
||||
PropsUtil.setProperty(props, "spring.cloud.nacos.config.ext-config[0].refresh", NacosConstant.NACOS_CONFIG_REFRESH);
|
||||
// 自定义命名空间
|
||||
|
@ -0,0 +1 @@
|
||||
com.example.demo.launcher.DemoLauncherServiceImpl
|
@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.springblade</groupId>
|
||||
<artifactId>blade-service</artifactId>
|
||||
<version>2.5.4</version>
|
||||
<version>2.6.0</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.springblade.desk.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.common.cache.CacheNames;
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>blade-service</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.5.4</version>
|
||||
<version>2.6.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>blade-service</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.5.4</version>
|
||||
<version>2.6.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -16,9 +16,9 @@
|
||||
package org.springblade.system.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
@ -62,7 +62,7 @@ public class AuthClientController extends BladeController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页
|
||||
* 分页
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@ -73,7 +73,7 @@ public class AuthClientController extends BladeController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* 新增
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@ -83,7 +83,7 @@ public class AuthClientController extends BladeController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* 修改
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@ -93,7 +93,7 @@ public class AuthClientController extends BladeController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增或修改
|
||||
* 新增或修改
|
||||
*/
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@ -102,9 +102,9 @@ public class AuthClientController extends BladeController {
|
||||
return R.status(clientService.saveOrUpdate(authClient));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* 删除
|
||||
*/
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@ -113,5 +113,5 @@ public class AuthClientController extends BladeController {
|
||||
return R.status(clientService.deleteLogic(Func.toIntList(ids)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.springblade.system.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
|
@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.springblade.system.controller;
|
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
|
@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.springblade.system.controller;
|
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.springblade.system.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.springblade.system.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>blade-service</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.5.4</version>
|
||||
<version>2.6.0</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -18,7 +18,11 @@ package org.springblade.system.user.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.*;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
|
@ -7,12 +7,12 @@
|
||||
<parent>
|
||||
<groupId>org.springblade</groupId>
|
||||
<artifactId>SpringBlade</artifactId>
|
||||
<version>2.5.4</version>
|
||||
<version>2.6.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>blade-service</artifactId>
|
||||
<name>${project.artifactId}</name>
|
||||
<version>2.5.4</version>
|
||||
<version>2.6.0</version>
|
||||
<packaging>pom</packaging>
|
||||
<description>SpringBlade 微服务集合</description>
|
||||
|
||||
|
@ -69,19 +69,19 @@ management:
|
||||
#blade配置
|
||||
blade:
|
||||
xss:
|
||||
url:
|
||||
exclude-patterns:
|
||||
- /weixin
|
||||
enable: true
|
||||
skip-url:
|
||||
- /weixin
|
||||
secure:
|
||||
skip-url:
|
||||
- /test/**
|
||||
client:
|
||||
- client-id: sword
|
||||
path-patterns:
|
||||
- /sword/**
|
||||
- client-id: saber
|
||||
path-patterns:
|
||||
- /saber/**
|
||||
- /test/**
|
||||
client:
|
||||
- client-id: sword
|
||||
path-patterns:
|
||||
- /sword/**
|
||||
- client-id: saber
|
||||
path-patterns:
|
||||
- /saber/**
|
||||
tenant:
|
||||
column: tenant_id
|
||||
tables:
|
||||
|
20
pom.xml
20
pom.xml
@ -5,26 +5,27 @@
|
||||
|
||||
<groupId>org.springblade</groupId>
|
||||
<artifactId>SpringBlade</artifactId>
|
||||
<version>2.5.4</version>
|
||||
<version>2.6.0</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<blade.tool.version>2.5.4</blade.tool.version>
|
||||
<blade.project.version>2.5.4</blade.project.version>
|
||||
<blade.tool.version>2.6.0</blade.tool.version>
|
||||
<blade.project.version>2.6.0</blade.project.version>
|
||||
|
||||
<java.version>1.8</java.version>
|
||||
<maven.plugin.version>3.8.1</maven.plugin.version>
|
||||
<swagger.version>2.9.2</swagger.version>
|
||||
<swagger.models.version>1.5.21</swagger.models.version>
|
||||
<swagger.bootstrapui.version>1.9.6</swagger.bootstrapui.version>
|
||||
<mybatis.plus.version>3.1.2</mybatis.plus.version>
|
||||
<knife4j.version>2.0.1</knife4j.version>
|
||||
<mybatis.plus.version>3.2.0</mybatis.plus.version>
|
||||
<curator.framework.version>4.0.1</curator.framework.version>
|
||||
<protostuff.version>1.6.0</protostuff.version>
|
||||
<mica.auto.version>1.1.0</mica.auto.version>
|
||||
<alibaba.cloud.version>2.1.0.RELEASE</alibaba.cloud.version>
|
||||
<spring.boot.admin.version>2.1.5</spring.boot.admin.version>
|
||||
<alibaba.cloud.version>2.1.1.RELEASE</alibaba.cloud.version>
|
||||
<spring.boot.admin.version>2.2.0</spring.boot.admin.version>
|
||||
|
||||
<spring.boot.version>2.1.9.RELEASE</spring.boot.version>
|
||||
<spring.cloud.version>Greenwich.SR3</spring.cloud.version>
|
||||
<spring.boot.version>2.2.2.RELEASE</spring.boot.version>
|
||||
<spring.cloud.version>Hoxton.SR1</spring.cloud.version>
|
||||
<spring.platform.version>Cairo-SR8</spring.platform.version>
|
||||
|
||||
<!-- 推荐使用Harbor -->
|
||||
@ -115,6 +116,7 @@
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven.plugin.version}</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
|
@ -1,2 +1,2 @@
|
||||
REGISTER=192.168.0.157/blade
|
||||
TAG=2.5.4
|
||||
TAG=2.6.0
|
||||
|
Loading…
Reference in New Issue
Block a user