Spring Boot 項目配置

1 . 端口配置,在application.yml裏設置server.port屬性 配置context-path,如果不配置context-path,訪問路徑是localhost:8081/hello 如果配置context-path: /test, 那麼訪問路徑就變換成localhost:8081/test/hello 屬性注入 配置裏使用配置 對象屬性注入 6. 開發環境與生產環境區分
相關文章
相關標籤/搜索