+
Skip to content

添加自定义resftful接口 #13

@ShengyuanLu

Description

@ShengyuanLu

你好,我想确认一个问题:我想下面加一个自己的resftful接口,例如:/@in/api/abc
我目前的做法是新写一个类ABCHandler实现接口ViFunctionHandler,然后在VIApiHandler的构造方法里面添加注册:

 public VIApiHandler(){ 
         ...
        this.register(new CodeHandler());
        this.register(new ABCHandler()); // <-我添加的服务接口实现
 }

测试下来可以工作。请确认一下这种做法是不是合理?谢谢!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载