改变idea和maven中的sdk版本
- 改的目的:switch()的参数不能传string类型等,jdk高版本才有的特性版本
- 改变的步骤,以1.5>1.8为例:
1.idea改版本



2.maven改版本

2.在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>
总结