Skip to content

sinke237/studentManagementSystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

Playing with Spring Boot; practicing

  • CRUD
  • Authorisation
  • Integration testing with JGiven, TestContainers

Database Setup

I am assuming you want a disposible database like me. A database running in a docker container.

*** I chose not to write a dockerfile. I want you to SUFFER!!!!!!!!!!! ***

docker pull postgres
docker run --name <container_name> -e POSTGRES_PASSWORD=<password> -d -p 5432:5432 postgres
docker exec -it <containerName> psql -U postgres

To create a new db use,

CREATE USER <username> WITH PASSWORD '<password>';

If not you may use the default postgres User Create Database

CREATE DATABASE dbName OWNER <username>;

To list all DBs

\l

To quit

\q

To check if all is alright

    docker logs <containerName>

!!! Be sure to configure the application.properties file(./src/main/resources).

Check the data inside your database

docker exec -it <containerName> bash
psql -U <username> <databaseName>
SELECT * FROM <tableName>;

About

Playing with Spring Boot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published