package com.example.utils;import cn.hutool.core.io.FileUtil;/*** 生成空文件,方便拷贝代码* 作者:程序员青戈* 主页:https://space.bilibili.com/402779077* 网址:https://javaxm.cn/*/public class FileCreateUtils {private static final String springbootFilePath = System.getProperty("user.dir") + "/springboot/src/main/java/com/example";private static final String springbootMapperXmlPath = System.getProperty("user.dir") + "/springboot/src/main/resources/mapper";private static final String vuePagePath = System.getProperty("user.dir") + "/vue/src/views/manager";public static void createFile(String modelName) {// Controller、Service、Mapper文件FileUtil.touch(springbootFilePath + "/controller/" + modelName + "Controller.java");FileUtil.touch(springbootFilePath + "/service/" + modelName + "Service.java");FileUtil.touch(springbootFilePath + "/mapper/" + modelName + "Mapper.java");// Mapper.xmlFileUtil.touch(springbootMapperXmlPath + "/" + modelName + "Mapper.xml");// VueFileUtil.touch(vuePagePath + "/" + modelName + ".vue");}public static void main(String[] args) {// 模块的名称 大写的英文String modelName = "User";// 开始生成空文件createFile(modelName);}}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。