赞
踩
因为缺少了 spring-web.jar包。需要在pom.xml中引入以下代码:
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-data-jpa</artifactId>
- </dependency>
引入之后,对该项目进行update 待包下载完毕,注解可以使用。如下
package com.test.simaple.contoller; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @Controller @RequestMapping("/") public class HelloController { @RequestMapping("/getHello") public String getHello(){ return ""; } }
- This application has no explicit mapping for /error, so you are seeing this as a fallback.
- Fri Apr 27 17:34:34 CST 2018
- There was an unexpected error (type=Internal Server Error,
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。