웹개발/스프링부트
[에러]Correct the classpath of your application so that it contains a single, compatible version of
tester______
2019. 3. 22. 15:42
스프링부트, 그래들 프로젝트 빌드하다가 만난에러
로그
An attempt was made to call the method org.springframework.boot.autoconfigure.
template.AbstractTemplateViewResolverProperties.applyToViewResolver(Ljava/lang/Object;)
V but it does not exist. Its class, org.springframework.boot.autoconfigure.template.AbstractTemplateViewResolverProperties,
is available from the following locations:
jar:file:/C:/Users/user/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-autoconfigure/
2.1.3.RELEASE/58e07f69638a3ca13dffe8a2b68d284af376d105/spring-boot-autoconfigure-2.1.3.RELEASE.jar!/
org/springframework/boot/autoconfigure/template/AbstractTemplateViewResolverProperties.class
It was loaded from the following location:
file:/C:/Users/user/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-autoconfigure/
2.1.3.RELEASE/58e07f69638a3ca13dffe8a2b68d284af376d105/spring-boot-autoconfigure-2.1.3.RELEASE.jar
Correct the classpath of your application so that it contains a single,
compatible version of org.springframework.boot.autoconfigure.template.AbstractTemplateViewResolverProperties
Correct the classpath of your application so that it contains a single, compatible version of ~~~~
스프링 프레임워크의 뷰템플릿값과 호환가능한 하나 값을 갖도록 클래스패스를 변경해라 뭐 이런말같은데
build.gradle
buildscript {
ext {
springBootVersion = '2.1.1.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("io.spring.gradle:dependency-management-plugin:1.0.4.RELEASE")
}
}
plugins {
id 'org.springframework.boot' version '2.1.3.RELEASE'
id 'java'
}
apply plugin: 'io.spring.dependency-management'
group = 'com.msa'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
ext['hibernate.version'] = '5.2.11.Final'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.h2database:h2'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
compile 'pl.allegro.tech.boot:handlebars-spring-boot-starter:0.3.0'
}
dependencies 부분에 compile 'pl.allegro.tech.boot:handlebars-spring-boot-starter:0.3.0' 이 부분의 버전 문제인 것같다.
0.3.0 부분을 0.2.15로 변경하니 정상적으로 작동했다.