Error creating bean with name ‘groovyMarkupConfigurer’ defined in class path resource 해결방법 2가지

spring-boot 기동할 때 groovyMarkupConfigurer 관련 오류가 발생하여 정상적으로 기동이 안되는 경우가 있는데 해결방법을 알려드립니다.


templates 폴더 추가

Cannot find template location: classpath:/templates 라고 에러가 발생할 텐데요.
이경우에 루트 하위에 resources 하위에 templates 폴더를 새로 추가해주면 됩니다.
그리고 .yml 에 아래의 내용을 추가해주세요.

spring:
  groovy:
    template:
      check-template-location: false


속성값 추가

위 방법으로도 안될 경우 속성 파일 .properties 에 아래의 내용을 추가해서 기동하시면 잘 될 것입니다.

spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.groovy.template.GroovyTemplateAutoConfiguration