웹개발/Spring Boot(9)
-
Spring Boot 정적 리소스 설정
spring: web: resources: static-locations: classpath:/js, classpath:/css, classpath:/static application.yml에 다음과 같이 경로들을 나열하면 해당프로젝트의 폴더 위치로 접근이 가능하다.
2023.07.04 -
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