程序员一代码搬运工
【Java学习心得和Java学习技术个人总结】

IntelliJ Idea 配置jdk8

环境: 环境变量JAVA_HOME配置jdk1.8

idea配置支持lambda:

File -> Project Structure -> Modules ->  Language level, 选择: 8-Lambdas, type annotations etc.

File -> Project Structure -> Project  ->  Project language level, 选择: 8-Lambdas, type annotations etc.

pom文件中对编译器的配置:

	<build>
		<finalName>ROOT</finalName>
		<plugins>
			<plugin>  
		        <groupId>org.apache.maven.plugins</groupId>  
		        <artifactId>maven-surefire-plugin</artifactId> 
		        <configuration>
		          <skipTests>true</skipTests>
		        </configuration>
		    </plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.3</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
					<showWarnings>true</showWarnings>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
			</plugin>
		</plugins>
	</build>

 

赞(0)
未经允许不得转载:程序员一代码搬运工 » IntelliJ Idea 配置jdk8
分享到: 更多 (0)