Upload files to "/"
This commit is contained in:
16
session.java
Normal file
16
session.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package com.example.controller;
|
||||
|
||||
import org.springframework.messaging.handler.annotation.MessageMapping;
|
||||
import org.springframework.messaging.handler.annotation.SendTo;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
@Controller
|
||||
public class SessionTimeoutController {
|
||||
|
||||
@MessageMapping("/check-inactivity")
|
||||
@SendTo("/topic/session-timeout")
|
||||
public String checkInactivity(String userId) {
|
||||
// Logic to check inactivity (e.g., based on userId)
|
||||
return "Session timed out due to inactivity. Please log in again.";
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user