wansenai / summer-boot

Summer Boot (async web framework)
https://crates.io/crates/summer-boot
Apache License 2.0
128 stars 27 forks source link

Parsing YML needs to be enhanced #56

Open Jzow opened 2 years ago

Jzow commented 2 years ago

At present, we can complete TCP listening by taking the port, but we need to monitor the context_path for parsing

  1. Add context_path support fields
  2. Modify the read code of the loading configuration file and add the read context_path field information
Jzow commented 2 years ago

@Yangandmore 我不确定这样对macro 宏应该没有什么影响吧,会修改 autoconfigure module 的代码

Yangandmore commented 2 years ago

这里的功能实现可以具体描述一下吗?

Jzow commented 2 years ago

这里的功能实现可以具体描述一下吗?

可以理解我们需要扩展读取yml配置文件的代码,因为现在只读取了port filed,context_path并没有读取,如果开发者希望接口有前缀,这里所以需要实现解析context_path, 比如

server:
  port: 8080
  context_path: tencent

对应的api url: http:{ip}:8080/tencent

Jzow commented 2 years ago

@summer-os/back-end-team 这个实现不是很复杂 team 哪位member谁可以实现吗

Yangandmore commented 2 years ago

我知道了,这边是需要实现url链接一下。

Yangandmore commented 2 years ago

晚上有空我这边来弄一下

Jzow commented 2 years ago

57 fixed