Logback (3) | Could not find Janino library on the class path. Skipping conditional processing.
2018-01-16 11:07
751 查看
在做Spring、Mybatis和Logback的集成时候,logback.xml中可以写表达式:
运行的时候发现报错:
Could not find Janino library on the class path. Skipping conditional processing.
查看Logback Configuration:
参考:https://logback.qos.ch/manual/configuration.html
发现需要引入Janino Library:
Conditional processing and JaninoEventEvaluator require the Janino library
Conditional processing in configuration files requires the Janino library. Moreover, the evaluator examples based on JaninoEventEvaluator require Janino as well. Once you download Janino, simply place commons-compiler.jar and janino.jar on your application’s class path.
DON’T FORGET As of Janino version 2.6.0, in addition to janino.jar, commons-compiler.jar needs to be on the class path as well.
Here is the corresponding Maven dependency declaration for your convenience.
参考:https://logback.qos.ch/setup.html#janino
<!-- if-then form --> <if condition="some conditional expression"> <then> ... </then> </if> <!-- if-then-else form --> <if condition="some conditional expression"> <then> ... </then> <else> ... </else> </if>
运行的时候发现报错:
Could not find Janino library on the class path. Skipping conditional processing.
查看Logback Configuration:
Conditional processing of configuration files Developers often need to juggle between several logback configuration files targeting different environments such as development, testing and production. These configuration files have substantial parts in common differing only in a few places. To avoid duplication, logback supports conditional processing of configuration files with the help of <if>, <then> and <else> elements so that a single configuration file can adequately target several environments. Note that conditional processing requires the Janino library.
参考:https://logback.qos.ch/manual/configuration.html
发现需要引入Janino Library:
Conditional processing and JaninoEventEvaluator require the Janino library
Conditional processing in configuration files requires the Janino library. Moreover, the evaluator examples based on JaninoEventEvaluator require Janino as well. Once you download Janino, simply place commons-compiler.jar and janino.jar on your application’s class path.
DON’T FORGET As of Janino version 2.6.0, in addition to janino.jar, commons-compiler.jar needs to be on the class path as well.
Here is the corresponding Maven dependency declaration for your convenience.
<dependency> <groupId>org.codehaus.janino</groupId> <artifactId>janino</artifactId> <version>3.0.6</version> </dependency> <!-- https://mvnrepository.com/artifact/org.codehaus.janino/commons-compiler --> <dependency> <groupId>org.codehaus.janino</groupId> <artifactId>commons-compiler</artifactId> <version>3.0.8</version> </dependency>
参考:https://logback.qos.ch/setup.html#janino
相关文章推荐
- Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath.Perhaps JAVA_HOME does not point to the JDK
- 解决LoggerFactory is not a Logback LoggerContext but Logback is on the classpath
- 问题:Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath.Perhaps JAVA_HOME does not point to the JDK
- unable to find javac compiler;com.sun.tools.javac.Mainisnotontheclasspath的问题的解决
- 安装springboot时遇到 LoggerFactory is not a Logback LoggerContext but Logback is on the classpath.问题
- Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK(转
- 解决com.sun.tools.javac.Main is not on the classpath / Unable to find a javac compiler 的问题
- Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath.Perhaps JAVA_HOME
- http:101249 .jsp could not be loaded because the requested class was not found the classpath
- could not find class file. make sure the file is compilable 解决办法
- Eclipse运行异常:Could not find the main class. Program will exit.
- java virtual machine launcher Could not find the main class. Program will exit
- could not find the main class win7/xp 双击执行jar包出现:could not find the main class
- [Java Beginner] Problem to "Could not find the main class"
- Failed to find the required library mclmcrrt8_5.dll on java.library.path 解决方法
- 使用布局的Onclick属性运行出现“Could not find a method~~(View) in the activity class com.~~”
- Caused by: java.lang.ClassNotFoundException: Didn't find class ""on path: DexPathList[[zip file "/da
- could not find the main class
- unable to start debugging on the web server. The web server could not find the requested resource
- 解决Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)