domain
Java Persistance Api
데이터베이스에 정의되어있는 엔티티 형태를 정의.
@Data //lombok anntation을 사용하면 자동으로 getter, setter가 생성된다.
public interface UserRepository extends JpaRepository<User, Long> {
...
<User, Long> = <dto, pk's type>
spring.jpa.hibernate.ddl-auto=update
create : Create the schema and destroy previous data.
udpate : Update schema if necessary.
spring.jpa.show-sql=true
실제 query를 보여줌.
spring.h2.console.path=/console
spring.h2.console.enabled=true
localhost:port/console로 접속하면 Db에 들어가진다.