(String content,String filePath)
| 26 | } |
| 27 | |
| 28 | public void handle(String content,String filePath) { |
| 29 | log.info("handle yaml"); |
| 30 | CompilationUnit cu = parse(content); |
| 31 | YamlPrinter printer = new YamlPrinter(true); |
| 32 | log.info(printer.output(cu)); |
| 33 | FileWriter fileWriter = new FileWriter(filePath); |
| 34 | fileWriter.write(printer.output(cu)); |
| 35 | log.info("write yaml success"); |
| 36 | log.info("Yaml file path: {}",filePath); |
| 37 | log.info("handle yaml end"); |
| 38 | } |
| 39 | } |