Multi-Module Project With Spring Boot

This commit is contained in:
Umesh Awasthi
2020-02-02 16:05:28 -08:00
parent 92284d105b
commit c3b6943e54
5 changed files with 104 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
package com.javadevjournal.controller;
import com.javadevjournal.data.customer.Customer;
import com.javadevjournal.service.customer.CustomerService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
@RestController
@RequestMapping("/customers")
public class CustomerController {
@Resource(name = "customerService")
CustomerService customerService;
@GetMapping("/customer/{id}")
public Customer getCustomer(@PathVariable String id){
return customerService.getCustomerById(id);
}
}