// Path: druid-spring-boot-example/druid-spring-boot-jpa-example/src/main/java/com/github/trang/druid/example/jpa/model/City.java
// @Entity
// @Table(name = "city")
// @Data
// public class City implements Serializable {
// 
//     private static final long serialVersionUID = 1L;
// 
//     @Id
//     @GeneratedValue(strategy = GenerationType.IDENTITY)
//     @Column(name = "id")
//     private Long id;
// 
//     @Column(name = "name")
//     private String name;
// 
//     @Column(name = "state")
//     private String state;
// 
//     @Column(name = "country")
//     private String country;
// 
// }
// 
// Path: druid-spring-boot-example/druid-spring-boot-jpa-example/src/main/java/com/github/trang/druid/example/jpa/repository/CityRepository.java
// public interface CityRepository extends JpaRepository<City, Long> {
// 
// }


import org.springframework.beans.factory.annotation.Autowired;
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 com.github.trang.druid.example.jpa.model.City;
import com.github.trang.druid.example.jpa.repository.CityRepository;
package com.github.trang.druid.example.jpa.controller;



/**
 * CityController
 *
 * @author trang
 */
@RestController
@RequestMapping("/city")
public class CityController {

    @Autowired
    private CityRepository cityRepository;

    @GetMapping("/get/{id}")
// Path: druid-spring-boot-example/druid-spring-boot-jpa-example/src/main/java/com/github/trang/druid/example/jpa/model/City.java
// @Entity
// @Table(name = "city")
// @Data
// public class City implements Serializable {
// 
//     private static final long serialVersionUID = 1L;
// 
//     @Id
//     @GeneratedValue(strategy = GenerationType.IDENTITY)
//     @Column(name = "id")
//     private Long id;
// 
//     @Column(name = "name")
//     private String name;
// 
//     @Column(name = "state")
//     private String state;
// 
//     @Column(name = "country")
//     private String country;
// 
// }
// 
// Path: druid-spring-boot-example/druid-spring-boot-jpa-example/src/main/java/com/github/trang/druid/example/jpa/repository/CityRepository.java
// public interface CityRepository extends JpaRepository<City, Long> {
// 
// }


// Path: druid-spring-boot-example/druid-spring-boot-jpa-example/src/main/java/com/github/trang/druid/example/jpa/controller/CityController.java
import org.springframework.beans.factory.annotation.Autowired;
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 com.github.trang.druid.example.jpa.model.City;
import com.github.trang.druid.example.jpa.repository.CityRepository;

package com.github.trang.druid.example.jpa.controller;



/**
 * CityController
 *
 * @author trang
 */
@RestController
@RequestMapping("/city")
public class CityController {

    @Autowired
    private CityRepository cityRepository;

    @GetMapping("/get/{id}")
    public City get(@PathVariable Long id) {