2021/개발

Spring Boot - An illegal reflective access operation has occurred

mjin.park 2021. 4. 24. 21:28

Mybatis 를 연동하는데, 아래와 같은 메세지가 뜨면서 경고를 주는 경우가 있다.

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.ibatis.reflection.Reflector (file:/Users/mjin/.m2/repository/org/mybatis/mybatis/3.4.6/mybatis-3.4.6.jar) to method java.lang.Class.checkPackageAccess(java.lang.SecurityManager,java.lang.ClassLoader,boolean)
WARNING: Please consider reporting this to the maintainers of org.apache.ibatis.reflection.Reflector
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

 

👉 해결 방법: pom.xml에 최신 패키지 버전의 모듈을 사용하면 해결된다.

반응형