Giter Club home page Giter Club logo

whiteship-rest-api-2's Introduction

백기선 - REST API

변경사항

  • postgresql => mysql
  • maven => gradle

실행 script

./gradlew build
java -jar build/libs/demo-0.0.1-SNAPSHOT.jar

Mysql 컨테이너 생성 및 실행(백그라운드)

docker run --name rest-mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=pass -d mysql:8.0.28

실행중인 Mysql 컨테이너에 접속

docker exec -i -t rest-mysql bash

컨테이너 접속후 DB 생성하기

root/# mysql -uroot -ppass
mysql> create schema restdb;

application.properties

spring.jackson.deserialization.fail-on-unknown-properties=true

spring.datasource.username=root
spring.datasource.password=pass
spring.datasource.url=jdbc:mysql://localhost:3306/restdb
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

spring.jpa.hibernate.ddl-auto=create-drop
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
spring.jpa.properties.hibernate.format_sql=true

logging.level.org.hibernate.SQL=DEBUG
logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE

application-test.properties

spring.datasource.username=sa
spring.datasource.password=
spring.datasource.url=jdbc:h2:mem:testdb
spring.datasource.driver-class-name=org.h2.Driver

spring.datasource.hikari.jdbc-url=jdbc:h2:mem:testdb
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.H2Dialect

실행중인 톰캣 확인

ps ax | grep tomcat

whiteship-rest-api-2's People

Contributors

khcho902 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.