改变idea和maven中的sdk版本
- 改的目的:switch()的参数不能传string类型等,jdk高版本才有的特性
- 版本改变的步骤,以1.5>1.8为例:
- idea改版本
- maven改版本
- 在setting.xml中的profiles标签内加入下面这些
<profile> <id>jdk-1.8</id> <activation> <activeByDefault>true</activeByDefault> <jdk>1.8</jdk> </activation> <properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion> </properties> </profile>
- 完成啦!
- 在setting.xml中的profiles标签内加入下面这些
- idea改版本