Spring Boot Service with Mysql to Login
Reference:
https://www.bezkoder.com/spring-boot-jwt-authentication/
https://github.com/bezkoder/spring-boot-spring-security-jwt-authentication
Dependency:
mysql
How to run local:
mvn spring-boot:run
Build jar
mvn spring-boot:build-image
https://www.heidisql.com/
https://sqlitebrowser.org/
https://sqlitebrowser.org/dl/
https://gluonhq.com/products/scene-builder/#download
cd C:\teach\java-server\target
java -jar -Dfile.encoding=utf-8 teach-1.0-SNAPSHOT.jar
insert into user_type ( name,id) values( 'ROLE_ADMIN',1);
insert into user_type ( name,id) values( 'ROLE_USER',2);
insert into person (per_num, per_name,per_type,person_id) values( 'admin','admin','0',1);
insert into user (user_name, password,person_id,user_type_id,user_id) values( 'admin','$2a$10$FV5lm..jdQWmV7hFguxKDeTrGyiWg1u6HYD2QiQc0tRROrNtSQVOy',1,1,1);
ln -s /java-server/java-server-1.0-SNAPSHOT.jar /etc/init.d/java-server
chmod +x /java-server/java-server-1.0-SNAPSHOT.jar
service java-server stop
service java-server start
firewall-cmd --add-port=9090/tcp --permanentfirewall-cmd --add-port=9090/tcp --permanent
firewall-cmd --reload
https://docs.spring.io/spring-boot/docs/1.4.0.RC1/reference/html/deployment-install.html
https://www.baeldung.com/websockets-spring
https://github.com/websockets/ws