Requestmapping to a large URL

Asked

Viewed 64 times

2

Wanted to know how I make one @RequestMapping for 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 not the right

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

1 answer

2


Could post the code of your controller class?

Assuming you have in your controller the metadata next to your class, your code should be like this:

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

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

}

Browser other questions tagged

You are not signed in. Login or sign up in order to post.