<updateid="createSpiderTable"parameterType="com.quanchengle.app.spider.CreateSpiderTableAndTableName"> CREATE TABLE IF NOT EXISTS${tableName}( <iftest="tableFields==null or tableFields.size()==0"> `id` int NOT NULL AUTO_INCREMENT COMMENT'编号' </if> <foreach collection="tableFields"item=...
如果想要把xml文件放到Resources目录下 可以在application.properties添加 mybatis-plus.mapper-locations=classpath*:/com.kl.sms.mapper/*.xml
public class GenerateCodeRun { public static void main(String[] args) throws DocumentException, IOException, TemplateException { //找到配置文件的路径 String path = System.getProperty("user.dir") + "\\src\\main\\resources\\" + "GenerateConfig.xml"; final Config config = ConfigParser.getConfig(...
mybatis-plus: mapper-locations: classpath*:mapper/*/*Mapper.xml
Java使用MyBatis-Plus生成动态数据库表XML配置 <updateid="createSpiderTable"parameterType="com.quanchengle.app.spider.CreateSpiderTableAndTableName"> CREATE TABLE IF NOT EXISTS${tableName}( <iftest="tableFields==null or tableFields.size()==0">...