A Spring Boot backend application for codematata sessions created using Kotlin
Clone the github repository
git clone https://github.com/Code-Matata/codematata-sessions-backend.git
You need to have:
- Java 8 and above installed, though Java 11 is used in this project.
- An IDE like Intellij, VScode or any of your choice.
- Gradle 7.0.2
You will need to create two OAuth Apps:
- For Google - You can learn how to do it here: https://support.google.com/googleapi/answer/6158849?hl=en
- For Github - You can learn how to do it here: https://docs.github.com/en/developers/apps/building-oauth-apps/creating-an-oauth-app
After that in a property file named (application-local.yml), you can add the Client ID and Client Secret as follows:
application-local.yml
spring:
security:
oauth2:
client:
registration:
google:
clientId: {YOUR_CLIENT_ID}
clientSecret: {YOUR_CLIENT_SECRET}
redirectUri: "{baseUrl}/oauth2/callback/{registrationId}"
scope:
- email
- profile
github:
clientId: {YOUR_CLIENT_ID}
clientSecret: {YOUR_CLIENT_SECRET}
redirectUri: "{baseUrl}/oauth2/callback/{registrationId}"
scope:
- user:email
- read:user
gradle build
In Linux and MacOS:
./gradlew bootRun
In Windows:
./gradlew.bat bootRun
- Spring Boot Starter Web
- Spring Data Jpa
- GSon
- Jjwt
- PostgreSql Driver
- H2 Database for testing
- Spring Boot Starter Security
- Ninja Squad Spring Mockk
- Spring Boot Starter Security Test
- Mockito Kotlin