spring: server: port=80: application: name: dtsociety-generator datasource: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://127.0.0.1:3306/aaa?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true username: root password: 123456 修改正确其中server.port
时间: 2024-02-26 13:56:37 浏览: 121
openapi-generator-cli:https:github.comOpenAPIToolsopenapi-generator的节点包包装器
要修改端口的话,只需要将 `server.port` 的值改为想要的端口号即可,比如将其改为 `8080`,修改后的配置文件如下所示:
```
spring:
server:
port: 8080
application:
name: dtsociety-generator
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/aaa?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
username: root
password: 123456
```
修改完成后,应用会使用新的端口号启动。
阅读全文