@Controller
@RequestMapping( "/user" )
public class UsersController
{
@Autowired
private UserExistenceChecker checker;
@RequestMapping( value = "user-exists", method = RequestMethod.GET )
public @ResponseBody Boolean getUser( @RequestParam String userName )
throws Exception
{
return checker.userExists( userName );
}
} |