JHipster:如何将自定义更改日志添加到liquibase';JHipster蓝图中的master.xml?

JHipster:如何将自定义更改日志添加到liquibase';JHipster蓝图中的master.xml?,jhipster,blueprint,Jhipster,Blueprint,我有一个JHipster蓝图,可以对实体服务器生成器进行总和更改。 我的问题是,如何将自定义更改日志条目附加到liquibase的master.xml文件中? 这是我目前写index.js的方法: get writing() { // Here we are not overriding this phase and hence its being handled by JHipster const phaseFromJHipster = super._writ

我有一个JHipster蓝图,可以对实体服务器生成器进行总和更改。 我的问题是,如何将自定义更改日志条目附加到liquibase的master.xml文件中? 这是我目前写index.js的方法:

 get writing() {
        // Here we are not overriding this phase and hence its being handled by JHipster
        const phaseFromJHipster = super._writing();
        const myCustomPhase = writeFiles()
        return Object.assign(phaseFromJHipster, myCustomPhase);
    }
这个id是my files.js:

const constants = require('generator-jhipster/generators/generator-constants');
const SERVER_MAIN_SRC_CUSTOM_DIR = `${constants.MAIN_DIR}java/`;

const INTERPOLATE_REGEX = constants.INTERPOLATE_REGEX;
const SERVER_MAIN_RES_DIR = constants.SERVER_MAIN_RES_DIR;

const customFiles = {
    db: [
        {
            path: SERVER_MAIN_RES_DIR,
            templates: [
                {
                    file: 'access.csv',
                    options: {interpolate: INTERPOLATE_REGEX},
                    renameTo: generator => `config/liquibase/data/${generator.entityClass}_access.csv`
                },
                {
                    file: 'changeLog.xml',
                    options: {interpolate: INTERPOLATE_REGEX},
                    renameTo: generator => `config/liquibase/changelog/${generator.changelogDate}_added_entity_${generator.entityClass}_access.xml`

                }
            ]
        },
    ],
};

module.exports = {
    writeFiles
};

function writeFiles() {
    return {
        writeServerFilee() {
            if (this.skipServer) return;
            console.log('Overriding new entity picked up from template in ' + SERVER_MAIN_SRC_CUSTOM_DIR);

            console.log('adding 
            generator => this.addChangelogToLiquibasee(`${generator.changelogDate}_added_entity_${generator.entityClass}_access.xml`);

            // write server side files
            this.writeFilesToDisk(customFiles, this, false);
        }
    };
}
现在我想将此文件添加到master.xml: {generator.changelogDate}添加了_实体${generator.entityClass}_access.xml


谢谢你的帮助

你看过这个例子吗?