58 Star 433 Fork 114

smartboot / smart-http

 / 详情

How to get parameter from path uri /post/:zoneid

待办的
创建于  
2022-02-09 18:52

Dear dev team.
How can i get zoneid from this uri: "http://localhost:8080/post/546546"

Thanks!

评论 (2)

vuminhngoc 创建了任务

smart-http currently does not provide path-based parameter parsing capabilities, you can implement it by extend the HttpServerHandler

This feature should be a feature of the MVC framework. "smarthttp-solon-plugin" is recommended for adapting smart-HTTP to Solon

@Controller
public class DemoController{
    @Mapping("/post/{zoneid}")
    public void post(String zoneid){
        
    }
}

Sample article:https://solon.noear.org/article/90
Solon project address:https://gitee.com/noear/solon

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(3)
351975 smartdms 1578921064 15535 noear admin 1683858335
Java
1
https://gitee.com/smartboot/smart-http.git
git@gitee.com:smartboot/smart-http.git
smartboot
smart-http
smart-http

搜索帮助

53164aa7 5694891 3bd8fe86 5694891