Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在打包SpringBootMaven时修改配置文件名,例如config。xml。重新配置。XML_Maven - Fatal编程技术网

如何在打包SpringBootMaven时修改配置文件名,例如config。xml。重新配置。XML

如何在打包SpringBootMaven时修改配置文件名,例如config。xml。重新配置。XML,maven,Maven,我在兼容老项目时必须用到个配置的配置文件 我该怎么用弹簧靴专家打包时如何修改配置文件名称,比如把config.xml.re修改成config.xml 已经解决 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <e

我在兼容老项目时必须用到个配置的配置文件 我该怎么用弹簧靴专家打包时如何修改配置文件名称,比如把config.xml.re修改成config.xml

已经解决

 <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>run</goal>
                    </goals>
                    <configuration>
                        <tasks>
                            <move file="${project.build.directory}/classes/config-${profileActive}.xml"
                                  tofile="${project.build.directory}/classes/config.xml"/>
                        </tasks>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>

org.apache.maven.plugins
maven antrun插件
包裹
跑

请讲英语(請使用英文)这与Spring Boot无关,你可以通过使用Maven插件来实现。我想我已经解决了。你解决了吗?