spring 注解问题
我在 RoleController.java 中
@Controller
@RequestMapping("/role/role.do")
其中有个方法
@RequestMapping(params = {"method=getAllRoles"})
@ResponseBody
public Object getAllRoles(){...}
在js 中 url: 'role/role.do?method=getAllRoles'
可以访问这个方法,
但是 我同样在RoleController.java 中仿写了一个方法
@RequestMapping(params = {"method=getOrdinaryRoles"})
@ResponseBody
public Object getOrdinaryRoles(){...}
在js中 url: 'role/role.do?method=getOrdinaryRoles'访问不到这个方法,是什么原因,这个方法还需要什么配置么。。。。新人求问
@Controller
@RequestMapping("/role/role.do")
其中有个方法
@RequestMapping(params = {"method=getAllRoles"})
@ResponseBody
public Object getAllRoles(){...}
在js 中 url: 'role/role.do?method=getAllRoles'
可以访问这个方法,
但是 我同样在RoleController.java 中仿写了一个方法
@RequestMapping(params = {"method=getOrdinaryRoles"})
@ResponseBody
public Object getOrdinaryRoles(){...}
在js中 url: 'role/role.do?method=getOrdinaryRoles'访问不到这个方法,是什么原因,这个方法还需要什么配置么。。。。新人求问
...全文
相关推荐
Spring @Value注解失效问题解决方案
但是,在实际开发中,我们经常会遇到@Value注解失效的问题。这篇文章将会详细介绍Spring @Value注解失效问题的解决方案。
struts2和spring3注解整合问题
- 如果是Struts2配置问题,确保已启用Spring插件,并配置了注解扫描。 - 如果是Action注解问题,检查注解的使用,确保它们的设置正确无误。6.
spring中@value注解需要注意的问题
希望本文能帮助你在使用`@Value`注解时避免常见问题,提高开发效率。
Spring注解和同步锁不能同步问题解决
然而,在使用Spring注解和同步锁时,可能会遇到一些问题,例如无法保证数据的一致性。下面我们将详细介绍Spring注解和同步锁不能同步问题解决。
深入理解Spring注解@Async解决异步调用问题
深入理解Spring注解@Async解决异步调用问题本文将详细介绍Spring框架中的@Async注解,并深入理解其在解决异步调用问题中的应用。


