References to interface static methods are allowed only at source level 1.8 or above

yoondgu·2022년 7월 25일
0

오류 기록

목록 보기
4/10
package kr.co.hta.app;

import java.util.List;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import kr.co.hta.mapper.DepartmentMapper;
import kr.co.hta.mapper.EmployeeMapper;
import kr.co.hta.vo.Department;
import kr.co.hta.vo.Employee;

public class HrApp9 {

	public static void main(String[] args) {
		String resource = "context.xml";
		ApplicationContext context = new ClassPathXmlApplicationContext(resource);
		
		EmployeeMapper mapper = context.getBean(EmployeeMapper.class);
		
		List<Employee> employees = mapper.getEmployeesByDeptIds(List.of(60, 70, 90));
		
	}
}

list.of 메소드를 사용하려고 하면

에러표시
References to interface static methods are allowed only at source level 1.8 or above

https://stackoverflow.com/questions/54859623/references-to-interface-static-methods-are-allowed-only-at-source-level-1-8-or-a

https://stackoverflow.com/questions/54859623/references-to-interface-static-methods-are-allowed-only-at-source-level-1-8-or-a

maven 업데이트 안돼서 버전 안올라간 문제였음

pom.xml에서 버전 명시해줘도 해결되는데
maven-update project만 해줘도 ok

0개의 댓글