I have an external location set on my application.properties
as below
spring.config.location=file:${catalina.home}/conf/app.properties
app.properties
has a property as timeOut=10000
. There are many other properties as well.
I need to set this property on my session something like this:
session.setMaxInactiveInterval(timeOut_Property);
How can this be achieved?
Adding Controller:
@Controller
public class StartController {
@Value("${spring.config.location.defaultTimeout}")
private int defaultTimeout;
@RequestMapping("login.do")
public String login(HttpServletRequest request, HttpSession session, Model model) {
session.setMaxInactiveInterval(defaultTimeout);
return null;
}