3

I have some issues with Spring Boot.

When im using @RequestMapping(value = "/home"), everything works fine for me. But when im using @RequestMapping(name = "/home"), my site won't show up.

So my question is: What is the difference between @RequestMapping(name = "/home") and @RequestMapping(value = "/home")?

Tom
  • 1,387
  • 3
  • 19
  • 30
Darkstar
  • 53
  • 4

1 Answers1

4

As per I know name in @RequestMapping is used for assigning name to the mapping.

What is Name? 
As In servlet mapping we assign name to the servlet class and url pattern
in spring we can also assign name to the mapping. 

But values is different, it is used for defining URL Pattern by which we can invoke the method of the Controller class.

Nikesh Joshi
  • 824
  • 6
  • 17