Replies: 3 comments
-
@smallodd It is also possible to directly push RPC interfaces on the interface module. Alternatively, a configuration similar to Spring's profiles can be used for multiple environments, and then a makefile can be used to orchestrate the execution commands. Supporting multiple appTokens would actually make it more difficult for smart-doc to clearly define user intentions; this is just one of the ideas. |
Beta Was this translation helpful? Give feedback.
-
So, for scenarios where a single module has HTTP interfaces for different business domains, do you have any good suggestions? |
Beta Was this translation helpful? Give feedback.
-
As I mentioned earlier, using multiple environments is an option. Maven itself supports multiple environments as well, similar to using different smart-doc.json configurations for different environments, which is entirely doable. Another option is to include a makefile in the project to orchestrate your build commands. This way, you can directly click to execute the makefile commands in your development tools. On Windows, you might need to install some additional software to support makefiles, but there are similar instructions in the official smart-doc documentation. 就按照前面我说的搞多环境,maven本省也支持多环境的,类似不同环境用不同的smart-doc.json配置,这个是完全可以做到的。另个是在项目里加一个makefile去编排你的构建指令,这样也可以直接在开发工具上去点击执行makefile的命令,windows上稍微需要安装点其他东西支持makefile就行,smart-doc官方文档上也有类似说明 |
Beta Was this translation helpful? Give feedback.
-
Currently, a module only supports one appToken. When my project has a module that contains various or multiple project interfaces, I can only manually replace them. For example, I have an interface module specifically for exposing interfaces, which includes both RPC and HTTP protocol interfaces. When pushing to torna, I want to separate them into different applications according to the protocol. Another example is when I have a module that includes both customer-facing HTTP interfaces and internal user-facing HTTP interfaces; in this case, I also need to differentiate between different applications.
现在一个module 只支持一个 appToken,当我的项目中一个module 包含多种或者多个项目的接口时就只能手动替换。例如我有一个接口module,专门用于接口的暴露,里面即包括rpc协议的接口又包括http协议的接口推送到torna时想按照http一个应用 rpc一个应用。再例如我有一个 module,里面即包含对客户的http接口又包含对内部用户的http接口 这个时候也需要按照不同的应用做区分
Beta Was this translation helpful? Give feedback.
All reactions