Skip to content

Instantly share code, notes, and snippets.

Last active August 9, 2016 09:32
What would you like to do?
package com.example;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
public class EmployeeRestController {
private EmployeeRepository employeeRepository;
public EmployeeRestController(EmployeeRepository employeeRepository) {
this.employeeRepository = employeeRepository;
public List<Employee> employees() {
return employeeRepository.findAll();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment