类 GetDictMethod

java.lang.Object
com.publiccms.common.base.BaseMethod
com.publiccms.views.method.tools.GetDictMethod
所有已实现的接口:
freemarker.template.TemplateMethodModel, freemarker.template.TemplateMethodModelEx, freemarker.template.TemplateModel

@Component public class GetDictMethod extends BaseMethod
getDict 获取分词词典

返回结果

  • string 自定义分词词典
使用示例

${getDict()}

<script>
$.getJSON('${site.dynamicPath}api/method/getDict?appToken=接口访问授权Token', function(data){
console.log(data);
});
</script>
 
  • 字段详细资料

  • 构造器详细资料

    • GetDictMethod

      public GetDictMethod()
  • 方法详细资料

    • execute

      public Object execute(List<freemarker.template.TemplateModel> arguments) throws freemarker.template.TemplateModelException
      指定者:
      execute 在类中 BaseMethod
      抛出:
      freemarker.template.TemplateModelException
    • minParametersNumber

      public int minParametersNumber()
      指定者:
      minParametersNumber 在类中 BaseMethod
      返回:
      min parameters number
    • needAppToken

      public boolean needAppToken()
      指定者:
      needAppToken 在类中 BaseMethod
      返回:
      whether to need app token