java - spring mvc Controller URL是否可以实现动态配置
迷茫
迷茫 2017-04-17 11:12:58
0
1
760

使用spring mvc开发的应用后台登录地址,如何实现动态配置,以防止扫描登录url, 就像wordpress的后台登录地址一样可以在后台自行修改。 有什么思路,可以实现?

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(1)
洪涛

There is a PathVariable thing in the latest spring3. Its main purpose is to extract the path variables contained in the RequestMapping url. Currently, it is mostly used to provide pseudo-static page urls. For example:

@RequestMapping("/login/{loginId}.htm")
public String login(@PathVariable("loginId")Long loginId, ModelMap model){
    ...    
}

The loginId in the above example is completely variable. You can dynamically configure the background login address by configuring this loginId in the background.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template