Ekran.Kaydi.2023-07-10.03.21.54.mov
This project is an assignment given by Hamit MΔ±zrak for the Web Programming course. The goal of the assignment is to develop a web application that allows users to enter their username and password. The application will then send the data to a Spring API, which will save it to the database. After saving the data, the application will retrieve it using a jQuery GET request and display it using console.log or in the UI.
src
βββ main
β βββ java
β β βββ com
β β βββ koc
β β βββ finalproject
β β βββ FinalprojectApplication.java
β β βββ controller
β β β βββ UserController.java
β β βββ dto
β β β βββ UserDto.java
β β βββ entity
β β β βββ User.java
β β βββ repository
β β β βββ IUserRepository.java
β β βββ service
β β βββ UserService.java
β βββ resources
β βββ application.properties
β βββ static
β β βββ background.html
β β βββ css
β β β βββ bootstrap.min.css
β β β βββ bootstrap.min.css.map
β β β βββ style.css
β β βββ js
β β βββ main.js
β βββ templates
β βββ getall.html
β βββ login.html
β βββ register.html
src/main/java/com/koc/finalproject:
Contains the Java source code files.FinalprojectApplication.java:
The main class of the Spring Boot application.controller/UserController.java:
Defines the REST API endpoints for user-related operations.dto/UserDto.java:
Data transfer object for user information.entity/User.java:
Entity class representing a user in the database.repository/IUserRepository.java:
Interface for user repository, which provides database operations.service/UserService.java:
Service class for handling user-related business logic.
src/main/resources:
Contains the configuration files and static resources.application.properties:
Configuration file for Spring Boot.static:
Directory for static files used in the frontend.background.html:
HTML file for displaying animated circles in the background.css:
Directory for CSS files.bootstrap.min.css:
Minified version of the Bootstrap CSS framework.bootstrap.min.css.map:
Source map file for Bootstrap CSS.style.css:
Custom CSS styles for the application.
js:
Directory for JavaScript files.main.js:
JavaScript file for handling form submissions and AJAX requests.
src/main/resources/templates:
Contains the HTML templates for the frontend.getall.html:
HTML template for displaying all users in a table.login.html:
HTML template for the login page.register.html:
HTML template for the registration page.
- Lombok π
- Spring Boot Starter Data JPA π
- Spring Boot Starter Validation β
- Spring Boot Starter Thymeleaf π
- Spring Boot Starter Test π§ͺ
- Spring Boot Starter Web π
- Spring Boot DevTools π οΈ
- H2 Database ποΈ
To run the project, you need to have Java and Maven installed on your system.
- Clone the repository:
git clone <repository-url>
- Navigate to the project directory:
cd finalproject
- Build the project using Maven:
mvn clean install
- Run the application:
mvn spring-boot:run
- Access the application in your browser at ->
http://localhost:8080
<-
Happy Coding! π»π