【仅供内部供应商使用,不提供对外解答和培训】

Page tree

【仅供内部供应商使用,不提供对外解答和培训】

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

前言

当开发者开发的插件想要用户付费购买的时候,需要在插件中加入付费API,以便在试用期到期后会提供用户购买插件。

步骤

我们以主题插件开发为示例。

在接入点接口的实现类中,加上付费说明的注解(Annotation),注解的内容如下:

付费注解
package com.fr.stable.fun;

import com.fr.stable.StringUtils;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface Authorize {

    /**
     * 开发者根据插件id申请得到的验证码
     *
     * @return 验证码
     */
    String callSignKey() default StringUtils.EMPTY;

    /**
     * 验证码可以写在代码中,也可以写在文件中
     *
     * @return 存验证码的文件的路径
     */
    String callSignKeyPath() default StringUtils.EMPTY;
}

 

 

  • No labels