Requestmapping for a large URL

2

I wanted to know how I @RequestMapping to a large URL. In case I wanted to map the word authenticate.

http://localhost:8080/DataIdea/autenticar?email=0fS3w9wOg6WkJB%2BBdvEmlKxQxYOhF8nqt2lPx801R5M%3D

I'm trying to use the code below, but it's not right

@RequestMapping("autenticar")
public String confirmacao() {
    System.out.println(" autenticado" );
    return "usuarios/confirmacao";
}
    
asked by anonymous 11.02.2015 / 18:11

1 answer

2

Could you post your controller class's code?

Assuming you have metadata close to your class in your controller, your code should look like this:

@Controller
@RequestMapping("/DataIdea")
class SuaClasse{

@RequestMapping("/autenticar")
public String confirmacao(@RequestParam("email") String email) {
    System.out.println(" autenticado" );
    return "usuarios/confirmacao";
}

}
    
15.02.2015 / 20:12