ForumProject is a web application built using Java, Spring Boot, and Thymeleaf. It allows users to create, view, and manage posts and comments. The application also includes an admin portal for managing users and their posts.
Clone the repository:
git clone https://github.com/your-username/ForumProject.git
cd ForumProject
Environment Variables You need to set up the following environment variables for database and Cloudinary configuration:
mySQLuser
: Database URL
mySQLuser
: your database username
mySQLpassword
: your database password
API_KEY
: Cloudinary API key
API_SECRET
: Cloudinary API secret
CLOUD_NAME
: Cloudinary cloud name
MAILUSER
: Email address for sending emails
MAILPASS
: Email password for sending emails
Database Setup 2.1 Hibernate Configuration In the HibernateConfig class:
hibernate.hbm2ddl.auto
property to create
to create the database schema.hibernate.hbm2ddl.auto
property to update
to update the database schema.
2.2 Initial Data Population
To auto-populate the database with initial data:
In application.properties, set the spring.jpa.hibernate.ddl-auto
property to create
or update
.
Once the application is running, the database will be populated with initial data and the property should be set back to never
.Running SQL Scripts Manually (Optional) SQL scripts are located in the src/main/resources folder. You can run these scripts manually if needed. Note: Ensure that the password is hashed in the user table if you are manually inserting data.
Build the project:
gradle build
Run the application:
gradle bootRun
http://localhost:8080
.http://localhost:8080/admin
(requires admin privileges).src/main/java/com/example/ForumProject
: Contains the Java source code.src/main/resources
: Contains the application properties and Thymeleaf templates.src/test/java/com/example/ForumProject
: Contains the test cases.git checkout -b feature-branch
).git commit -m 'Add some feature'
).git push origin feature-branch
).This project is licensed under the MIT License. See the LICENSE
file for details.
For any inquiries or issues, please contact deszafirova@gmail.com or hadzhiev96@gmail.com