Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
package HolaMundoSpringBoot;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
public class MascotasController {
public Mascota mascota(
@RequestParam(value="nombre", defaultValue="Sin nombre") String nombre,
@RequestParam(value="edad", defaultValue="0") int edad) {
return new Mascota(nombre, edad);
public String inicio() {
return "Estamos en el índice /";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment