Spring Boot:无法访问localhost上的REST Controller(404)
我正在尝试在Spring Boot网站上改编REST Controller示例。不幸的是,当我尝试访问localhost:8080/itemURL 时遇到以下错误。 { "timestamp": 1436442596410, "status": 404, "error": "Not Found", "message": "No message available", "path": "/item" } POM: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>SpringBootTest</groupId> <artifactId>SpringBootTest</artifactId> <version>0.0.1-SNAPSHOT</version> <properties> <javaVersion>1.8</javaVersion> <mainClassPackage>com.nice.application</mainClassPackage> <mainClass>${mainClassPackage}.InventoryApp</mainClass> </properties> <build> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.3</version> <configuration> <source>${javaVersion}</source> <target>${javaVersion}</target> </configuration> </plugin> <!-- Makes the Spring Boot app …