반응형
250x250
Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- SQL
- redis
- Flux
- 도커
- chart.js
- codepipeline
- PostgreSQL
- chartjs
- codedeploy error
- node
- Kafka
- Jenkins
- Spring
- Spring Error
- kubeflow
- bootstrap
- codebuild
- codedeploy
- docker
- AWS CI/CD 구축하기
- VPN
- openlens
- JavaScript
- aws
- IntelliJ
- Airflow
- Python
- aws cicd
- java bigdecimal
- COALESCE
Archives
- Today
- Total
Small Asteroid Blog
[spring] application.properties 의 datasource 설정하기(port, db) - DB연결하기 본문
백엔드/Spring
[spring] application.properties 의 datasource 설정하기(port, db) - DB연결하기
작은소행성☄️ 2021. 4. 27. 10:09728x90
포트번호 변경
server.port=8082
데이터베이스 연결
# Database
#driver-class-name 은 사용하고자 하는 데이터베이스로
#spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
spring.datasource.driverClassName=org.mariadb.jdbc.Driver
#spring.datasource.url=데이터베이스 주소
spring.datasource.url=jdbc:mariadb://localhost:3306/gtck?characterEncoding=UTF-8&serverTimezone=UTC
spring.datasource.username=아이디
spring.datasource.password=비밀번호
#spring.datasource.sql-script-encoding=UTF-8
db 업데이트
spring.jpa.hibernate.ddl-auto=update
# create = 실행될때마다 새로만들어짐
# update = 실행될때마다 다시 업로드됨 oracle에서 건드려도 이해를함
# none = 안건드림
postgresql db 연결
spring.datasource.driverClassName=org.postgresql.Driver
spring.datasource.url=jdbc:postgresql://localhost:5432/gtck?characterEncoding=UTF-8&serverTimezone=UTC
spring.datasource.username=아이디
spring.datasource.password=비밀번호
728x90
반응형
'백엔드 > Spring' 카테고리의 다른 글
| Unknown column '' in 'field list' on MySQL error (0) | 2021.05.04 |
|---|---|
| Table 'DB_NAME.hibernate_sequence' doesn't exist (0) | 2021.04.28 |
| JPA Auditing (0) | 2021.04.22 |
| Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. (0) | 2021.04.22 |
| [spring error] No qualifying bean of type (0) | 2021.04.21 |