diff --git a/server/.dockerignore b/server-node/.dockerignore similarity index 100% rename from server/.dockerignore rename to server-node/.dockerignore diff --git a/server/.eslintrc.cjs b/server-node/.eslintrc.cjs similarity index 100% rename from server/.eslintrc.cjs rename to server-node/.eslintrc.cjs diff --git a/server/.gitignore b/server-node/.gitignore similarity index 100% rename from server/.gitignore rename to server-node/.gitignore diff --git a/server/Dockerfile b/server-node/Dockerfile similarity index 100% rename from server/Dockerfile rename to server-node/Dockerfile diff --git a/server/jest.config.cjs b/server-node/jest.config.cjs similarity index 100% rename from server/jest.config.cjs rename to server-node/jest.config.cjs diff --git a/server/package-lock.json b/server-node/package-lock.json similarity index 100% rename from server/package-lock.json rename to server-node/package-lock.json diff --git a/server/package.json b/server-node/package.json similarity index 100% rename from server/package.json rename to server-node/package.json diff --git a/server/resources/init.sql b/server-node/resources/init.sql similarity index 100% rename from server/resources/init.sql rename to server-node/resources/init.sql diff --git a/server/src/app.ts b/server-node/src/app.ts similarity index 100% rename from server/src/app.ts rename to server-node/src/app.ts diff --git a/server/src/books/application/books-category-new-release.service.test.ts b/server-node/src/books/application/books-category-new-release.service.test.ts similarity index 100% rename from server/src/books/application/books-category-new-release.service.test.ts rename to server-node/src/books/application/books-category-new-release.service.test.ts diff --git a/server/src/books/application/books-category-new-release.service.ts b/server-node/src/books/application/books-category-new-release.service.ts similarity index 100% rename from server/src/books/application/books-category-new-release.service.ts rename to server-node/src/books/application/books-category-new-release.service.ts diff --git a/server/src/books/application/books-category.service.test.ts b/server-node/src/books/application/books-category.service.test.ts similarity index 100% rename from server/src/books/application/books-category.service.test.ts rename to server-node/src/books/application/books-category.service.test.ts diff --git a/server/src/books/application/books-category.service.ts b/server-node/src/books/application/books-category.service.ts similarity index 100% rename from server/src/books/application/books-category.service.ts rename to server-node/src/books/application/books-category.service.ts diff --git a/server/src/books/application/books-detail.service.test.ts b/server-node/src/books/application/books-detail.service.test.ts similarity index 100% rename from server/src/books/application/books-detail.service.test.ts rename to server-node/src/books/application/books-detail.service.test.ts diff --git a/server/src/books/application/books-detail.service.ts b/server-node/src/books/application/books-detail.service.ts similarity index 100% rename from server/src/books/application/books-detail.service.ts rename to server-node/src/books/application/books-detail.service.ts diff --git a/server/src/books/application/books-list.service.test.ts b/server-node/src/books/application/books-list.service.test.ts similarity index 100% rename from server/src/books/application/books-list.service.test.ts rename to server-node/src/books/application/books-list.service.test.ts diff --git a/server/src/books/application/books-list.service.ts b/server-node/src/books/application/books-list.service.ts similarity index 100% rename from server/src/books/application/books-list.service.ts rename to server-node/src/books/application/books-list.service.ts diff --git a/server/src/books/application/books-new-release.service.test.ts b/server-node/src/books/application/books-new-release.service.test.ts similarity index 100% rename from server/src/books/application/books-new-release.service.test.ts rename to server-node/src/books/application/books-new-release.service.test.ts diff --git a/server/src/books/application/books-new-release.service.ts b/server-node/src/books/application/books-new-release.service.ts similarity index 100% rename from server/src/books/application/books-new-release.service.ts rename to server-node/src/books/application/books-new-release.service.ts diff --git a/server/src/books/domain/book.test.ts b/server-node/src/books/domain/book.test.ts similarity index 100% rename from server/src/books/domain/book.test.ts rename to server-node/src/books/domain/book.test.ts diff --git a/server/src/books/domain/book.ts b/server-node/src/books/domain/book.ts similarity index 100% rename from server/src/books/domain/book.ts rename to server-node/src/books/domain/book.ts diff --git a/server/src/books/domain/books.repository.ts b/server-node/src/books/domain/books.repository.ts similarity index 100% rename from server/src/books/domain/books.repository.ts rename to server-node/src/books/domain/books.repository.ts diff --git a/server/src/books/web/books-detail.controller.test.ts b/server-node/src/books/web/books-detail.controller.test.ts similarity index 100% rename from server/src/books/web/books-detail.controller.test.ts rename to server-node/src/books/web/books-detail.controller.test.ts diff --git a/server/src/books/web/books-detail.controller.ts b/server-node/src/books/web/books-detail.controller.ts similarity index 100% rename from server/src/books/web/books-detail.controller.ts rename to server-node/src/books/web/books-detail.controller.ts diff --git a/server/src/books/web/books-list.controller.test.ts b/server-node/src/books/web/books-list.controller.test.ts similarity index 100% rename from server/src/books/web/books-list.controller.test.ts rename to server-node/src/books/web/books-list.controller.test.ts diff --git a/server/src/books/web/books-list.controller.ts b/server-node/src/books/web/books-list.controller.ts similarity index 100% rename from server/src/books/web/books-list.controller.ts rename to server-node/src/books/web/books-list.controller.ts diff --git a/server/src/cartItems/application/cartItem-list-existed-select.service.test.ts b/server-node/src/cartItems/application/cartItem-list-existed-select.service.test.ts similarity index 100% rename from server/src/cartItems/application/cartItem-list-existed-select.service.test.ts rename to server-node/src/cartItems/application/cartItem-list-existed-select.service.test.ts diff --git a/server/src/cartItems/application/cartItem-list-existed-select.service.ts b/server-node/src/cartItems/application/cartItem-list-existed-select.service.ts similarity index 100% rename from server/src/cartItems/application/cartItem-list-existed-select.service.ts rename to server-node/src/cartItems/application/cartItem-list-existed-select.service.ts diff --git a/server/src/cartItems/application/cartItem-list-non-existed-select.service.ts b/server-node/src/cartItems/application/cartItem-list-non-existed-select.service.ts similarity index 100% rename from server/src/cartItems/application/cartItem-list-non-existed-select.service.ts rename to server-node/src/cartItems/application/cartItem-list-non-existed-select.service.ts diff --git a/server/src/cartItems/application/cartItem-remove.service.test.ts b/server-node/src/cartItems/application/cartItem-remove.service.test.ts similarity index 100% rename from server/src/cartItems/application/cartItem-remove.service.test.ts rename to server-node/src/cartItems/application/cartItem-remove.service.test.ts diff --git a/server/src/cartItems/application/cartItem-remove.service.ts b/server-node/src/cartItems/application/cartItem-remove.service.ts similarity index 100% rename from server/src/cartItems/application/cartItem-remove.service.ts rename to server-node/src/cartItems/application/cartItem-remove.service.ts diff --git a/server/src/cartItems/application/cartItem-save.service.test.ts b/server-node/src/cartItems/application/cartItem-save.service.test.ts similarity index 100% rename from server/src/cartItems/application/cartItem-save.service.test.ts rename to server-node/src/cartItems/application/cartItem-save.service.test.ts diff --git a/server/src/cartItems/application/cartItem-save.service.ts b/server-node/src/cartItems/application/cartItem-save.service.ts similarity index 100% rename from server/src/cartItems/application/cartItem-save.service.ts rename to server-node/src/cartItems/application/cartItem-save.service.ts diff --git a/server/src/cartItems/domain/cartItem.repository.ts b/server-node/src/cartItems/domain/cartItem.repository.ts similarity index 100% rename from server/src/cartItems/domain/cartItem.repository.ts rename to server-node/src/cartItems/domain/cartItem.repository.ts diff --git a/server/src/cartItems/domain/cartItem.test.ts b/server-node/src/cartItems/domain/cartItem.test.ts similarity index 100% rename from server/src/cartItems/domain/cartItem.test.ts rename to server-node/src/cartItems/domain/cartItem.test.ts diff --git a/server/src/cartItems/domain/cartItem.ts b/server-node/src/cartItems/domain/cartItem.ts similarity index 100% rename from server/src/cartItems/domain/cartItem.ts rename to server-node/src/cartItems/domain/cartItem.ts diff --git a/server/src/cartItems/web/cartItem-list.controller.test.ts b/server-node/src/cartItems/web/cartItem-list.controller.test.ts similarity index 100% rename from server/src/cartItems/web/cartItem-list.controller.test.ts rename to server-node/src/cartItems/web/cartItem-list.controller.test.ts diff --git a/server/src/cartItems/web/cartItem-list.controller.ts b/server-node/src/cartItems/web/cartItem-list.controller.ts similarity index 100% rename from server/src/cartItems/web/cartItem-list.controller.ts rename to server-node/src/cartItems/web/cartItem-list.controller.ts diff --git a/server/src/cartItems/web/cartItem-remove.controller.test.ts b/server-node/src/cartItems/web/cartItem-remove.controller.test.ts similarity index 100% rename from server/src/cartItems/web/cartItem-remove.controller.test.ts rename to server-node/src/cartItems/web/cartItem-remove.controller.test.ts diff --git a/server/src/cartItems/web/cartItem-remove.controller.ts b/server-node/src/cartItems/web/cartItem-remove.controller.ts similarity index 100% rename from server/src/cartItems/web/cartItem-remove.controller.ts rename to server-node/src/cartItems/web/cartItem-remove.controller.ts diff --git a/server/src/cartItems/web/cartItem-save.controller.test.ts b/server-node/src/cartItems/web/cartItem-save.controller.test.ts similarity index 100% rename from server/src/cartItems/web/cartItem-save.controller.test.ts rename to server-node/src/cartItems/web/cartItem-save.controller.test.ts diff --git a/server/src/cartItems/web/cartItem-save.controller.ts b/server-node/src/cartItems/web/cartItem-save.controller.ts similarity index 100% rename from server/src/cartItems/web/cartItem-save.controller.ts rename to server-node/src/cartItems/web/cartItem-save.controller.ts diff --git a/server/src/category/application/caregory-list.service.test.ts b/server-node/src/category/application/caregory-list.service.test.ts similarity index 100% rename from server/src/category/application/caregory-list.service.test.ts rename to server-node/src/category/application/caregory-list.service.test.ts diff --git a/server/src/category/application/category-list.service.ts b/server-node/src/category/application/category-list.service.ts similarity index 100% rename from server/src/category/application/category-list.service.ts rename to server-node/src/category/application/category-list.service.ts diff --git a/server/src/category/domain/category.repository.ts b/server-node/src/category/domain/category.repository.ts similarity index 100% rename from server/src/category/domain/category.repository.ts rename to server-node/src/category/domain/category.repository.ts diff --git a/server/src/category/domain/category.test.ts b/server-node/src/category/domain/category.test.ts similarity index 100% rename from server/src/category/domain/category.test.ts rename to server-node/src/category/domain/category.test.ts diff --git a/server/src/category/domain/category.ts b/server-node/src/category/domain/category.ts similarity index 100% rename from server/src/category/domain/category.ts rename to server-node/src/category/domain/category.ts diff --git a/server/src/category/web/category-list.controller.test.ts b/server-node/src/category/web/category-list.controller.test.ts similarity index 100% rename from server/src/category/web/category-list.controller.test.ts rename to server-node/src/category/web/category-list.controller.test.ts diff --git a/server/src/category/web/category-list.controller.ts b/server-node/src/category/web/category-list.controller.ts similarity index 100% rename from server/src/category/web/category-list.controller.ts rename to server-node/src/category/web/category-list.controller.ts diff --git a/server/src/config/logger.ts b/server-node/src/config/logger.ts similarity index 100% rename from server/src/config/logger.ts rename to server-node/src/config/logger.ts diff --git a/server/src/database/mariadb.ts b/server-node/src/database/mariadb.ts similarity index 100% rename from server/src/database/mariadb.ts rename to server-node/src/database/mariadb.ts diff --git a/server/src/delivery/application/delivery-save.service.test.ts b/server-node/src/delivery/application/delivery-save.service.test.ts similarity index 100% rename from server/src/delivery/application/delivery-save.service.test.ts rename to server-node/src/delivery/application/delivery-save.service.test.ts diff --git a/server/src/delivery/application/delivery-save.service.ts b/server-node/src/delivery/application/delivery-save.service.ts similarity index 100% rename from server/src/delivery/application/delivery-save.service.ts rename to server-node/src/delivery/application/delivery-save.service.ts diff --git a/server/src/delivery/domain/delivery.repository.ts b/server-node/src/delivery/domain/delivery.repository.ts similarity index 100% rename from server/src/delivery/domain/delivery.repository.ts rename to server-node/src/delivery/domain/delivery.repository.ts diff --git a/server/src/delivery/domain/delivery.test.ts b/server-node/src/delivery/domain/delivery.test.ts similarity index 100% rename from server/src/delivery/domain/delivery.test.ts rename to server-node/src/delivery/domain/delivery.test.ts diff --git a/server/src/delivery/domain/delivery.ts b/server-node/src/delivery/domain/delivery.ts similarity index 100% rename from server/src/delivery/domain/delivery.ts rename to server-node/src/delivery/domain/delivery.ts diff --git a/server/src/fixture/books.fixture.ts b/server-node/src/fixture/books.fixture.ts similarity index 100% rename from server/src/fixture/books.fixture.ts rename to server-node/src/fixture/books.fixture.ts diff --git a/server/src/fixture/cartItem.fixture.ts b/server-node/src/fixture/cartItem.fixture.ts similarity index 100% rename from server/src/fixture/cartItem.fixture.ts rename to server-node/src/fixture/cartItem.fixture.ts diff --git a/server/src/fixture/category.fixture.ts b/server-node/src/fixture/category.fixture.ts similarity index 100% rename from server/src/fixture/category.fixture.ts rename to server-node/src/fixture/category.fixture.ts diff --git a/server/src/fixture/jwt.fixture.ts b/server-node/src/fixture/jwt.fixture.ts similarity index 100% rename from server/src/fixture/jwt.fixture.ts rename to server-node/src/fixture/jwt.fixture.ts diff --git a/server/src/fixture/likes.fixture.ts b/server-node/src/fixture/likes.fixture.ts similarity index 100% rename from server/src/fixture/likes.fixture.ts rename to server-node/src/fixture/likes.fixture.ts diff --git a/server/src/fixture/orders.fixture.ts b/server-node/src/fixture/orders.fixture.ts similarity index 100% rename from server/src/fixture/orders.fixture.ts rename to server-node/src/fixture/orders.fixture.ts diff --git a/server/src/fixture/user.fixture.ts b/server-node/src/fixture/user.fixture.ts similarity index 100% rename from server/src/fixture/user.fixture.ts rename to server-node/src/fixture/user.fixture.ts diff --git a/server/src/index.test.ts b/server-node/src/index.test.ts similarity index 100% rename from server/src/index.test.ts rename to server-node/src/index.test.ts diff --git a/server/src/index.ts b/server-node/src/index.ts similarity index 100% rename from server/src/index.ts rename to server-node/src/index.ts diff --git a/server/src/likes/application/add-like.service.test.ts b/server-node/src/likes/application/add-like.service.test.ts similarity index 100% rename from server/src/likes/application/add-like.service.test.ts rename to server-node/src/likes/application/add-like.service.test.ts diff --git a/server/src/likes/application/add-like.service.ts b/server-node/src/likes/application/add-like.service.ts similarity index 100% rename from server/src/likes/application/add-like.service.ts rename to server-node/src/likes/application/add-like.service.ts diff --git a/server/src/likes/application/cancel-like.service.test.ts b/server-node/src/likes/application/cancel-like.service.test.ts similarity index 100% rename from server/src/likes/application/cancel-like.service.test.ts rename to server-node/src/likes/application/cancel-like.service.test.ts diff --git a/server/src/likes/application/cancel-like.service.ts b/server-node/src/likes/application/cancel-like.service.ts similarity index 100% rename from server/src/likes/application/cancel-like.service.ts rename to server-node/src/likes/application/cancel-like.service.ts diff --git a/server/src/likes/domain/like.test.ts b/server-node/src/likes/domain/like.test.ts similarity index 100% rename from server/src/likes/domain/like.test.ts rename to server-node/src/likes/domain/like.test.ts diff --git a/server/src/likes/domain/like.ts b/server-node/src/likes/domain/like.ts similarity index 100% rename from server/src/likes/domain/like.ts rename to server-node/src/likes/domain/like.ts diff --git a/server/src/likes/domain/likes.repository.ts b/server-node/src/likes/domain/likes.repository.ts similarity index 100% rename from server/src/likes/domain/likes.repository.ts rename to server-node/src/likes/domain/likes.repository.ts diff --git a/server/src/likes/web/add-like.controller.test.ts b/server-node/src/likes/web/add-like.controller.test.ts similarity index 100% rename from server/src/likes/web/add-like.controller.test.ts rename to server-node/src/likes/web/add-like.controller.test.ts diff --git a/server/src/likes/web/add-like.controller.ts b/server-node/src/likes/web/add-like.controller.ts similarity index 100% rename from server/src/likes/web/add-like.controller.ts rename to server-node/src/likes/web/add-like.controller.ts diff --git a/server/src/likes/web/cancel-like.controller.test.ts b/server-node/src/likes/web/cancel-like.controller.test.ts similarity index 100% rename from server/src/likes/web/cancel-like.controller.test.ts rename to server-node/src/likes/web/cancel-like.controller.test.ts diff --git a/server/src/likes/web/cancel-like.controller.ts b/server-node/src/likes/web/cancel-like.controller.ts similarity index 100% rename from server/src/likes/web/cancel-like.controller.ts rename to server-node/src/likes/web/cancel-like.controller.ts diff --git a/server/src/orders/application/orders-detail.service.test.ts b/server-node/src/orders/application/orders-detail.service.test.ts similarity index 100% rename from server/src/orders/application/orders-detail.service.test.ts rename to server-node/src/orders/application/orders-detail.service.test.ts diff --git a/server/src/orders/application/orders-detail.service.ts b/server-node/src/orders/application/orders-detail.service.ts similarity index 100% rename from server/src/orders/application/orders-detail.service.ts rename to server-node/src/orders/application/orders-detail.service.ts diff --git a/server/src/orders/application/orders-list.service.test.ts b/server-node/src/orders/application/orders-list.service.test.ts similarity index 100% rename from server/src/orders/application/orders-list.service.test.ts rename to server-node/src/orders/application/orders-list.service.test.ts diff --git a/server/src/orders/application/orders-list.service.ts b/server-node/src/orders/application/orders-list.service.ts similarity index 100% rename from server/src/orders/application/orders-list.service.ts rename to server-node/src/orders/application/orders-list.service.ts diff --git a/server/src/orders/application/orders-save.service.ts b/server-node/src/orders/application/orders-save.service.ts similarity index 100% rename from server/src/orders/application/orders-save.service.ts rename to server-node/src/orders/application/orders-save.service.ts diff --git a/server/src/orders/domain/order.repository.ts b/server-node/src/orders/domain/order.repository.ts similarity index 100% rename from server/src/orders/domain/order.repository.ts rename to server-node/src/orders/domain/order.repository.ts diff --git a/server/src/orders/domain/order.test.ts b/server-node/src/orders/domain/order.test.ts similarity index 100% rename from server/src/orders/domain/order.test.ts rename to server-node/src/orders/domain/order.test.ts diff --git a/server/src/orders/domain/order.ts b/server-node/src/orders/domain/order.ts similarity index 100% rename from server/src/orders/domain/order.ts rename to server-node/src/orders/domain/order.ts diff --git a/server/src/orders/domain/orderedBook.repository.ts b/server-node/src/orders/domain/orderedBook.repository.ts similarity index 100% rename from server/src/orders/domain/orderedBook.repository.ts rename to server-node/src/orders/domain/orderedBook.repository.ts diff --git a/server/src/orders/web/orders-detail.controller.test.ts b/server-node/src/orders/web/orders-detail.controller.test.ts similarity index 100% rename from server/src/orders/web/orders-detail.controller.test.ts rename to server-node/src/orders/web/orders-detail.controller.test.ts diff --git a/server/src/orders/web/orders-detail.controller.ts b/server-node/src/orders/web/orders-detail.controller.ts similarity index 100% rename from server/src/orders/web/orders-detail.controller.ts rename to server-node/src/orders/web/orders-detail.controller.ts diff --git a/server/src/orders/web/orders-list.controller.test.ts b/server-node/src/orders/web/orders-list.controller.test.ts similarity index 100% rename from server/src/orders/web/orders-list.controller.test.ts rename to server-node/src/orders/web/orders-list.controller.test.ts diff --git a/server/src/orders/web/orders-list.controller.ts b/server-node/src/orders/web/orders-list.controller.ts similarity index 100% rename from server/src/orders/web/orders-list.controller.ts rename to server-node/src/orders/web/orders-list.controller.ts diff --git a/server/src/orders/web/orders-save.controller.test.ts b/server-node/src/orders/web/orders-save.controller.test.ts similarity index 100% rename from server/src/orders/web/orders-save.controller.test.ts rename to server-node/src/orders/web/orders-save.controller.test.ts diff --git a/server/src/orders/web/orders-save.controller.ts b/server-node/src/orders/web/orders-save.controller.ts similarity index 100% rename from server/src/orders/web/orders-save.controller.ts rename to server-node/src/orders/web/orders-save.controller.ts diff --git a/server/src/routers/books.router.ts b/server-node/src/routers/books.router.ts similarity index 100% rename from server/src/routers/books.router.ts rename to server-node/src/routers/books.router.ts diff --git a/server/src/routers/cartItems.router.ts b/server-node/src/routers/cartItems.router.ts similarity index 100% rename from server/src/routers/cartItems.router.ts rename to server-node/src/routers/cartItems.router.ts diff --git a/server/src/routers/category.router.ts b/server-node/src/routers/category.router.ts similarity index 100% rename from server/src/routers/category.router.ts rename to server-node/src/routers/category.router.ts diff --git a/server/src/routers/like.router.ts b/server-node/src/routers/like.router.ts similarity index 100% rename from server/src/routers/like.router.ts rename to server-node/src/routers/like.router.ts diff --git a/server/src/routers/order.router.ts b/server-node/src/routers/order.router.ts similarity index 100% rename from server/src/routers/order.router.ts rename to server-node/src/routers/order.router.ts diff --git a/server/src/routers/users.router.ts b/server-node/src/routers/users.router.ts similarity index 100% rename from server/src/routers/users.router.ts rename to server-node/src/routers/users.router.ts diff --git a/server/src/users/domain/password.provider.test.ts b/server-node/src/users/domain/password.provider.test.ts similarity index 100% rename from server/src/users/domain/password.provider.test.ts rename to server-node/src/users/domain/password.provider.test.ts diff --git a/server/src/users/domain/password.provider.ts b/server-node/src/users/domain/password.provider.ts similarity index 100% rename from server/src/users/domain/password.provider.ts rename to server-node/src/users/domain/password.provider.ts diff --git a/server/src/users/domain/user.repository.ts b/server-node/src/users/domain/user.repository.ts similarity index 100% rename from server/src/users/domain/user.repository.ts rename to server-node/src/users/domain/user.repository.ts diff --git a/server/src/users/domain/user.test.ts b/server-node/src/users/domain/user.test.ts similarity index 100% rename from server/src/users/domain/user.test.ts rename to server-node/src/users/domain/user.test.ts diff --git a/server/src/users/domain/user.ts b/server-node/src/users/domain/user.ts similarity index 100% rename from server/src/users/domain/user.ts rename to server-node/src/users/domain/user.ts diff --git a/server/src/users/jwt/jwt.provider.ts b/server-node/src/users/jwt/jwt.provider.ts similarity index 100% rename from server/src/users/jwt/jwt.provider.ts rename to server-node/src/users/jwt/jwt.provider.ts diff --git a/server/src/users/reset/application/password-request.service.test.ts b/server-node/src/users/reset/application/password-request.service.test.ts similarity index 100% rename from server/src/users/reset/application/password-request.service.test.ts rename to server-node/src/users/reset/application/password-request.service.test.ts diff --git a/server/src/users/reset/application/password-request.service.ts b/server-node/src/users/reset/application/password-request.service.ts similarity index 100% rename from server/src/users/reset/application/password-request.service.ts rename to server-node/src/users/reset/application/password-request.service.ts diff --git a/server/src/users/reset/application/password-reset.service.test.ts b/server-node/src/users/reset/application/password-reset.service.test.ts similarity index 100% rename from server/src/users/reset/application/password-reset.service.test.ts rename to server-node/src/users/reset/application/password-reset.service.test.ts diff --git a/server/src/users/reset/application/password-reset.service.ts b/server-node/src/users/reset/application/password-reset.service.ts similarity index 100% rename from server/src/users/reset/application/password-reset.service.ts rename to server-node/src/users/reset/application/password-reset.service.ts diff --git a/server/src/users/reset/web/password-request.controller.test.ts b/server-node/src/users/reset/web/password-request.controller.test.ts similarity index 100% rename from server/src/users/reset/web/password-request.controller.test.ts rename to server-node/src/users/reset/web/password-request.controller.test.ts diff --git a/server/src/users/reset/web/password-request.controller.ts b/server-node/src/users/reset/web/password-request.controller.ts similarity index 100% rename from server/src/users/reset/web/password-request.controller.ts rename to server-node/src/users/reset/web/password-request.controller.ts diff --git a/server/src/users/reset/web/password-reset.controller.test.ts b/server-node/src/users/reset/web/password-reset.controller.test.ts similarity index 100% rename from server/src/users/reset/web/password-reset.controller.test.ts rename to server-node/src/users/reset/web/password-reset.controller.test.ts diff --git a/server/src/users/reset/web/password-reset.controller.ts b/server-node/src/users/reset/web/password-reset.controller.ts similarity index 100% rename from server/src/users/reset/web/password-reset.controller.ts rename to server-node/src/users/reset/web/password-reset.controller.ts diff --git a/server/src/users/signin/application/signin.service.test.ts b/server-node/src/users/signin/application/signin.service.test.ts similarity index 100% rename from server/src/users/signin/application/signin.service.test.ts rename to server-node/src/users/signin/application/signin.service.test.ts diff --git a/server/src/users/signin/application/signin.service.ts b/server-node/src/users/signin/application/signin.service.ts similarity index 100% rename from server/src/users/signin/application/signin.service.ts rename to server-node/src/users/signin/application/signin.service.ts diff --git a/server/src/users/signin/web/signin.controller.test.ts b/server-node/src/users/signin/web/signin.controller.test.ts similarity index 100% rename from server/src/users/signin/web/signin.controller.test.ts rename to server-node/src/users/signin/web/signin.controller.test.ts diff --git a/server/src/users/signin/web/signin.controller.ts b/server-node/src/users/signin/web/signin.controller.ts similarity index 100% rename from server/src/users/signin/web/signin.controller.ts rename to server-node/src/users/signin/web/signin.controller.ts diff --git a/server/src/users/signup/application/signup.service.test.ts b/server-node/src/users/signup/application/signup.service.test.ts similarity index 100% rename from server/src/users/signup/application/signup.service.test.ts rename to server-node/src/users/signup/application/signup.service.test.ts diff --git a/server/src/users/signup/application/signup.service.ts b/server-node/src/users/signup/application/signup.service.ts similarity index 100% rename from server/src/users/signup/application/signup.service.ts rename to server-node/src/users/signup/application/signup.service.ts diff --git a/server/src/users/signup/web/signup.controller.test.ts b/server-node/src/users/signup/web/signup.controller.test.ts similarity index 100% rename from server/src/users/signup/web/signup.controller.test.ts rename to server-node/src/users/signup/web/signup.controller.test.ts diff --git a/server/src/users/signup/web/signup.controller.ts b/server-node/src/users/signup/web/signup.controller.ts similarity index 100% rename from server/src/users/signup/web/signup.controller.ts rename to server-node/src/users/signup/web/signup.controller.ts diff --git a/server/src/users/signup/web/signupSchema.ts b/server-node/src/users/signup/web/signupSchema.ts similarity index 100% rename from server/src/users/signup/web/signupSchema.ts rename to server-node/src/users/signup/web/signupSchema.ts diff --git a/server/src/utils/httpException.ts b/server-node/src/utils/httpException.ts similarity index 100% rename from server/src/utils/httpException.ts rename to server-node/src/utils/httpException.ts diff --git a/server/src/utils/parseBoolean.ts b/server-node/src/utils/parseBoolean.ts similarity index 100% rename from server/src/utils/parseBoolean.ts rename to server-node/src/utils/parseBoolean.ts diff --git a/server/src/utils/responseHandler.ts b/server-node/src/utils/responseHandler.ts similarity index 100% rename from server/src/utils/responseHandler.ts rename to server-node/src/utils/responseHandler.ts diff --git a/server/src/utils/valiationHandler.ts b/server-node/src/utils/valiationHandler.ts similarity index 100% rename from server/src/utils/valiationHandler.ts rename to server-node/src/utils/valiationHandler.ts diff --git a/server/tsconfig.json b/server-node/tsconfig.json similarity index 100% rename from server/tsconfig.json rename to server-node/tsconfig.json diff --git a/server-spring/.gitignore b/server-spring/.gitignore new file mode 100644 index 0000000..c2065bc --- /dev/null +++ b/server-spring/.gitignore @@ -0,0 +1,37 @@ +HELP.md +.gradle +build/ +!gradle/wrapper/gradle-wrapper.jar +!**/src/main/**/build/ +!**/src/test/**/build/ + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache +bin/ +!**/src/main/**/bin/ +!**/src/test/**/bin/ + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr +out/ +!**/src/main/**/out/ +!**/src/test/**/out/ + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ + +### VS Code ### +.vscode/ diff --git a/server-spring/Dockerfile b/server-spring/Dockerfile new file mode 100644 index 0000000..b03c03a --- /dev/null +++ b/server-spring/Dockerfile @@ -0,0 +1,8 @@ +FROM openjdk:17 AS builder + +COPY . . +RUN ["./gradlew","assemble"] + +FROM openjdk:17 +COPY build/libs/core-0.0.1-SNAPSHOT.jar app.jar +CMD ["java", "-jar", "core-0.0.1-SNAPSHOT.jar"] diff --git a/server-spring/README.md b/server-spring/README.md new file mode 100644 index 0000000..d2b4fe8 --- /dev/null +++ b/server-spring/README.md @@ -0,0 +1,75 @@ +# Book Store SpringBoot + +이는 Spring Boot 구축된 서점 애플리케이션용 REST API입니다. +이는 도서에 대한 CRUD 작업을 제공하고 다음 기능에 대한 API 엔드포인트를 포함합니다. + +## Tech Stack +- SpringBoot 3.2.3 +- Java zulu 17.0.9 +- Gradle 8.4 +- JPA +- H2 Database +- MySQL 8 + +## Getting Started +- Repository 복제합니다. +- IDE(통합 개발 환경) 에서 프로젝트를 열고 Maven Dependencies를 다운로드 받습니다. +- 각 `application.yaml` 파일을 열고 `spring.datasource.url`을 수정합니다. +- Test를 실행합니다. +- 데이터베이스에 데이터가 추가 여부를 확인합니다. +- Spring Boot를 실행합니다. + +## Database Setting +- **Dev Environment** + 로컬 개발 시 MySQL 데이터베이스를 사용합니다. + MySQL은 Docker를 실행해야 사용 할 수 있습니다. +> :: Docker 환경 설정은 아래에 설명 되어 있습니다. +```yaml +spring: + datasource: + url: jdbc:mysql://localhost:3306/metlife?serverTimezone=UTC&characterEncoding=UTF-8 + username: root + password: root + driver-class-name: com.mysql.cj.jdbc.Driver +``` +- **Test Environment** + 테스트 개발 시 H2 데이터베이스를 설치합니다. + - https://www.h2database.com/ + - 스프링 부트 3.x를 사용하면 **2.1.214 버전 이상** 사용해야 한다. + - H2 데이터베이스를 실행 하기 위해서는 다음과 같이 수행합니다. + - 웹 페이지에 `jdbc:h2:~/data/dev` 수행합니다. + - `~/data/dev.mv.db` 파일 생성을 확인합니다. + - application-dev.yaml url에 `jdbc:h2:tcp://localhost/~/data/dev`를 추가합니다. + - Spring Boot를 실행합니다. + +- **Prod Environment** + 프로덕트 개발 시 Cloud Service Database를 `application-prod.yml`추가합니다. +```yaml +spring: + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://{Cloud Service Database}/{db명} + username: userId + password: password +``` + +## Deploy Setting +Spring Boot 배포 하기 전 빌드를 수행해야 합니다. + +우선 `assemble`로 결과물로 조합해서 빌드합니다. +```bash + ./gradlew assemble +``` +test 서버 배포 실행은 다음 명령어로 수행합니다. +```bash +java -jar -Dspring.profiles.active=test build/libs/core-0.0.1-SNAPSHOT.jar +``` + +dev 서버 배포 실행은 다음 명령어로 수행합니다. +```bash +java -jar -Dspring.profiles.active=dev build/libs/core-0.0.1-SNAPSHOT.jar +``` +prod 서버 배포 실행은 다음 명령어로 수행합니다. +```bash +java -jar -Dspring.profiles.active=prod build/libs/core-0.0.1-SNAPSHOT.jar +``` diff --git a/server-spring/build.gradle b/server-spring/build.gradle new file mode 100644 index 0000000..9b7912d --- /dev/null +++ b/server-spring/build.gradle @@ -0,0 +1,69 @@ +plugins { + id 'java' + id 'org.springframework.boot' version '3.2.3' + id 'io.spring.dependency-management' version '1.1.4' +} + +group = 'jpa' +version = '0.0.1-SNAPSHOT' + +java { + sourceCompatibility = '17' +} + +configurations { + compileOnly { + extendsFrom annotationProcessor + } +} + +repositories { + mavenCentral() +} + +dependencies { + // Spring Boot Web + implementation 'org.springframework.boot:spring-boot-starter-web' + + // Spring Cloud OpenFeign + implementation 'org.springframework.cloud:spring-cloud-starter-openfeign:4.1.0' + + // Spring Boot Jpa + implementation 'org.springframework.boot:spring-boot-starter-data-jpa' + runtimeOnly 'com.h2database:h2' + + // Spring Boot Validation + implementation 'org.springframework.boot:spring-boot-starter-validation' + + // Mysql + implementation 'com.mysql:mysql-connector-j:8.3.0' + + // Lombok + compileOnly 'org.projectlombok:lombok:1.18.16' + annotationProcessor 'org.projectlombok:lombok' + + // devtools + developmentOnly 'org.springframework.boot:spring-boot-devtools' + + // Junit + testImplementation 'org.springframework.boot:spring-boot-starter-test' + testImplementation 'org.junit.jupiter:junit-jupiter' + + // AssertJ + testImplementation 'org.assertj:assertj-core:3.18.1' + + // Spring Boot Test + testImplementation('org.springframework.boot:spring-boot-starter-test') { + exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' + } + + // p6spy + implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.9.0' + + // jjwt + implementation group: 'io.jsonwebtoken', name: 'jjwt-api', version: '0.12.3' +} + +tasks.named('test') { + useJUnitPlatform() +} diff --git a/server-spring/gradle/wrapper/gradle-wrapper.jar b/server-spring/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..d64cd49 Binary files /dev/null and b/server-spring/gradle/wrapper/gradle-wrapper.jar differ diff --git a/server-spring/gradle/wrapper/gradle-wrapper.properties b/server-spring/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..97f9ad6 --- /dev/null +++ b/server-spring/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,23 @@ +# +# Copyright 2012-2024 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/server-spring/gradlew b/server-spring/gradlew new file mode 100755 index 0000000..1aa94a4 --- /dev/null +++ b/server-spring/gradlew @@ -0,0 +1,249 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/server-spring/gradlew.bat b/server-spring/gradlew.bat new file mode 100644 index 0000000..93e3f59 --- /dev/null +++ b/server-spring/gradlew.bat @@ -0,0 +1,92 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/server-spring/settings.gradle b/server-spring/settings.gradle new file mode 100644 index 0000000..4d52ac5 --- /dev/null +++ b/server-spring/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'core' diff --git a/server-spring/src/main/java/jpa/core/CoreApplication.java b/server-spring/src/main/java/jpa/core/CoreApplication.java new file mode 100644 index 0000000..4351a8a --- /dev/null +++ b/server-spring/src/main/java/jpa/core/CoreApplication.java @@ -0,0 +1,13 @@ +package jpa.core; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class CoreApplication { + + public static void main(String[] args) { + SpringApplication.run(CoreApplication.class, args); + } + +} diff --git a/server-spring/src/main/java/jpa/core/health/controller/HealthCheckController.java b/server-spring/src/main/java/jpa/core/health/controller/HealthCheckController.java new file mode 100644 index 0000000..9c27f66 --- /dev/null +++ b/server-spring/src/main/java/jpa/core/health/controller/HealthCheckController.java @@ -0,0 +1,24 @@ +package jpa.core.health.controller; + +import jpa.core.health.dto.HealthCheckResponseDto; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseStatus; +import org.springframework.web.bind.annotation.RestController; + +@RequestMapping("/health") +@RestController +public class HealthCheckController { + + @GetMapping("/check") + @ResponseStatus(HttpStatus.OK) + public HealthCheckResponseDto checkHealth() { + HealthCheckResponseDto healthCheckResponseDto = HealthCheckResponseDto.builder() + .status(true) + .health("OK") + .build(); + + return healthCheckResponseDto; + } +} diff --git a/server-spring/src/main/java/jpa/core/health/dto/HealthCheckResponseDto.java b/server-spring/src/main/java/jpa/core/health/dto/HealthCheckResponseDto.java new file mode 100644 index 0000000..c78af25 --- /dev/null +++ b/server-spring/src/main/java/jpa/core/health/dto/HealthCheckResponseDto.java @@ -0,0 +1,12 @@ +package jpa.core.health.dto; + +import lombok.Builder; +import lombok.Getter; + +@Getter +@Builder +public class HealthCheckResponseDto { + + private boolean status; + private String health; +} diff --git a/server-spring/src/main/resources/application-dev.yaml b/server-spring/src/main/resources/application-dev.yaml new file mode 100644 index 0000000..dab2d66 --- /dev/null +++ b/server-spring/src/main/resources/application-dev.yaml @@ -0,0 +1,35 @@ +server: + port: 8080 + servlet: + encoding: + charset: utf-8 + force: true + +spring: + datasource: + url: jdbc:mysql://localhost:3306/metlife?serverTimezone=UTC&characterEncoding=UTF-8 + username: root + password: root + driver-class-name: com.mysql.cj.jdbc.Driver + + jpa: + hibernate: + ddl-auto: create + orm: + jdbc: + bind: trace + show-sql: true + properties: + hibernate: + format_sql: true + dialect: org.hibernate.dialect.MySQLDialect + + output: + ansi: + enabled: always + + logging: + level: + org: + hibernate: + SQL: debug diff --git a/server-spring/src/main/resources/application-prod.yml b/server-spring/src/main/resources/application-prod.yml new file mode 100644 index 0000000..03c5173 --- /dev/null +++ b/server-spring/src/main/resources/application-prod.yml @@ -0,0 +1,25 @@ +server: + port: 6000 + servlet: + encoding: + charset: utf-8 + force: true + +#spring: +# datasource: +# driver-class-name: com.mysql.cj.jdbc.Driver +# url: jdbc:mysql://{mysql.database.azure.com}/{database} +# username: root +# password: root +# jpa: +# open-in-view: false +# hibernate: +# ddl-auto: none +# properties: +# '[hibernate.default_batch_fetch_size]': 100 + + logging: + level: + org: + hibernate: + SQL: INFO diff --git a/server-spring/src/main/resources/application-test.yml b/server-spring/src/main/resources/application-test.yml new file mode 100644 index 0000000..f6caac2 --- /dev/null +++ b/server-spring/src/main/resources/application-test.yml @@ -0,0 +1,33 @@ +server: + port: 8081 + servlet: + encoding: + charset: utf-8 + force: true + +spring: + datasource: + url: jdbc:h2:tcp://localhost/~/data/dev + username: sa + password: + driver-class-name: org.h2.Driver + + jpa: + hibernate: + ddl-auto: create + orm: + jdbc: + bind: trace + properties: + hibernate: + format_sql: true + dialect: org.hibernate.dialect.H2Dialect + output: + ansi: + enabled: always + + logging: + level: + org: + hibernate: + SQL: debug diff --git a/server-spring/src/main/resources/application.yaml b/server-spring/src/main/resources/application.yaml new file mode 100644 index 0000000..badcac9 --- /dev/null +++ b/server-spring/src/main/resources/application.yaml @@ -0,0 +1,12 @@ +spring: + profiles: + active: prod +--- +spring: + profiles: + active: dev + +--- +spring: + profiles: + active: test diff --git a/server-spring/src/test/java/jpa/core/CoreApplicationTests.java b/server-spring/src/test/java/jpa/core/CoreApplicationTests.java new file mode 100644 index 0000000..8f92a26 --- /dev/null +++ b/server-spring/src/test/java/jpa/core/CoreApplicationTests.java @@ -0,0 +1,13 @@ +package jpa.core; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class CoreApplicationTests { + + @Test + void contextLoads() { + } + +}