<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>代码修饰器</title>
<link rel="stylesheet" href="resources/layui/css/layui.css">
</head>
<body style="padding: 20px">
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
<legend>默认修饰</legend>
</fieldset>
<pre class="layui-code">
public class TestGenerator {
public static void generator() throws Exception{
List<String> warnings = new ArrayList<String>();
boolean overwrite = true;
//指定 逆向工程配置文件
File configFile = new File("xml/config3.xml");
ConfigurationParser cp = new ConfigurationParser(warnings);
Configuration config = cp.parseConfiguration(configFile);
DefaultShellCallback callback = new DefaultShellCallback(overwrite);
MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config,callback, warnings);
myBatisGenerator.generate(null);
}
public static void main(String[] args) throws Exception {
generator();
System.out.println("生成完成,请刷新项目");
}
}
</pre>
<br>
<pre class="layui-code">
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
<legend>默认修饰</legend>
</fieldset>
</pre>
<script src="resources/layui/layui.js"></script>
<script type="text/javascript">
layui.use(['element', 'jquery', 'code'], function () {
var $ = layui.jquery;
var element = layui.element;
layui.code({
title: '最NB的代码',
about: false,
skin: 'notepad',
//encode:true,
});
});
</script>
</body>
</html>
代码修饰器
猜你喜欢
转载自blog.csdn.net/qq_39368007/article/details/105600229
今日推荐
周排行