maven中多环境配置
2023-09-10
maven中配置多环境的写法
<!-- 多环境配置--> <profiles> <!-- 开发环境--> <profile> <id>env_dep</id> <properties> <jdbc.url>jdbc:mysql://127.0.0.1:3306/db01?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT</jdbc.url> </properties> <activation> <activeByDefault>true</activeByDefault> </activation> </profile> <!-- 多环境--> <profile> <id>env_pro</id> <properties> <jdbc.url>jdbc:mysql://xxx:3306/db01?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT</jdbc.url> </properties> </profile> <!-- 测试环境--> <profile> <id>env_test</id> <properties> <jdbc.url>jdbc:mysql://xxx:3306/db01?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT</jdbc.url> </properties> </profile> </profiles>