This project is created for training Java knowledge. It will consist of two modules - backend an UI.
JDK11 or later
Client: Java, Swing, HttpClient, DTO
Server: Java, Spring Boot, Spring Data JPA, Flyway Migration, Postgresql
- Chat rooms
- Contact list
- Message history
Create an Application User and group
sudo groupadd -r messenger_group
sudo useradd -r -s /bin/false -g messenger_group messenger_user
Create Systemd Service First, create a systemd service file to manage our application
sudo vim /etc/systemd/system/backend.service
It will have content like below:
[Unit]
Description=Simple messenger backend service
[Service]
WorkingDirectory=/opt/messenger
ExecStart=/bin/java -Xms128m -Xmx256m -jar -Dspring.profiles.active=dev backend-0.1.1-SNAPSHOT.jar
User=messenger_user
Type=simple
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
Set User to the one created earlier, and WorkingDirectory to the directory with a jar file.
Give the user and group ownership permissions for the Project Directory:
sudo chown -R messenger_user:messenger_group /opt/messenger
reload systemd so that it knows of the new application added.
sudo systemctl daemon-reload
Start Java Application service with systemd
sudo systemctl start backend.service
To check the status, use:
systemctl status backend
You can also enable the service to start on server boot:
sudo systemctl enable backend
To restart the application, use:
sudo systemctl restart backend
I'm a Java developer... https://github.com/vosmerkin
- Create UI
- Create backend basic application
- Add user login / logoff functionality
- Add chat rooms
- Test deploy
- Add messages functionality
- Add message history