aoscici2000
V2EX  ›  Java

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

  •  
  •   aoscici2000 · May 16, 2019 · 3028 views
    This topic created in 2558 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
        1
    HarryQu  
       May 16, 2019   ❤️ 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
        2
    Jrue0011  
       May 16, 2019   ❤️ 1

    mvn spring-boot:run -Dspring-boot.run.arguments=--server.port=8999
    night98
        3
    night98  
       May 17, 2019
    还可以在系统参数配置
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   960 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 22:50 · PVG 06:50 · LAX 15:50 · JFK 18:50
    ♥ Do have faith in what you're doing.