Can I use path variable for spring controller class?
I know that we can use path variables in controller's methods. In the same fashion can we use it for entire class?
Eg:
@Controller
@RequestMapping(value = "{version}/test")
class TestController {
}
Can we use like this? If yes how do we read {version}
variable? Actually i need this kind of approach, based on the version i'll respond. If the above approach is not possible can you please suggest me a design to solve this problem?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…