If you want to run this forum website locally, please follow these steps.
Make sure the following software is installed on your machine:
- JDK 23.0.2
- Apache Maven 3.9.9
- Spring Boot 3.4.3
- Spring Security 6.4.3
- MyBatis 3.0.4
- Redis 7.2.7
- Kafka 3.9.0
- Elasticsearch 7.17.1
- MySQL 9.2.0
- Kaptcha 2.3.2
- Spring Email 3.4.3
- Quartz, Caffeine, Spring Boot Actuator
You can check the exact versions used in this project by looking at the pom.xml file.
Run the following SQL commands to initialize the database. You can find the SQL files in the init_sql directory:
create database community;
use community;
source [filelocation]/init_schema.sql;
show tables;
source [filelocation]/init_data.sql;Replace [filelocation] with the actual path to your SQL files.
Update application.properties and related files to match your environment:
- Set your MySQL username and password
- Set the port you want to use
- Set the email and password for the email account used to send activation emails
There are three property files:
application.propertiesapplication-develop.propertiesapplication-produce.properties
In application.properties, choose the active profile:
spring.profiles.active=develop # for local development
spring.profiles.active=produce # for production deploymentIf you are deploying the project, update global.js:
var CONTEXT_PATH = ""; // instead of: var CONTEXT_PATH = "/community";Start the following services in separate terminals:
brew services start redis
zookeeper-server-start /opt/homebrew/etc/zookeeper/zoo.cfg
kafka-server-start /opt/homebrew/etc/kafka/server.properties
./bin/elasticsearch # Run this from your Elasticsearch directoryFinally, start the application:
Run `CommunityApplication.java`