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
- Spring Framework
- autocomplete
- 외장톰캣
- LiveTemplate
- Mockito #Reflection #Sigleton #Test #JUnit
- spring
- 톰캣
- tomcat
- 디자인패턴 #싱글톤
Archives
- Today
- Total
자라선
26. Mysql, PostgreSql DB Connect 본문
Mysql
Mysql 은 GPL 라이선스 이므로 상용목적을 위해서는 Enterprise Commercial 버전을 1년 반 기간으로 구매해야함
아래의 의존성은 mysql를 추가하는것이 아닌 mysql connector를 의존성으로 추가하는 것
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
docker를 사용하여 빠른 mysql 컨테이너 서버 시작
docker run -p 3306:3306 --name mysql_boot -e MYSQL_ROOT_PASSWORD=1 -e MYSQL_DATABASE=springboot -e MYSQL_USER=thkong -e MYSQL_PASSWORD=pass -d mysql
application.properties
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/springboot
spring.datasource.username=thkong
spring.datasource.password=pass
PosrgreSQL
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
docker를 사용하여 빠른 postgreSQL 컨테이너 서버 시작
docker run -p 5432:5432 -e POSTGRES_PASSWORD=pass -e POSTGRES_USER=thkong -e POSTGRES_DB=springboot --name postgres_boot -d postgres
application.properties
spring.datasource.url=jdbc:postgresql://127.0.0.1:5432/springboot
spring.datasource.username=thkong
spring.datasource.password=pass
'Develop > Spring Boot' 카테고리의 다른 글
28. JPA Connection (0) | 2020.07.27 |
---|---|
27. JPA (0) | 2020.07.27 |
25. DBCP (0) | 2020.07.27 |
24. Support InMemory DB (0) | 2020.07.27 |
23. CORS (0) | 2020.07.27 |
Comments