// Path: ItemService/src/main/java/com/github/joffryferrater/itemservice/models/Item.java
// @Entity
// @Table(name = "items")
// @Data
// public class Item {
// 
// 	@Id
// 	@GeneratedValue(strategy=GenerationType.AUTO)
// 	private Long id;
// 	@JsonProperty("Item Code")
// 	private String itemCode;
// 	@JsonProperty("Name")
// 	private String name;
// 	
// 	public Item() {
// 		super();
// 	}
// 	
// 	public Item(String itemCode, String name) {
// 		this();
// 		this.itemCode = itemCode;
// 		this.name = name;
// 	}
// 	
// }
// 
// Path: ItemService/src/main/java/com/github/joffryferrater/itemservice/models/ItemRepository.java
// @RepositoryRestResource(path="items", collectionResourceRel="items")
// public interface ItemRepository extends CrudRepository<Item, Long>{
// 
// 	Item findByItemCode(@Param("itemCode")String itemCode);
// 	
// 	List<Item> findByName(@Param("name") String name);
// }


import java.util.ArrayList;
import java.util.List;
import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import com.github.joffryferrater.itemservice.models.Item;
import com.github.joffryferrater.itemservice.models.ItemRepository;
package com.github.joffryferrater.itemservice;





/**
 * 
 * @author Joffry Ferrater
 *
 */
@SpringBootApplication
@EnableDiscoveryClient
public class ItemServiceApplication {

	public static void main(String[] args) {
		SpringApplication.run(ItemServiceApplication.class, args);
	}
	
	@Autowired
	ItemRepository itemRepository;
	
	@PostConstruct
	public void init() {
// Path: ItemService/src/main/java/com/github/joffryferrater/itemservice/models/Item.java
// @Entity
// @Table(name = "items")
// @Data
// public class Item {
// 
// 	@Id
// 	@GeneratedValue(strategy=GenerationType.AUTO)
// 	private Long id;
// 	@JsonProperty("Item Code")
// 	private String itemCode;
// 	@JsonProperty("Name")
// 	private String name;
// 	
// 	public Item() {
// 		super();
// 	}
// 	
// 	public Item(String itemCode, String name) {
// 		this();
// 		this.itemCode = itemCode;
// 		this.name = name;
// 	}
// 	
// }
// 
// Path: ItemService/src/main/java/com/github/joffryferrater/itemservice/models/ItemRepository.java
// @RepositoryRestResource(path="items", collectionResourceRel="items")
// public interface ItemRepository extends CrudRepository<Item, Long>{
// 
// 	Item findByItemCode(@Param("itemCode")String itemCode);
// 	
// 	List<Item> findByName(@Param("name") String name);
// }


// Path: ItemService/src/main/java/com/github/joffryferrater/itemservice/ItemServiceApplication.java
import java.util.ArrayList;
import java.util.List;
import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import com.github.joffryferrater.itemservice.models.Item;
import com.github.joffryferrater.itemservice.models.ItemRepository;

package com.github.joffryferrater.itemservice;





/**
 * 
 * @author Joffry Ferrater
 *
 */
@SpringBootApplication
@EnableDiscoveryClient
public class ItemServiceApplication {

	public static void main(String[] args) {
		SpringApplication.run(ItemServiceApplication.class, args);
	}
	
	@Autowired
	ItemRepository itemRepository;
	
	@PostConstruct
	public void init() {
		List<Item> items = new ArrayList<Item>();