one-jar remove verbose warning information on application load

后端 未结 9 2007
一个人的身影
一个人的身影 2021-02-19 17:18

I am using Maven, with the one-jar pluggin, but when I run the one jar executable, I\'m greeted with a wall of warnings, this is unacceptable for use

I\'ve looked at eve

9条回答
  •  佛祖请我去吃肉
    2021-02-19 17:42

    I found that if you create a one-jar.properties file and put it in the root of your runtime classpath (ie, where your project .class files end up), it will be read by the one-jar Boot class. An entry in this properties file such as:

    one-jar.silent=true
    

    will suppress the one-jar log messages altogether.

    Other values that the Boot class looks for are one-jar.info and one-jar.verbose.

    The default level is INFO. As Pascal Thivent indicated above, you can also set a System property via the command line with the -D parameter of the java command, but if you do not want to have to stipulate or remember this, the properties file approach works great.

提交回复
热议问题