accessToken을 넘기는데 undefined가 떠서 컨트롤러에 오지 못하는 거 같습니다. socialcontroller 입니다. 리액트 kakaoAPI.js 입니다. accessToken을 쿼리스트링으로 잘 보내고 받는 코드는 맞는거 같은데 왜 undefined가 뜨는지 모르겠습니다...
[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? 예 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예 3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예 [질문 내용] 스프링 입문의 섹션 1 '프로젝트 생성' 강의 부분을 따라가고 있는데 막혀서 질문드립니다. 자바 21을 설치하고 환경변수 설정하고 강의를 따라 13분 23초에 나온대로 일단 실행해보는 부분을 하려는데 자꾸만 빨간 글씨로 에러 메세지가 나와서 다음으로 넘어갈 수가 없습니다. 다른 질문들 찾아보고 구글링 해봐도 잘 모르겠습니다. 도움주시면 감사하겠습니다...!
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] assertThat은 작동이 안되는 것으로 나옵니다.
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 여기에 질문 내용을 남겨주세요. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. > Get more help at https://help.gradle.org. Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. BUILD FAILED in 6s 3 actionable tasks: 1 executed, 2 up-to-date 이런 오류가 뜹니다. 코드보다 설정 문제인 것 같은데 혹시 뭐가 문제일까요?
학습을 하던 중 코드에 궁금중이 생겨 질문드립니다. 현재 modifyPage.js를 보면 인자에 tno를 받아와 사용하고 있습니다. 그리고 readPage.js에서는 useParam()을 이용해 tno 값을 받아와 사용하고있는걸 확인하고 readPage에서도 ModifyPage 에서 처럼 useParam()을 사용하지 않고 인자로 받아와 사용하는 방식으로 해보았는데 오류가 나는데 왜그런걸까요? 위의 코드를 이렇게 바꾸면 오류가 납니다.
자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
아 아까 MVC와 API의 차이에 대해 질문했었는데요... 제가 그럼 프론트엔드 기술 (react, vue 등)을 모르는데 혼자 화면까지 나오는 프로젝트를 진행하고 싶다면 SSR인 템플릿 엔진을 이용한 MVC패턴으로 개발하는 게 더 나을까요?? 그러기엔 템플릿 엔진을 사용하더라도 JS나 css는 기본적으로 할 줄 알아야 할 거 같은데 ㅜㅜ 혼자서는 무리겠죠??
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 이게 다예요 alt + insert 도 눌러보고 마우스 우클릭하고 접근해봐도 게터섹터가 없네요
@Bean public AuthenticationManager authenticationManager(AuthenticationConfiguration configuration) throws Exception { return configuration.getAuthenticationManager(); } 위 처럼 Bean 으로 등록하게되면 내부 메서드에서 Bean으로 등록된 Builder를 통해 등록하는거 까지는 이해했는데요. 근데 여기서 setShareObject와 같은게 없는데 return http.build(); 빌드하게되면 HttpSecurity 메서드의 @Override protected void beforeConfigure() throws Exception { if (this.authenticationManager != null) { setSharedObject(AuthenticationManager.class, this.authenticationManager); } else { ObservationRegistry registry = getObservationRegistry(); AuthenticationManager manager = getAuthenticationRegistry().build(); if (!registry.isNoop() && manager != null) { setSharedObject(AuthenticationManager.class, new ObservationAuthenticationManager(registry, manager)); } else { setSharedObject(AuthenticationManager.class, manager); } } } 가 호출되어 여기서 else 조건을 타 getSharedObject 로 AuthenticationManagerBuilder 빌더 클래스를 다시 꺼내와서 빌드를 하는데 이렇게 되면 http.build 과정의 인증관리자와 스프링컨테이너에 있는 인증관리자는 서로 다른건가요? 같다면 우리가 등록한 Bean이 build 과정에서 나올것같은데 못찾겠습니다 ㅠㅠ..
[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
안녕하세요 강사님 좋은 강의 감사드립니다. post를 insert 할 때 user의 id가 post 의 user_id로 어떻게 매핑이 되어 db에 insert가 되는건지 궁금합니다. 컬럼명을 따로 지정해준 것도 아닌데 어떻게 이렇게 매핑이 자동(?)으로 매핑이 되는 건가요? post 엔티티에서 setUser할 때 알아서 되는것일까요? 확인해주시고 답변 주시면 감사드리겠습니다 !
안녕하세요, 24:00 에 말씀해주시는 SecurityContextHolderStrategy 사용하기부분에 기본방식과 변경방식 설명해주시는 부분에서 이해가 안되는 부분이 생겨 질문드립니다. 기존방식과 변경방식의 구현된 소스코드를 보니 내부에서(SecurityContextHolder.crateEmptyContext() 내부) 도 결론적으로는 strategy.createEmptyContext() 를 delegate 하는 방식으로 호출 되는것을 보았습니다. 6.x, 5.x, 4.x 모두 동일한듯합니다. /** * Allows retrieval of the context strategy. See SEC-1188. * @return the configured strategy for storing the security context. */ public static SecurityContextHolderStrategy getContextHolderStrategy() { return strategy; } /** * Delegates the creation of a new, empty context to the configured strategy. */ public static SecurityContext createEmptyContext() { return strategy.createEmptyContext(); } AbstractAuthenticationProcessingFilter 쪽에서 successfulAuthentication 쪽에 로직dl 6.x, 5.7 이하 버전 대가 다른단것은 확인했는데 /** * Puts the <code>Authentication</code> instance returned by the authentication * manager into the secure context. */ protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, Authentication authResult) throws IOException, ServletException { this.logger.debug(LogMessage.format("Authentication success: %s", authResult)); SecurityContext context = this.securityContextHolderStrategy.createEmptyContext(); context.setAuthentication(authResult); this.securityContextHolderStrategy.setContext(context); this.securityContextRepository.saveContext(context, request, response); if (this.eventPublisher != null) { this.eventPublisher.publishEvent(new InteractiveAuthenticationSuccessEvent(authResult, this.getClass())); } if (this.authenticationSuccessHandler != null) { this.authenticationSuccessHandler.onAuthenticationSuccess(request, response, authResult); } } /** * Puts the <code>Authentication</code> instance returned by the authentication * manager into the secure context. */ protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, Authentication authResult) throws IOException, ServletException { if (logger.isDebugEnabled()) { logger.debug("Authentication success: " + authResult); } SecurityContextHolder.getContext().setAuthentication(authResult); // Fire event if (this.eventPublisher != null) { eventPublisher.publishEvent(new InteractiveAuthenticationSuccessEvent( authResult, this.getClass())); } if (authenticationSuccessHandler != null) { authenticationSuccessHandler.onAuthenticationSuccess(request, response, authResult); } } 추측건데 strategy 쪽을 세팅할수있는 부분이 추가됨에따라 달라진 부분이라 생각이 되어 이부분도 말씀하신 의도와는 다를듯하여 /** * Sets the {@link SecurityContextHolderStrategy} to use. The default action is to use * the {@link SecurityContextHolderStrategy} stored in {@link SecurityContextHolder}. * * @since 5.8 */ public void setSecurityContextHolderStrategy(SecurityContextHolderStrategy securityContextHolderStrategy) { Assert.notNull(securityContextHolderStrategy, "securityContextHolderStrategy cannot be null"); this.securityContextHolderStrategy = securityContextHolderStrategy; } 경쟁조건 때문이라고 설명하신 부분에서 말씀하시는 의도를 다시 한번 알수있을까요.
자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
안녕하세요 강사님!! 다름이 아니라 공부를 하다가 MVC와 API의 차이점(?)에 대해 알아보게 되었습니다! 그래서 내린 결론이 Spring MVC구조의 @Controller는 컨트롤러의 리턴값이 ViewResolver에 의해 해석되어서 특정 View가 html응답으로 전송된다. 반면 REST API구조의 @RestController에 의한 호출은 View를 리턴하는 것이 목적이 아닌, 데이터를 전송하는 것을 목적으로 응답이 전송되어 진다. 라고 내렸습니다. 첫번째로, 위에서 제가 내린 결론이 맞는 말인지와 두번째로, 그럼 MVC를 쓰는 경우와 API를 쓰는 경우가 언제인지가 궁금합니다. 제가 아직 개념이 부족해서 그런건지는 몰라도 MVC를 쓰면 프론트엔드의 역할이 없어지는게(?) 아닌가 하는 착각이 들어서... 답변 부탁드리겠습니다!!
[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? 예 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예 3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예 [질문 내용] 상품 수정할때 updateItemForm 메서드를 작성하면서 Book item = (Book) itemService.findOne(itemId); 이 코드를 작성하는데, 이게 가능하려면 itemService.findOne 메서드에서 리턴하는 객체가 원래 업캐스팅됐던 객체여야 가능한거 아닌가요? itemService.findOne은 itemRepository.findOne(itemId)을 리턴하고, ItemRepository의 findOne은 em.find(Item.class, id) 을 리턴합니다. 이 과정에서 언제 업캐스팅 되는건가요? 혹시 질문이 잘못 됐거나 제가 잘못 알고 있는 내용이 있다면 설명해주시면 감사하겠습니다.
안녕하세요~ 강의 중 ApplyService#apply 트랜잭션 관련해서 질문이 있습니다. apply 메서드가 appliedUserRepository#add 만 호출되거나 couponCountRepository#increase 까지만 호출되고 에러, 시스템 다운 등 특정 이유로 couponCreateProducer#create 는 호출되지 않게 되었을 때에 대한 처리가 필요할 것 같습니다. 어떻게 처리하는 것이 좋을까요?? @Service @RequiredArgsConstructor public class ApplyService { private final CouponRepository couponRepository; private final CouponCountRepository couponCountRepository; private final CouponCreateProducer couponCreateProducer; private final AppliedUserRepository appliedUserRepository; public void apply(final Long userId) { final Long applied = appliedUserRepository.add(userId); if (applied != 1) { return; } final long count = couponCountRepository.increase(); if (count > 100) { return; } couponCreateProducer.create(userId); } }
안녕하세요 강사님 build.gradle에서 excludeTags("TooLongTime")를 추가하고 Reload All Gradle Projects 를 하는 과정에서 아래와 같이 오류가 발생합니다 Caused by: java.lang.ClassNotFoundException: org.gradle.internal.impldep.org .junit.platform.launcher.TagFilter Unable to load class ' org.gradle.internal.impldep.org .junit.platform.launcher.TagFilter'. This is an unexpected error. Please file a bug containing the idea.log file.