Spring Noob在这里。我可以使用Spring Initializr使用Spring Boot 1.5.10构建Maven / Java项目,以及Web,JPA和MySQL的依赖项。
我将这些行放在application.properties
:
spring.jpa.hibernate.ddl-auto=create
spring.datasource.url=jdbc:mysql://localhost:3306/TEST
spring.datasource.username=jdbc
spring.datasource.password=jdbc
从命令行输入:
mvn spring-boot:run
并且(空)项目构建并运行良好。
如果我对Spring Boot 2.0.0做同样的事情,我会收到此错误:
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.0.0.RELEASE:run (default-cli) on project demo200: An exception occurred while running. null: InvocationTargetException: Error processing condition on org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration.pageableCustomizer: Failed to introspect Class [org.springframework.data.web.config.SpringDataWebConfiguration] from ClassLoader [java.net.URLClassLoader@50815d80]: com/fasterxml/jackson/databind/ObjectMapper: com.fasterxml.jackson.databind.ObjectMapper -> [Help 1]
如果我添加:
<jackson.version>2.9.3</jackson.version>
到pom.xml
,它构建正常。
杰克逊,2.9.4是否遗漏了ObjectMapper,还是我错过了什么?