Skip to content

TwizzyBomb/fun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reactive Java Login Application with Oracle Database 21c XE

This project is a reactive Java login application built using Spring WebFlux and integrates with Oracle Database 21c XE using its reactive R2DBC driver. It showcases how to create a non-blocking, asynchronous login backend with modern Java technologies.

🧱 Tech Stack

  • Java 17+
  • Spring Boot (WebFlux)
  • R2DBC (Reactive Relational Database Connectivity)
  • Oracle Database 21c XE (Express Edition)
  • Oracle R2DBC Reactive Driver
  • Gradle (build tool)

🚀 Getting Started

1. Clone the Repository

git clone https://github.com/TwizzyBomb/fun.git
cd fun

2. Setup Oracle Database

CREATE USER login_app IDENTIFIED BY your_password;
GRANT CONNECT, RESOURCE TO login_app;
  • Create the users table:
CREATE TABLE login_app.users (
    id NUMBER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
    username VARCHAR2(255) UNIQUE NOT NULL,
    password VARCHAR2(255) NOT NULL
);

3. Configure Application Properties

In src/main/resources/application.yml (or .properties), update:

spring:
  r2dbc:
    url: r2dbc:oracle://localhost:1521/XEPDB1
    username: login_app
    password: your_password

  main:
    web-application-type: reactive

4. Build the Project

Make sure Gradle is installed, then:

./gradlew clean build

5. Run the Application

./gradlew bootRun

Your reactive login API will be available at:

http://localhost:8080/login

📬 Sample API Endpoints

Method Endpoint Description
POST /login Authenticate user
POST /register Create new account

🧪 Testing the API

You can test with Postman or curl:

curl -X POST http://localhost:8080/register \
  -H "Content-Type: application/json" \
  -d '{"username":"testuser", "password":"secret"}'

✅ Notes

  • Ensure Oracle R2DBC dependencies are included in build.gradle
  • For password storage, consider hashing (e.g., BCrypt)
  • Supports full non-blocking reactive flow end-to-end

📂 License

This project is licensed under the MIT License.

About

This is a fun Java Reactive oracle DB project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors