File tree Expand file tree Collapse file tree 8 files changed +13
-6
lines changed
src/com/shuzijun/leetcode/plugin/utils Expand file tree Collapse file tree 8 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 33 - [ English Document] ( )
44 - [ 中文文档] ( https://github.com/shuzijun/leetcode-editor/blob/master/CustomCode_ZH.md )
55 <p align =" center " >
6- <img src =" https://raw.githubusercontent.com/shuzijun/leetcode-editor/dev /doc/customConfig-100.gif " alt =" demo " />
6+ <img src =" https://raw.githubusercontent.com/shuzijun/leetcode-editor/master /doc/customConfig-100.gif " alt =" demo " />
77 </p >
Original file line number Diff line number Diff line change 33 - [ English Document] ( https://github.com/shuzijun/leetcode-editor/blob/master/CustomCode.md )
44 - [ 中文文档] ( #配置 )
55 <p align =" center " >
6- <img src =" https://raw.githubusercontent.com/shuzijun/leetcode-editor/dev /doc/customConfig-100.gif " alt =" demo " />
6+ <img src =" https://raw.githubusercontent.com/shuzijun/leetcode-editor/master /doc/customConfig-100.gif " alt =" demo " />
77 </p >
88
99## 配置
1010<p align =" center " >
11- <img src =" https://raw.githubusercontent.com/shuzijun/leetcode-editor/dev /doc/customConfig.png " alt =" customConfig " />
11+ <img src =" https://raw.githubusercontent.com/shuzijun/leetcode-editor/master /doc/customConfig.png " alt =" customConfig " />
1212</p >
1313
1414 - ** Custom code template** : 开启使用自定义模板,否则使用默认生成格式
Original file line number Diff line number Diff line change 1616
1717## Local debugging
1818<p align =" center " >
19- <img src =" https://raw.githubusercontent.com/shuzijun/leetcode-editor/dev /doc/customConfig-100.gif " alt =" demo " />
19+ <img src =" https://raw.githubusercontent.com/shuzijun/leetcode-editor/master /doc/customConfig-100.gif " alt =" demo " />
2020</p >
2121
2222### Installation
Original file line number Diff line number Diff line change 1515
1616## 本地调试
1717<p align =" center " >
18- <img src =" https://raw.githubusercontent.com/shuzijun/leetcode-editor/dev /doc/customConfig-100.gif " alt =" demo " />
18+ <img src =" https://raw.githubusercontent.com/shuzijun/leetcode-editor/master /doc/customConfig-100.gif " alt =" demo " />
1919</p >
2020
2121### 安装
Original file line number Diff line number Diff line change 55import org .apache .velocity .runtime .RuntimeConstants ;
66
77import java .io .StringWriter ;
8+ import java .util .Properties ;
89
910/**
1011 * @author shuzijun
@@ -21,7 +22,13 @@ public class VelocityUtils {
2122 engine .setProperty (RuntimeConstants .PARSER_POOL_SIZE , 20 );
2223 engine .setProperty (RuntimeConstants .INPUT_ENCODING , "UTF-8" );
2324 engine .setProperty (RuntimeConstants .OUTPUT_ENCODING , "UTF-8" );
24- engine .init ();
25+
26+ Properties props = new Properties ();
27+ props .put ("runtime.log.logsystem.class" , "org.apache.velocity.runtime.log.SimpleLog4JLogSystem" );
28+ props .put ("runtime.log.logsystem.log4j.category" , "velocity" );
29+ props .put ("runtime.log.logsystem.log4j.logger" , "velocity" );
30+
31+ engine .init (props );
2532 }
2633
2734 public static String convert (String template , Object data ) {
You can’t perform that action at this time.
0 commit comments