在Java中,使用的性能和资源含义是什么
System.currentTimeMillis()
Run Code Online (Sandbox Code Playgroud)
与
new Date()
Run Code Online (Sandbox Code Playgroud)
与
Calendar.getInstance().getTime()
Run Code Online (Sandbox Code Playgroud)
据我了解,System.currentTimeMillis()是最有效的.但是,在大多数应用程序中,需要将该长值转换为Date或某些类似对象,以对人类执行任何有意义的操作.
在我的情况下,我有四种方法来解决我的问题:
index.html并禁用缓存(对我不起作用)index.html为index.jsp并禁用缓存,如下所示(对我有用,但我的客户组需要index.html)web.xml区分所需的请求并禁用缓存我的问题是如何使用 Spring Security 禁用缓存index.html
(也许使用intercept-urlinhttp标签)