🎉 2.0.0-RC1.
This commit is contained in:
parent
25c5e34053
commit
452db24b15
|
|
@ -13,7 +13,7 @@ SpringBlade 2.0 是一个基于 Spring Boot 2 & Spring Cloud Finchley & Mybatis
|
||||||
|
|
||||||
## 工程结构
|
## 工程结构
|
||||||
```
|
```
|
||||||
bladex
|
SpringBlade
|
||||||
├── blade-auth -- 授权服务提供
|
├── blade-auth -- 授权服务提供
|
||||||
├── blade-common -- 常用工具封装包
|
├── blade-common -- 常用工具封装包
|
||||||
├── blade-gateway -- Spring Cloud 网关
|
├── blade-gateway -- Spring Cloud 网关
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,11 @@ import org.springblade.core.launch.constant.AppConstant;
|
||||||
import org.springblade.core.launch.BladeApplication;
|
import org.springblade.core.launch.BladeApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* admin启动器
|
||||||
|
*
|
||||||
|
* @author Chill
|
||||||
|
*/
|
||||||
@EnableAdminServer
|
@EnableAdminServer
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class BladeAdminApplication {
|
public class BladeAdminApplication {
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@ import org.springblade.support.BladeGenerator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 代码生成器
|
* 代码生成器
|
||||||
|
*
|
||||||
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class CodeGenerator {
|
public class CodeGenerator {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,11 @@ import org.springblade.core.launch.BladeApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.cloud.config.server.EnableConfigServer;
|
import org.springframework.cloud.config.server.EnableConfigServer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务中心启动器
|
||||||
|
*
|
||||||
|
* @author Chill
|
||||||
|
*/
|
||||||
@EnableConfigServer
|
@EnableConfigServer
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class BladeConfigApplication {
|
public class BladeConfigApplication {
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,9 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Feign接口类
|
* Notice Feign接口类
|
||||||
|
*
|
||||||
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@FeignClient(
|
@FeignClient(
|
||||||
value = AppConstant.APPLICATION_DESK_NAME
|
value = AppConstant.APPLICATION_DESK_NAME
|
||||||
|
|
@ -36,6 +38,7 @@ public interface INoticeClient {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取notice列表
|
* 获取notice列表
|
||||||
|
*
|
||||||
* @param number
|
* @param number
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ public interface IDictClient {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取字典表
|
* 获取字典表
|
||||||
|
*
|
||||||
* @param code 字典编号
|
* @param code 字典编号
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,11 @@ import org.springblade.system.entity.Dict;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Feign失败配置
|
||||||
|
*
|
||||||
|
* @author Chill
|
||||||
|
*/
|
||||||
public class IDictClientFallback implements IDictClient {
|
public class IDictClientFallback implements IDictClient {
|
||||||
@Override
|
@Override
|
||||||
public R<String> getValue(String code, Integer dictKey) {
|
public R<String> getValue(String code, Integer dictKey) {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,11 @@ import lombok.Data;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户信息
|
||||||
|
*
|
||||||
|
* @author Chill
|
||||||
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ApiModel(description = "用户信息")
|
@ApiModel(description = "用户信息")
|
||||||
public class UserInfo implements Serializable {
|
public class UserInfo implements Serializable {
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,8 @@ import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Feign接口类
|
* User Feign接口类
|
||||||
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@FeignClient(
|
@FeignClient(
|
||||||
value = AppConstant.APPLICATION_USER_NAME
|
value = AppConstant.APPLICATION_USER_NAME
|
||||||
|
|
@ -35,6 +36,7 @@ public interface IUserClient {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用户信息
|
* 获取用户信息
|
||||||
|
*
|
||||||
* @param account 账号
|
* @param account 账号
|
||||||
* @param password 密码
|
* @param password 密码
|
||||||
* @return
|
* @return
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,9 @@ import org.springframework.cloud.client.SpringCloudApplication;
|
||||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 首页
|
* Desk启动器
|
||||||
|
*
|
||||||
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@SpringCloudApplication
|
@SpringCloudApplication
|
||||||
@EnableFeignClients(AppConstant.BASE_PACKAGES)
|
@EnableFeignClients(AppConstant.BASE_PACKAGES)
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,11 @@ import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notice Feign
|
||||||
|
*
|
||||||
|
* @author Chill
|
||||||
|
*/
|
||||||
@ApiIgnore()
|
@ApiIgnore()
|
||||||
@RestController
|
@RestController
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
|
|
||||||
|
|
@ -66,9 +66,9 @@ public class CodeController extends BladeController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name="codeName", value = "模块名", paramType = "query", dataType = "string"),
|
@ApiImplicitParam(name = "codeName", value = "模块名", paramType = "query", dataType = "string"),
|
||||||
@ApiImplicitParam(name="tableName", value = "表名", paramType = "query", dataType = "string"),
|
@ApiImplicitParam(name = "tableName", value = "表名", paramType = "query", dataType = "string"),
|
||||||
@ApiImplicitParam(name="modelName", value = "实体名", paramType = "query", dataType = "string")
|
@ApiImplicitParam(name = "modelName", value = "实体名", paramType = "query", dataType = "string")
|
||||||
})
|
})
|
||||||
@ApiOperation(value = "分页", notes = "传入code", position = 2)
|
@ApiOperation(value = "分页", notes = "传入code", position = 2)
|
||||||
public R<IPage<CodeVO>> list(@ApiIgnore @RequestParam Map<String, Object> code, Query query) {
|
public R<IPage<CodeVO>> list(@ApiIgnore @RequestParam Map<String, Object> code, Query query) {
|
||||||
|
|
|
||||||
|
|
@ -63,8 +63,8 @@ public class DictController extends BladeController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name="code", value = "字典编号", paramType = "query", dataType = "string"),
|
@ApiImplicitParam(name = "code", value = "字典编号", paramType = "query", dataType = "string"),
|
||||||
@ApiImplicitParam(name="dictValue", value = "字典名称", paramType = "query", dataType = "string")
|
@ApiImplicitParam(name = "dictValue", value = "字典名称", paramType = "query", dataType = "string")
|
||||||
})
|
})
|
||||||
@ApiOperation(value = "列表", notes = "传入dict", position = 2)
|
@ApiOperation(value = "列表", notes = "传入dict", position = 2)
|
||||||
public R<List<INode>> list(@ApiIgnore @RequestParam Map<String, Object> dict) {
|
public R<List<INode>> list(@ApiIgnore @RequestParam Map<String, Object> dict) {
|
||||||
|
|
|
||||||
|
|
@ -66,9 +66,9 @@ public class ParamController extends BladeController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name="paramName", value = "参数名称", paramType = "query", dataType = "string"),
|
@ApiImplicitParam(name = "paramName", value = "参数名称", paramType = "query", dataType = "string"),
|
||||||
@ApiImplicitParam(name="paramKey", value = "参数键名", paramType = "query", dataType = "string"),
|
@ApiImplicitParam(name = "paramKey", value = "参数键名", paramType = "query", dataType = "string"),
|
||||||
@ApiImplicitParam(name="paramValue", value = "参数键值", paramType = "query", dataType = "string")
|
@ApiImplicitParam(name = "paramValue", value = "参数键值", paramType = "query", dataType = "string")
|
||||||
})
|
})
|
||||||
@ApiOperation(value = "分页", notes = "传入param", position = 2)
|
@ApiOperation(value = "分页", notes = "传入param", position = 2)
|
||||||
public R<IPage<ParamVO>> list(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
|
public R<IPage<ParamVO>> list(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
|
||||||
|
|
|
||||||
|
|
@ -36,13 +36,6 @@ public class ParamWrapper extends BaseEntityWrapper<Param, ParamVO> {
|
||||||
@Override
|
@Override
|
||||||
public ParamVO entityVO(Param param) {
|
public ParamVO entityVO(Param param) {
|
||||||
ParamVO paramVO = BeanUtil.copy(param, ParamVO.class);
|
ParamVO paramVO = BeanUtil.copy(param, ParamVO.class);
|
||||||
|
|
||||||
/*R<String> dict = dictClient.getValue("param" , paramVO.getCategory());
|
|
||||||
if (dict.isSuccess()) {
|
|
||||||
String categoryName = dict.getData();
|
|
||||||
paramVO.setCategoryName(categoryName);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
return paramVO;
|
return paramVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user