Skip to content

Instantly share code, notes, and snippets.

View DavidCabral's full-sized avatar

David Cabral DavidCabral

View GitHub Profile
@DavidCabral
DavidCabral / PlacesRESTController.java
Created January 13, 2021 11:28 — forked from wvuong/PlacesRESTController.java
Simple generic REST-ful Spring MVC controller, interops with Spring Data repositories
package com.willvuong.foodie.controller;
import com.willvuong.foodie.dao.PlaceRepository;
import com.willvuong.foodie.domain.Place;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;