2024-09-04

application.propertiesサンプル

 resources/application.propertiesに追記


※ oracle

# データベース接続情報(SIDの場合は「:」、サービス名の場合は「/」)

# spring.datasource.url=jdbc:oracle:thin:@localhost:1521:XE

spring.datasource.url=jdbc:oracle:thin:@localhost:1521/XEPDB1


※ postgresql

# データベース接続情報

spring.jpa.database=POSTGRESQL

spring.datasource.url=jdbc:postgresql://localhost:5432/ex_db1

spring.datasource.username=ex_user

spring.datasource.password=example

spring.datasource.driverClassName=org.postgresql.Driver


# 実行されるSQLをログに出力する

spring.jpa.show-sql=true

# SQLをログに出力する際に整形する

spring.jpa.properties.hibernate.format_sql=true


# エンティティクラスからDDLを生成して自動実行するか

# spring.jpa.hibernate.ddl-auto=none

# spring.jpa.hibernate.ddl-auto=validate

spring.jpa.hibernate.ddl-auto=update


# schema.sqlとdata.sqlの自動実行(ddl-auto=none)

# spring.sql.init.mode=always

# spring.sql.init.encoding=UTF-8


# Springのログレベル

# logging.level.org.springframework=DEBUG

hyperv windows

Hyper-Vマネージャー クイック作成 Windows11開発環境 仮想マシンの作成 参考サイト 【Windows 11便利テク】Windows 11でより使いやすくなったHyper-V。サクッと無料で仮想環境を作ってみる - PC Watch