检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
系统开始创建服务,并生成该服务的代码。 图1 创建服务并生成代码包 父主题: 服务管理
系统开始创建服务,并生成该服务的基本代码。代码生成后,界面会提供一个压缩包,可直接下载使用。压缩包格式为“服务名称+唯一ID”。 图2 开始创建微服务 到此您已完成整个企业核心应用的创建。
public boolean isAuth(){ return false; } 解决方案 在is方法上面添加@JsonIgnore注解。 @JsonIgnore public boolean isAuth(){ return false; } 父主题: 常见问题
订单系统服务开发示例 业务场景及设计流程说明 在AstroPro中,用户通过业务建模,可生成高可用、高可靠、以及安全稳定的企业级IT应用框架。本入门通过创建一个简单的订单系统,帮助您快速上手AstroPro。
= next) { return next.process(dataEvent); } return true; } public abstract boolean doProcess(DataEvent dataEvent
系统开始创建服务,最终生成的服务结构如图7所示。 图7 生成服务 此方式下生成的代码会在utils目录中生成TenantIdFilter和TenantIdWebMvcHandler两个类。
系统开始创建服务,并生成该服务的基本代码。
全局模板为系统预置模板,不可编辑。 选择对应项目,则模板范围为指定项目,选择工作空间,则模板范围为工作空间内所有项目。 非工作空间管理员仅可创建对应项目模板,具体权限约束可参考了解AstroPro中角色。 图1 选择创建模板的项目 在架构模板页面,单击“新建架构模板”。
fallbackTest", policy = CacheOrder.CACHEFIRST, cacheManagerName = "test") public String testClientControlJiangji(Integer id) { int i = 1 / id; return
用户可在此类中覆写基本接口中的方法或者增加自定义的方法 |-- integration # 防腐层,集成第三方服务(跨进程的外部服务),隔离外部系统的影响(可选项) GatewayService.java
b; } } return null; } } 16、x-enum-class-name 作用 用于标识查询参数对应的枚举类。
# 工具类(必填项) |-- exception # 异常类(必填项) |-- integration # 集成第三方服务,隔离外部系统的影响
@ClientControl(fallback = "customFallback") public String testCustomDowngrade(Integer id) { int i = 1 / id; return new User(id, "test", 12)
的上下文里,如下为默认实现: @Bean @ConditionalOnMissingBean(MethodAnnotationHandler.class) public MethodAnnotationHandler methodAnnotationHandler() { return
@ClientControl(rule = "timeLimitTest") public String testTimelimit(long sleepTime) { return "demo"; } 父主题: devspore-clientcontrol使用指南
policy = CacheOrder.SERVICECALLFIRST, cacheManagerName = "test") public String testClientControlJiangji(Integer id) { int i = 1 / id; return
return true; } } 配置文件。 devspore: horizon: processors: authorizerProcessor AuthSubject对象 AuthSubject对象即鉴权主体。
module: RetryFirst time-limit: enable: true timeout-duration: 3000 # 此处配置的是超时时间 cancel-running-future
return userInfo; } /** * 若token未定义在header中,使用该接口 * * @param request * @param response * @return UserInfo
/** * AddOrder Method * * @param order order * @return Order */ @Extension(operation = Operation.CREATE, name = "Order") @Override public Order