feat(): 添加车辆类型缓存方法
parent
f57deada17
commit
2c5387f048
|
@ -7,7 +7,7 @@ nacos:
|
||||||
addr: 47.101.49.53:8848
|
addr: 47.101.49.53:8848
|
||||||
user-name: nacos
|
user-name: nacos
|
||||||
password: nacos
|
password: nacos
|
||||||
namespace: seven
|
namespace: vehicle
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
|
|
|
@ -7,7 +7,7 @@ nacos:
|
||||||
addr: 47.101.49.53:8848
|
addr: 47.101.49.53:8848
|
||||||
user-name: nacos
|
user-name: nacos
|
||||||
password: nacos
|
password: nacos
|
||||||
namespace: seven
|
namespace: vehicle
|
||||||
|
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
|
|
@ -45,7 +45,11 @@ public class VehicleTypeController {
|
||||||
@RequestMapping(path = "/", method = RequestMethod.POST)
|
@RequestMapping(path = "/", method = RequestMethod.POST)
|
||||||
@Operation(summary = "车辆类型列表",description = "车辆类型列表")
|
@Operation(summary = "车辆类型列表",description = "车辆类型列表")
|
||||||
public Result<List<VehicleType>> findAll(){
|
public Result<List<VehicleType>> findAll(){
|
||||||
return Result.success(vehicleTypeService.list());
|
List<VehicleType> list = vehicleTypeService.list();
|
||||||
|
list.forEach(vehicleType -> {
|
||||||
|
vehicleTypeCacheService.put(String.valueOf(vehicleType.getVehicleTypeId()), vehicleType);
|
||||||
|
});
|
||||||
|
return Result.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -8,7 +8,7 @@ nacos:
|
||||||
addr: 47.101.49.53:8848
|
addr: 47.101.49.53:8848
|
||||||
user-name: nacos
|
user-name: nacos
|
||||||
password: nacos
|
password: nacos
|
||||||
namespace: seven
|
namespace: vehicle
|
||||||
# SPRING_AMQP_DESERIALIZATION_TRUST_ALL=true spring.amqp.deserialization.trust.all
|
# SPRING_AMQP_DESERIALIZATION_TRUST_ALL=true spring.amqp.deserialization.trust.all
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
|
|
@ -7,7 +7,7 @@ nacos:
|
||||||
addr: 47.101.49.53:8848
|
addr: 47.101.49.53:8848
|
||||||
user-name: nacos
|
user-name: nacos
|
||||||
password: nacos
|
password: nacos
|
||||||
namespace: seven
|
namespace: vehicle
|
||||||
|
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
|
|
@ -7,7 +7,7 @@ nacos:
|
||||||
addr: 47.101.49.53:8848
|
addr: 47.101.49.53:8848
|
||||||
user-name: nacos
|
user-name: nacos
|
||||||
password: nacos
|
password: nacos
|
||||||
namespace: seven
|
namespace: vehicle
|
||||||
|
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
|
|
@ -7,7 +7,7 @@ nacos:
|
||||||
addr: 47.101.49.53:8848
|
addr: 47.101.49.53:8848
|
||||||
user-name: nacos
|
user-name: nacos
|
||||||
password: nacos
|
password: nacos
|
||||||
namespace: seven
|
namespace: vehicle
|
||||||
|
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
|
|
@ -7,7 +7,7 @@ nacos:
|
||||||
addr: 47.101.49.53:8848
|
addr: 47.101.49.53:8848
|
||||||
user-name: nacos
|
user-name: nacos
|
||||||
password: nacos
|
password: nacos
|
||||||
namespace: seven
|
namespace: vehicle
|
||||||
# SPRING_AMQP_DESERIALIZATION_TRUST_ALL=true spring.amqp.deserialization.trust.all
|
# SPRING_AMQP_DESERIALIZATION_TRUST_ALL=true spring.amqp.deserialization.trust.all
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
|
|
@ -7,7 +7,7 @@ nacos:
|
||||||
addr: 47.101.49.53:8848
|
addr: 47.101.49.53:8848
|
||||||
user-name: nacos
|
user-name: nacos
|
||||||
password: nacos
|
password: nacos
|
||||||
namespace: seven
|
namespace: vehicle
|
||||||
# SPRING_AMQP_DESERIALIZATION_TRUST_ALL=true spring.amqp.deserialization.trust.all
|
# SPRING_AMQP_DESERIALIZATION_TRUST_ALL=true spring.amqp.deserialization.trust.all
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
|
|
@ -7,7 +7,7 @@ nacos:
|
||||||
addr: 47.101.49.53:8848
|
addr: 47.101.49.53:8848
|
||||||
user-name: nacos
|
user-name: nacos
|
||||||
password: nacos
|
password: nacos
|
||||||
namespace: seven
|
namespace: vehicle
|
||||||
# SPRING_AMQP_DESERIALIZATION_TRUST_ALL=true spring.amqp.deserialization.trust.all
|
# SPRING_AMQP_DESERIALIZATION_TRUST_ALL=true spring.amqp.deserialization.trust.all
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
|
|
@ -7,7 +7,7 @@ nacos:
|
||||||
addr: 47.101.49.53:8848
|
addr: 47.101.49.53:8848
|
||||||
user-name: nacos
|
user-name: nacos
|
||||||
password: nacos
|
password: nacos
|
||||||
namespace: seven
|
namespace: vehicle
|
||||||
|
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
|
Loading…
Reference in New Issue