[Spring Boot 쇼핑몰] 개발환경 구축

개발자·2022년 1월 20일
2

Spring boot 쇼핑몰

목록 보기
1/14

Spring boot 프로젝트 생성

  1. Spring Boot Initializr
  1. DB 설정
  • MySQL 사용

  • MySQL Workbench 8.0 CE

  • Schema 생성버튼을 통해 Shop Schema 생성

  1. Application.properties
  • Port 번호 = 8080 지정
  • mariaDB
  • 데이터베이스 아이디,패스워드,스키마명을 알맞게 입력
  • spring.jpa.hibernate.ddl-auto = create => 데이터베이스 초기화
  • spring.jpa.hibernate.ddl-auto = update => 데이터베이스 업데이트
server.port=8080

spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
spring.datasource.username=아이디
spring.datasource.password=패스워드
spring.datasource.url=jdbc:mysql://localhost:3306/스키마명

# create, update, none, create-drop, validate,
spring.jpa.hibernate.ddl-auto=update

## Jpa Properties
spring.jpa.properties.hibernate.show_sql=true
spring.jpa.properties.hibernate.format_sql=true

## Logging Level
logging.level.org.hibernate.type.descriptor.sql=debug

spring.security.user.name=root
spring.security.user.password=root
spring.security.user.roles=ADMIN

0개의 댓글

Powered by GraphCDN, the GraphQL CDN