웹개발/Spring Boot(8)
-
Spring Boot Security 사용자별 동시접속자 수 제어
@Bean public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { return http // .addFilterBefore(new CustomAuthenticationFilter(), UsernamePasswordAuthenticationFilter.class) .httpBasic().and() .sessionManagement((sessionManagement) -> sessionManagement // .sessionAuthenticationStrategy(sessionControlStrategy()) // .sessionCreationPolicy(SessionCreationPolicy.STATELESS) // .ses..
2023.06.30 -
Spring Boot + Thymeleaf Tag JAVA CUSTOM UTIL 사용
@Component public class CustomUtils { public static String removeTag(String html) throws Exception { return html.replaceAll("]*)?(\\s)*(/)?>", ""); } } 자바 Class 에 Component 추가 후 Thymeleaf 에서 이런 식으로 사용할 수 있다.
2023.06.27