用Eclipse报404的同学可以这样试试,三种方法都行,找到org.seckill.web包下的SeckillController:
1.直接注释掉或者删掉@RequestMapping("/seckill")
2.将@RequestMapping("/seckill")改成@RequestMapping("/")
3.不改变@RequestMapping("/seckill"),访问路径用http://localhost:8080/seckill/seckill/list
1.直接注释掉或者删掉@RequestMapping("/seckill")
2.将@RequestMapping("/seckill")改成@RequestMapping("/")
3.不改变@RequestMapping("/seckill"),访问路径用http://localhost:8080/seckill/seckill/list
2017-02-17
不知道有没有人遇到我这种情况,我用Eclipse写的,一直404,然后把//@RequestMapping("/SecKill1")给注释掉就正常了,心累
@Controller
//@RequestMapping("/SecKill1")
public class SeckillController {
@Controller
//@RequestMapping("/SecKill1")
public class SeckillController {
2017-02-17
个人感觉本课程是自己目前在慕课网看到的最实用的项目,附上自己的代码:https://github.com/QiXingjun/seckill
2017-02-15