Skip to content

Latest commit

 

History

History
51 lines (33 loc) · 653 Bytes

Items.md

File metadata and controls

51 lines (33 loc) · 653 Bytes

Item.java:

@Entity

public class Item{
@Id
@GenereatedValue(strategy = GenerateType.AUTO)

Private Long id;
Private String name
Private Long description;

}

Item Repo:


public interface ItemRepository extends CrudReository<Item,Long> 
{

}

applicaiton.properties:

logging.level.org.springframework:DEBUG

# H2
spring.h2.console.enabled=true
spring.h2.console.path=/h2
spring.datasource.url= jdbc:h2:mem:items

To Test:

localhost:8080/items

POM.xml:

  spring boot starter web
  spring boot starter test
  spring boot starter jpa
  h2 database
  spring boot starter rest