开发者社区> 问答> 正文

jboot升级到2.2.3,appassembler-maven-plugin打?400报错

公司安全审查需要对项目(jbootv1.6.3)的配置内容加密存储,正好v2.2.3版本新增对加密配置内容读取的支持,果断升级。

启动是在单独创建的Application类里写了main方法,原版本启动方式是

Jboot.run(args);

升级版本后启动方式改为

JbootApplication.run(args);

在idea启动能正常运行没问题,但是通过appassembler-maven-plugin插件打包后,在windows系统进入到bin目录通过命令窗口(项目名 console)的方式启动报错,不知问题出在哪里。报错内容如下:

STATUS | wrapper  | 2019/12/10 16:38:02 | --> Wrapper Started as Console
STATUS | wrapper  | 2019/12/10 16:38:03 | Launching a JVM...
INFO   | jvm 1    | 2019/12/10 16:38:05 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
INFO   | jvm 1    | 2019/12/10 16:38:05 |   Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
INFO   | jvm 1    | 2019/12/10 16:38:05 | 
INFO   | jvm 1    | 2019/12/10 16:38:05 | WrapperSimpleApp: Unable to locate a public static main method in class io.jboot.Jboot: java.lang.NoSuchMethodException: io.jboot.Jboot.main([Ljava.lang.String;)
INFO   | jvm 1    | 2019/12/10 16:38:05 | 
INFO   | jvm 1    | 2019/12/10 16:38:05 | WrapperSimpleApp Usage:
INFO   | jvm 1    | 2019/12/10 16:38:05 |   java org.tanukisoftware.wrapper.WrapperSimpleApp {app_class} [app_arguments]
INFO   | jvm 1    | 2019/12/10 16:38:05 | 
INFO   | jvm 1    | 2019/12/10 16:38:05 | Where:
INFO   | jvm 1    | 2019/12/10 16:38:05 |   app_class:      The fully qualified class name of the application to run.
INFO   | jvm 1    | 2019/12/10 16:38:05 |   app_arguments:  The arguments that would normally be passed to the
INFO   | jvm 1    | 2019/12/10 16:38:05 |                   application.
STATUS | wrapper  | 2019/12/10 16:38:07 | <-- Wrapper Stopped

 

展开
收起
爱吃鱼的程序员 2020-06-05 14:52:59 816 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB
                        <p>问题解决了,是因为升级版本以后Jboot启动类的包路径改变了,但是pom.xml中appassembler-maven-plugin插件打包的配置mainClass没有同步修改导致的。</p> 
    

    升级前

    <mainClass>io.jboot.Jboot</mainClass>

    升级后

    <mainClass>io.jboot.app.JbootApplication</mainClass>

     

    2020-06-05 14:53:13
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Build Your Next ApacheSparkJob 立即下载
低代码开发师(初级)实战教程 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载

相关镜像