janda
V2EX  ›  问与答

idea 启动 springboot 报错!

  •  
  •   janda · Apr 10, 2020 · 2525 views
    This topic created in 2296 days ago, the information mentioned may be changed or developed.

    idea 运行一个新的 springboot 项目、出现图下问题! idea 是昨天新安装的!

    springboot 就是一个空项目、就一个 Controller 接口、什么都没有了!

    idea:ideaIU-2019.3.4 jdk:1.8

    GIWYJf.png

    13 replies    2020-04-10 17:32:14 +08:00
    anzu
        1
    anzu  
       Apr 10, 2020
    空项目为什么会用到 sun 包
    janda
        2
    janda  
    OP
       Apr 10, 2020
    @anzu 里面有一个方法、就是调用天气的 api 、然后我 Controller 访问,其他人 clone 我的项目、可以直接用的!一点错误都没有错,代码应该没问题!试过几个人了


    有问题我觉得是 idea 没有配置好、例如 jvm 启动的时候、但是不知道该配置什么,在哪里配置!网上没有搜到相关的错误
    bigdogbigpig
        3
    bigdogbigpig  
    PRO
       Apr 10, 2020 via iPhone
    pom 文件贴出来
    janda
        4
    janda  
    OP
       Apr 10, 2020
    hfc
        5
    hfc  
       Apr 10, 2020
    -Djava.net.preferIPv4Stack=true
    启动参数添加这个试试
    oaix
        6
    oaix  
       Apr 10, 2020
    启动时加上这个参数-Dspring.jmx.enabled=true 试试
    janda
        7
    janda  
    OP
       Apr 10, 2020
    @hfc
    @oaix

    图床在维护暂时无法上传图片

    添加在 VM options 中吗、没有用!还是一样的错误
    ourslay
        8
    ourslay  
       Apr 10, 2020
    -Dcom.sun.management.jmxremote.local.only=false
    这个参数加上看看
    janda
        9
    janda  
    OP
       Apr 10, 2020
    @ourslay 老哥、你这个方法可以、这样没问题了!
    https://s1.ax1x.com/2020/04/10/GIOL5D.png

    我可以设置一劳永逸的么!这样如果启动哪里新开了、还得在加上去
    doudouwu
        10
    doudouwu  
       Apr 10, 2020
    -Dcom.sun.management.jmxremote.authenticate=false
    这个参数加上看看
    doudouwu
        11
    doudouwu  
       Apr 10, 2020
    #8 已经可以,当我没说过话
    janda
        12
    janda  
    OP
       Apr 10, 2020
    @doudouwu 感谢、我也试试你的方法
    Variazioni
        13
    Variazioni  
       Apr 10, 2020
    感觉 idea 一堆毛病和 bug 。。。还是 eclipse 用着顺手。。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2763 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 13:41 · PVG 21:41 · LAX 06:41 · JFK 09:41
    ♥ Do have faith in what you're doing.