@Override
protected void configure(HttpSecurity http) throws Exception {
http.csrf().disable()
.authorizeRequests()
.antMatchers("/admin/**").hasAnyRole("ADMIN")
.antMatchers("/**").permitAll()
.and().formLogin().loginPage("/admin/login").permitAll()
.and()
.rememberMe()
.rememberMeParameter("remember-me")
.tokenValiditySeconds(86400)
.and().exceptionHandling().accessDeniedPage("/error/access-denied.html");
}
<ul class="header-links">
<li th:class="${#httpServletRequest.requestURI.contains('/')} ? 'link-active' : 'link-inactive'"><a th:href="@{/}">Home</a></li>
<li><a href="#" target="_blank">Get Library<i class="fab fa-github"></i></a></li>
<li th:class="${#httpServletRequest.requestURI.contains('/examples')} ? 'link-active' : 'link-inactive'"><a th:href="@{/examples}">Sketch Examples</a></li>
<li th:class="${#httpServletRequest.requestURI.contains('/tutorials')} ? 'link-active' : 'link-inactive'"><a th:href="@{/tutorials}">Video Tutorials</a></li>
</ul>
th:class="${#httpServletRequest.requestURI.contains('/')}
-<Border.Effect>
<DropShadowEffect Color="Black"
Direction="320"
BlurRadius="60"
ShadowDepth="40"
Opacity="0.8" />
</Border.Effect>