尝试更仔细地了解Spring Boot,我使用选择了MVC的STS启动向导创建了一个新项目。 STS向导生成的pom.xml
有这个,这看起来对我的眼睛是正确的:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.0.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<start-class>demo.Application</start-class>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
根据Spring Boot Manual,我应该获得ContentNegotiatingViewResolver
自动配置。但我在Auto-Configuration report中找不到它。很想知道我哪里弄错了。