当前位置 : 主页 > 编程语言 > c++ >

mybatis 自动生成代码

来源:互联网 收集:自由互联 发布时间:2021-06-30
gistfile1.txt public static void main(String[] args) {Runtime r = Runtime.getRuntime();Process p = null;try {String s = "java -jar mybatis-generator-core-1.3.2.jar -configfile generator.xml -overwrite";p = r.exec(s);BufferedReader bufferedR
gistfile1.txt
public static void main(String[] args) {
		Runtime r = Runtime.getRuntime();
		Process p = null;
		try {
			String s = "java -jar mybatis-generator-core-1.3.2.jar -configfile generator.xml -overwrite";
			p = r.exec(s);

			BufferedReader bufferedReader = new BufferedReader(
					new InputStreamReader(p.getInputStream()));
			String line = null;
			while ((line = bufferedReader.readLine()) != null) {
				System.out.println(line);
			}
		} catch (Exception e) {
			e.printStackTrace();
		}

		// System.out.println(System.getProperty("user.dir"));//user.dir指定了当前的路径
	}
mybatis-generator-core-1.3.2.jar mybatis-generator-core-1.3.2.jar
网友评论