Fast Request
Get start
Features
What's New
Script
🔥 Teamwork
Contact us
🎯 Faq
  • Introduction
  • Install
    • Make icon move
    • Project-level domain config
    • Project-level config
    • SearchEveryWhere
    • API group
    • Debug API & send request
    • Download file
    • Stop API request
    • Navigate to current method
    • Save request
    • Temporary request
    • Apifox integration
    • Postman Sync
    • Re generate
    • cURL import
    • cURL copy
    • Single url copy
    • API document sync
    • History request
    • Setting manager
    • Full screen
    • Annual report
    • Document / Contact
    • Html preview
    • Swagger default value
    • Auto Description
    • API list
    • APIs export to Postman
    • APIs import and export
    • Batch export API doc
    • API navigate tree
    • API list preview
    • Api comment preview
    • Script
    • Function
    • Quickly add header
    • Auto domain
    • AI
    • Headers group
    • Headers batch edit
    • Custom toolbar
    • Json grammar check
  • Script
  • Environment
  • What's New
  • Teamwork
  • Buy Plugin
  • Version compare
  • Contacts
  • FAQ
  • Price adjust
  • EULA
  • History changes
  • Features

Auto domain


Auto domain

Version required: 2023.1.4

Trigger point

When clicking on the left side of the method, if no domain is configured, it will be automatically created.

Project name

The project name is taken from the api module name

Why? For example, there are two modules' APIs under the project, Module-1 and Module-2. If the domain name value of Module-1 is already stored and when clicking the on the left of the API method under Module-2, the old version cannot automatically switch the project name.

It is recommended not to manually add the project name later because the plugin cannot find the mapping relationship, which may easily result in using the domain name of Module-1 instead of the domain name of Module-2 when saving the API of Module-2.

Therefore, another benefit of auto domain name is the automatic switching of API domain names. If it does not exist, it will be automatically generated. If there is a need for improvement, developers only need to modify the domain name value! The plugin will automatically adapt!

Configuration file parsing logic

  1. Read application.yml or bootstrap.yml. If the configuration server.port or server.servlet.context-path can be found, take the configuration.
  2. If the above configuration files cannot find server.port or server.servlet.context-path, read spring.profiles.active as the variable env. Then look for application-env.yml or bootstrap-env.yml to find the configuration server.port or server.servlet.context-path.
  3. The logic for properties files is similar.
  4. If the above configurations cannot be found, use port=8080, context-path=/.
  5. The project name is taken from the module name.
  6. spring.profiles.active does not support Maven variables parse, for example [email protected]@.

Config switch

autoDomain

Last update: 5/9/2025, 1:23:16 AM
Prev
Quickly add header
Next
AI
Theme by vuepress-theme-hope
Copyright © 2021-present Kings