https://github.com/imamachi-n/spring-boot2-thymeleaf-item-management
Item management system with Spring Boot2 and Thymeleaf
https://github.com/imamachi-n/spring-boot2-thymeleaf-item-management
bootstrap spring-boot thymeleaf
Last synced: 3 months ago
JSON representation
Item management system with Spring Boot2 and Thymeleaf
- Host: GitHub
- URL: https://github.com/imamachi-n/spring-boot2-thymeleaf-item-management
- Owner: Imamachi-n
- Created: 2018-09-14T23:18:02.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-06T20:12:41.000Z (about 6 years ago)
- Last Synced: 2025-01-21T02:08:06.034Z (5 months ago)
- Topics: bootstrap, spring-boot, thymeleaf
- Language: Java
- Size: 967 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# spring-boot2-thymeleaf-item-management
[](https://codeclimate.com/github/Imamachi-n/spring-boot2-thymeleaf-item-management/maintainability)
[](https://codebeat.co/projects/github-com-imamachi-n-spring-boot2-thymeleaf-item-management-master)This repository is a experimental spring boot2 project for me and NOT a production-ready source code.
## Heroku
https://spring-boot-item-management.herokuapp.com/login## PostgreSQLの起動
デフォルトスキーマ`public`を設定する必要あり。
以下のコマンドで、日本語の文字コードを設定したpostgreSQLのDockerイメージ生成・起動を行う(テスト用なのでデータの永続化は行っていない)。
```bash
docker build -t postgres-dev -f env/postgresql/Dockerfile env/postgresql/
docker run -it --rm --name postgres-dev -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=password -e POSTGRES_DB=itemdb -p 5433:5432 -d postgres-dev
```以下のコマンドで、postgreSQLのデータベースが生成されているかチェック。
```bash
docker exec -it postgres-dev psql -U postgres
postgres#=\l
```## MariaDBの起動
文字コードを`utf8mb4_unicode_ci`に設定する必要あり。
```bash
docker run -it --rm --name mariadb-dev -e MYSQL_DATABASE=itemdb_test -e MYSQL_ROOT_PASSWORD=password -p 3307:3306 -d mariadb:10.3.10 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
```## Spring Boot2アプリの起動
### 1. Mavenを利用する場合
以下のコマンドを実行し、Webアプリケーションをビルド・起動する。
```
# For MacOS, Linux
./mvnw spring-boot:run# For Windows
mvnw.cmd spring-boot:run
```### 2. Dockerを利用する場合
Zulu OpenJDKのDockerコンテナを起動。
```bash
docker build -t zulu-openjdk-dev -f env/jdk/Dockerfile env/jdk/
docker run --name zulu-openjdk-dev -d zulu-openjdk-dev -e JAR_FILE=C:/Users/imama/Documents/spring-boot2-thymeleaf-item-management/target/itemmanagement-0.0.1-SNAPSHOT.jar
```