BAEL-20552: Migrate spring-4 module to the com.baeldung package

This commit is contained in:
Krzysztof Woyke
2019-12-27 14:35:32 +01:00
parent b38e420b11
commit 1beda960e8
41 changed files with 48 additions and 48 deletions

View File

@@ -0,0 +1,31 @@
package com.baeldung.spring43.composedmapping;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.apache.logging.log4j.Logger;
@Controller
@RequestMapping("/appointments")
public class AppointmentsController {
private AppointmentService appointmentService;
@Autowired
private Logger logger;
@Autowired
public AppointmentsController(AppointmentService appointmentService) {
this.appointmentService = appointmentService;
}
@GetMapping
public Map<String, Appointment> get() {
logger.info("Getting appointments...");
return appointmentService.getAppointmentsForToday();
}
}