spring 项目分开发和生产环境

1、pom 文件修改

<profile>
			<!-- 本地开发环境 -->
			<id>dev</id>
			<properties>
				<profiles.active>dev</profiles.active>
				<webXmlPath>src/main/filters/dev/web.xml</webXmlPath> 
			</properties>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
		</profile>
		<profile>
			<!-- 生产环境 -->
			<id>prod</id>
			<properties>
				<profiles.active>prod</profiles.active>
				<webXmlPath>src/main/filters/prod/web.xml</webXmlPath>
			</properties>
		</profile>

  

www.beicaiduo.com
原文地址:https://www.cnblogs.com/hoge66/p/8435874.html