aoscici2000
V2EX  ›  Java

mvn spring-boot:run 启动怎么改变端口

  •  
  •   aoscici2000 · May 16, 2019 · 3440 views
    This topic created in 2730 days ago, the information mentioned may be changed or developed.

    如题, 网上找了下很多都说是 mvn spring-boot:run -Drun.arguments=–-server.port=8999

    好像并没有用, 依然是使用配置里写的值

    3 replies  •  2019-05-17 00:20:04 +08:00
    HarryQu
    HarryQu
    May 16, 2019❤️1
    1
    mvn spring-boot:run -Dspring-boot.run.arguments=--server.port=8085
    or
    mvn spring-boot:run -Dspring-boot.run.jvmArguments=--server.port=8085

    参考链接 https://stackoverflow.com/questions/21083170/how-to-configure-port-for-a-spring-boot-application
    Jrue0011
    Jrue0011
    May 16, 2019❤️1
    2
    用
    mvn spring-boot:run -Dspring-boot.run.arguments=--server.port=8999
    night98
    night98
    May 17, 2019
    3
    还可以在系统参数配置
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5840 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 03:02 · PVG 11:02 · LAX 19:02 · JFK 22:02
    ♥ Do have faith in what you're doing.