WebSocket + STOMP + Spring MVC + REST + JSON API.
Install Java 8.65 version http://www.oracle.com/
Install Apache Maven https://maven.apache.org
mvn spring-boot:run
Project supported some spring profiles.
You can set application parameters in src/main/resources/application.yml
expirationtime:
plusexpirationseconds: 20 - time of expiration session in seconds
initialDelay: 50 - delay for start service for check expriration token
period: 5 - period beetwen start service for check expiration token
You can work with application over link:
http://localhost:8080/index.html
This is an authentication system over STOMP and WebSocket. Application provides the following functions:
- User authentication over websocket.
- Generate and save new token with expiration time of token.
- Internal service check opened sessions and check expired sessions every period seconds.
- You can see storage with token at history page.
- You can see opened sessions at sessions page.
You can open application in browser: http://localhost:8080
Login/password is :
"admin" / "admin"
"app1" / "app1"
"app2" / "app2"
"app3" / "app3"
"app4" / "app4"
"app5" / "app5"
"app6" / "app6"
Steps for migration on WildFly server:
-
You have to remove these lines from your configuration (standalone.xml):
extension module="org.jboss.as.jsf" subsystem xmlns="urn:jboss:domain:jsf:1.0"
-
Just exclude dependency from pom.xml:
<groupId>org.springframework.boot</groupId > <artifactId>spring-boot-starter-web</artifactId> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> </exclusion> </exclusions>
-
Build a project: mvn clean package
-
Copy result war file to your wildfly\standalone\deployments folder.
-
Execute standalone.bat
author: Sergey Stotskiy