Java/Spring Boot Security(22)
-
Spring boot Security에서 sencha 예외 처리
로그인 전에 sencha 화면이 나오게 하려면 아래와 같이 url 예외처리 해줘야 함 String[] exceptUrl = { "/*.js", "/*.json", "/build/**", "/ext/build/**", "/ext/classic/**", "/app/**", "/classic/**" } @Bean public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { http.authorizeHttpRequests((requests) -> requests .requestMatchers(exceptUrl).permitAll() .anyRequest().authe..
2024.07.20 -
Spring boot Security Custom 화면 설정
화면 추가 태그의 'name' 속성을 기준으로 파라메터 정보를 전달함 'id' 속성은 있어도 작동 안됨# 디렉토리: /src/main/resources/templates# home.html Welcome! Click here to see a greeting. # login.html Invalid username and password. You have been logged out. User Name : Password: # hello.html ..
2024.06.13 -
Spring boot Security DB 연동
DB 연동 객체@Datapublic class Member { private String id; private String name; private String passwd;}@Servicepublic class MemberService { MemberMapper memberMapper; public MemberService(MemberMapper memberMapper) { this.memberMapper = memberMapper; } public List getMemberList() { return memberMapper.getMemberList(); } public Member getMember(String id) { return memberMapper.getMember(id); } p..
2024.06.09 -
Sprng boot Security 적용
pom.xml# dependabct 추가 # thymeleaf 추가 org.springframework.boot spring-boot-starter-thymeleaf # spring security 추가 org.springframework.boot spring-boot-starter-security # spring boot 3.2.5에 포함되어 있음 org.thymeleaf.extras thymeleaf-extras-springsecurity6 3.1.1.RELEASE org.springframework.security spring-security-test test환경설정 추가@Configuration..
2024.05.26