generated from fastai/fastpages
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"attachments": {}, | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# RDS Tutorial\n", | ||
"> Setting up AWS RDS PostgreSQL Database and connecting with Spring Boot\n", | ||
"\n", | ||
"- layout: default\n", | ||
"- badges: false" | ||
] | ||
}, | ||
{ | ||
"attachments": {}, | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# What is RDS? \n", | ||
"\n", | ||
"Rather than having a database stored on a local file, the RDS database is stored on the cloud. " | ||
] | ||
}, | ||
{ | ||
"attachments": {}, | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Creating the RDS Database Instance\n", | ||
"\n", | ||
"Instructions here" | ||
] | ||
}, | ||
{ | ||
"attachments": {}, | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"In ``pom.xml``, add the following dependencies:\n", | ||
"\n", | ||
"```\n", | ||
"<dependency>\n", | ||
"\t<groupId>org.springframework.boot</groupId>\n", | ||
"\t<artifactId>spring-boot-starter-data-jpa</artifactId>\n", | ||
"</dependency>\n", | ||
"<dependency>\n", | ||
"\t<groupId>org.springframework.boot</groupId>\n", | ||
"\t<artifactId>spring-boot-starter-web</artifactId>\n", | ||
"</dependency>\n", | ||
"<dependency>\n", | ||
"\t<groupId>org.postgresql</groupId>\n", | ||
"\t<artifactId>postgresql</artifactId>\n", | ||
"\t<scope>runtime</scope>\n", | ||
"</dependency>\n", | ||
"\n", | ||
"```\n", | ||
"\n", | ||
"In ``application.properties``, add the following configurations:\n", | ||
"\n", | ||
"```\n", | ||
"spring.datasource.url=jdbc:postgresql://<database-endpoint-url>:<port>/<database> \n", | ||
"spring.datasource.username=YOUR_USERNAME\n", | ||
"spring.datasource.password=YOUR_PASSWORD\n", | ||
"spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect\n", | ||
"spring.jpa.hibernate.ddl-auto=update\n", | ||
"spring.jpa.hibernate.show-sql=true\n", | ||
"\n", | ||
"```\n", | ||
"\n", | ||
"Now, the spring application is connected to the RDS database in the cloud. " | ||
] | ||
}, | ||
{ | ||
"attachments": {}, | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Using the Database\n", | ||
"\n", | ||
"After setting up the RDS database, you should be able to work with spring as usual. \n", | ||
"\n", | ||
"https://nirajsonawane.github.io/2022/04/18/Spring-Boot-AWS-RDS/" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.9.12" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |