inflearn logo
강의

Course

Instructor

Spring Security Complete Mastery [6.x Revised Edition]

Request-based authorization - HttpSecurity.authorizeHttpRequests() - 2

HttpSecurity.authorizeHttpRequests() - 2 강의 부분에 대한 질문

102

manage

1 asked

0

현재 제 build.gradle은
plugins { id 'java' id 'org.springframework.boot' version '3.5.0' id 'io.spring.dependency-management' version '1.1.7' } group = 'io.security' version = '0.0.1-SNAPSHOT' java { toolchain { languageVersion = JavaLanguageVersion.of(17) } } repositories { mavenCentral() } dependencies { implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-web' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.security:spring-security-test' testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } tasks.named('test') { useJUnitPlatform() }

같이 설정이 되어 있습니다.

 

AntPathRequestMatcher, MvcRequestMatcher가 사용이 되지 않는다고 자동완성때 밑줄이 쳐져 있어서

.requestMatchers("/manager/**").hasAuthority("ROLE_MANAGER") .requestMatchers("/admin/payment").hasAuthority("ROLE_ADMIN")
이렇게 수정하였는데 맞게 수정 한 것인지 문의 드립니다.

spring spring-boot spring-security security web-security

Answer 2

0

manage

답변 감사합니다.

0

leaven

일단 수정한 것은 맞습니다.
그리고 일단 저의 강의를 학습하실 때는 저의 강의 버전에 맞추어서 하시는 걸 권해 드립니다.
강의 전체를 원할하고 매끄럽게 학습하고 나서 버전업을 해서 리팩토링해도 늦지 않습니다.

그렇지 않으면 아주 심각한 문제거나 중요한 이슈가 아닌 이상 진도 나가는데 오히려 더 지장을 받게 됩니다.

 

로그아웃-logout()-2 강에서 겟방식 로그아웃 호출 후 화면이동 질문입니다.

0

27

2

단원별 소스코드

0

59

2

CustomAuthenticationProvider 추가 관련 문의

0

69

2

AOP 의존성 명칭 변경

0

63

1

빈 1개 등록 시 다른 해결 방법

0

65

1

@Bean으로 AuthenticationProvider를 등록 시 http.authenticationProvider 함수를 이용해서 추가해줘야되나요?

0

85

2

OIDC의 id token에 담긴 데이터에 대해

0

74

1

loginPage("/loginPage") 질문드립니다.

0

68

1

@EnableWebSecurity

0

147

1

트랜잭션과 롤백

0

99

1

68. 인증 이벤트 - AuthenticationEventPublisher 활용 강좌 음성 문제

0

87

2

AuthenticationManager 사용 방법

0

148

2

spring security 6.3에서는 HttpSecurity가 만들어지기 전 WebSecurity가 먼저 만들어지는게 맞나요??

0

190

1

init(B Builder), configure(B builder) 에 대하여 질문 드립니다.

0

105

2

메타 주석 질문

0

68

1

동시세션제어 기능에서 로그아웃하기

0

144

3

로그인 후, redirect 에서 error

0

138

3

Session 생성 타이밍에 대한 질문

0

84

2

강의 참고 내용을 개발 로그로 작성해도 될지 문의드립니다.

0

132

2

customAuthentication 관련

0

126

2

authenticationManagerBuilder 주입받은거 vs 만든 거

0

110

1

UserDetailsService()에서 UserDetail이 아닌 타입을 반환할 수 있나요?

0

101

1

9:28 패턴 3의 경우 마지막으로 설정한 것만 적용되는 것 같습니다.

0

158

2

Bean UserDetailsService

0

90

2