inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

172만명의 커뮤니티!! 함께 토론해봐요.

JWT SecurityConfig.java에서 .and() deprecated

해결됨

스프링부트 시큐리티 & JWT 강의

Spring Boot 3.0.0에서 최신판인 Spring Boot 3.1.2로 업데이트 되면서 Spring Security도 6.1.2로 업데이터 되었습니다. 이에 따라서 강사님 github - Version3 branch에 있던 프로젝트의 SecurityConfig.java 에서 중간중간에 .and()로 묶어주신 부분도 .and()가 deprecated 되면서 사용할 수 없게 되었습니다. 이에 따라 // 이전 생략 return http.csrf(CsrfConfigurer::disable) .sessionManagement(s->s.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) .formLogin(f->f.disable()) .httpBasic(h->h.disable()) .apply(new MyCustomDs1()) // custom Filter .authorizeHttpRequests(authorize-> { // 권한 부여 // authorizeRequests가 deprecated됨에 따라 authorizeHttpRequests 사용 권장 authorize .requestMatchers("/api/v1/user/**").hasAnyRole("hasRole('ROLE_USER') or hasRole('ROLE_MANAGER') or hasRole('ROLE_ADMIN')") .requestMatchers("/api/v1/manager/**").hasAnyRole("hasRole('ROLE_MANAGER') or hasRole('ROLE_ADMIN')") .requestMatchers(("/api/v1/admin/**")).hasAnyRole("hasRole('ROLE_ADMIN')") .anyRequest().permitAll(); }); apply(new MyCustomDs1()) 이후에 authorizeRequest 메소드를 람다식으로 변환시켜서 이어줄려고 하는데, 위 캡쳐 이미지와 같이 에러가 떴습니다. 내용을 보자 하니 http에 custom Filter(new MyCustomDs1())를 apply시키고 이후에 authorizeHttpRequests를 실행시켜야 하는데, authorizeHttpRequest가 MyCustomDs1 내부에 있는 함수로 인식하는거 같은데,, 어떻게 해결해야 하는지 방법을 공유해주시면 감사하겠습니다.

  • spring
  • spring-security
  • jwt
  • deprecated
msun0215 댓글 1 좋아요 0 조회수 1069

Error: 'app.router' is deprecated!

미해결

따라하며 배우는 도커와 CI환경 [2023.11 업데이트]

강의와 같은 코드로 도커를 실행하면 아래와 같은 에러가 발생했습니다. Error: 'app.router' is deprecated! 해당 에러는 아래와 같이 코드를 변경해주시면 해결 가능합니다. 변경 전 코드: app.router.get('/', (req, res) => { res.send('Hello World');}) 변경 후 코드: app.get('/', (req, res) => { res.send('Hello World');})

  • deprecated
  • github
  • nodejs
  • docker
  • aws
  • docker
  • 도커
  • cicd
  • travis-ci
  • 데이터 엔지니어링
김기쁨 댓글 1 좋아요 0 조회수 409

cheerio deprecated

미해결

Node.js로 웹 크롤링하기

const crawler = async() => { await Promise.all(records.map( async(r) => { const response = await axios.get(r.링크) if(response.status === 200){ const html = response.data const $ = cheerio.load(html) const text = $('.score.score_left .star_score').text() console.log(r.제목,'평점',text) } } )) } 1-4 axios-cheerio로 첫 크롤링하기 강의중 const $ = cheerio.load시 cheerio에 빗금이 처지며 deprecated라는 표시가 뜹니다. 무시하고 그냥 해도 결과는 나오지만 구글링을 해봐도 deprecated대신 사용할수있는게 없어 그냥 해야하나 아니면 다른 방법으로 대체해야하나 궁금합니다. package.json은 아래와 같습니다. "dependencies": { "axios": "^1.1.3", "cheerio": "^1.0.0-rc.12", "nodemon": "^2.0.20" }

  • deprecated
  • puppeteer
  • cheerio
  • nodejs
  • 웹-크롤링
  • javascript
양진영 댓글 2 좋아요 0 조회수 1176

WebSecurityConfigurerAdapter deprecated

해결됨

Spring Boot JWT Tutorial

WebSecurityConfigurerAdapter 가 이제 더 이상 지원을 하지 않는다고 하여 WebSecurityFilterChain으로 하래서 시도중인데 계속하여 401 에러가 뜹니다... @EnableWebSecurity public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity http) throws Exception{ http .authorizeRequests() .antMatchers("api/hello").permitAll() .anyRequest().authenticated(); return http.build(); } }

  • deprecated
  • spring-boot
  • websecurityconfig
  • jwt
Jeong-Woo Kang 댓글 4 좋아요 0 조회수 2460

expo-cli 설치하는 과정에서 자꾸 에러가 떠요!

미해결

n 계속 npm Warn이 뜨는데 구글에 많이 검색을 해봐도 계속 expo 설치가 잘 안 되네요ㅠㅠ 제가 의심하는 오류 원인은 1. npm 버전이 너무 최신버전이라 expo 가 지원이 안됨 2. npm을 global 버전으로 깔았는데 거기에서 root를 쓰는 npm (?) 이 설치돼서 오류가 계속 뜸 이라고 생각하고 있는데 제 생각이 맞는 건지 그리고 이걸 어떻게 해결해야 할지 감이 잘 안 오네요ㅠㅠ 특히나 제가 Appdata에서 파일을 정리하는 거에 대한 두려움이 있어서 함부로 못 지우겠어요... 도와주실 분 있나요?? React-Native가 원래 좀 까칠한가요??? 나중에 vue-cli 깔때도 이럴 까봐 무섭네요..

  • expo
  • npmerror
  • npm
  • deprecated
전영서 댓글 0 좋아요 0 조회수 230

event deprecated

미해결

Klaytn 클레이튼 블록체인 어플리케이션 만들기 - NFT

프론트 엔드를 실행후 로그인시 "올바른 keystore화일이 아님" "비밀번호가 일치하지않습니다" 오류가 발생하여 코드를 보니 event 가 deprecated되어 있는데 어떻게 해야 하나요?

  • event
  • blockchain
  • deprecated
  • 웹앱
  • dapp
  • nft
김석직 댓글 6 좋아요 1 조회수 1694

인기 태그

인프런 TOP Writers

주간 인기글