0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

application.propertiesの解説

0
Posted at

spring.application.name=kakeibo

spring.datasource.url=jdbc:mysql://localhost:3306/kakeibo_db?serverTimezone=Asia/Tokyo&useSSL=false&allowPublicKeyRetrieval=true
spring.datasource.username=root
spring.datasource.password=YOUR_PASSWORD_HERE
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

実技試験の指示通り ddl-auto は none に設定(手動でテーブル作成するため)

spring.jpa.hibernate.ddl-auto=none
spring.jpa.show-sql=true

• useSSL=false
• 意味: SSL(暗号化通信)を**使わない(false)という意味です。
• なぜ必要か: 自分のパソコン内(localhost)での開発中は、安全な通信経路を作るための設定(証明書など)が面倒なことが多いため、一旦オフにして接続を簡単にするためによく使われます。※本番環境ではtrueにすることが多いです。
• allowPublicKeyRetrieval=true
• 意味: サーバーから公開鍵を回収することを
許可する(true)**設定です。
• なぜ必要か: MySQL 8.0以降ではセキュリティが強化され、上で説明した useSSL=false(非暗号化)にすると、パスワードの送信時にエラーで弾かれるようになってしまいました。それを防ぎ、ローカル環境でスムーズに接続できるようにするための「回避策」として必要な設定です。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?