안녕하세요! 널개님 강의 듣고있는 수강생입니다. 강의 내에 나와있는 예제문제 외에도 실습을 통해 실력을 향상시키고 싶습니다. 혹시 실습을 할 수 있는 사이트를 추천해주실 수 있을까요? 이론강의는 널개님 강의를 통해 충족이 되지만 실습은 아직도 부족하네요ㅠㅠ 실습을 통해서도 배우는게 많다 생각하여 문의드립니다. 항상 시간이 아깝지않은 강의해주셔서 감사합니다!
제가 포트폴리오를 목적으로 스프링부트 즉, 백엔드를 맡았고 리액트와 진행했는데 프로젝트는 완성이 되었지만 리팩토링을 하고 있으면 좋을거 같은 기능들을 추가하려고 할 때 그러면 백엔드에서는 만들지만 화면은 구성을 못하니 그냥 건들지 말아야 할까요 아니면 백엔드에서 구현하더라도 그냥 포폴에는 언급하지 말아야 하나요? 포트폴리오 용으로 만들고 나서 코드를 가독성 있게 리팩토링하고 갑자기 아 이런 기능이 있었으면 좋았겠는데 그런 생각들이 들어서 백엔드에서라도 구현할까 하다가 연습용이면 모를까 포폴용이라 어떻게 해야할지 헷갈리네요
@MyIncludeComponent public class BeanA { } @MyExcludeComponent public class BeanB { } package hello.core.scan.filter; import org.junit.jupiter.api.Test; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.FilterType; import static org.assertj.core.api.Assertions.*; import static org.springframework.context.annotation.ComponentScan.*; public class ComponentFilterAppConfigTest { @Test void filterScan() { ApplicationContext ac = new AnnotationConfigApplicationContext(ComponentFilterAppConfig.class); BeanA beanA = ac.getBean("beanA", BeanA.class); assertThat(beanA).isNotNull(); } @Configuration @ComponentScan( includeFilters = @Filter(type = FilterType.ANNOTATION, classes = MyIncludeComponent.class), excludeFilters = @Filter(type = FilterType.ANNOTATION, classes = MyExcludeComponent.class) ) static class ComponentFilterAppConfig { } } 강의와 똑같이 따라친 해당 코드에서 org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'beanA' available 에러가 계속 발생합니다. 그래서 아래 코드처럼 BeanA 클래스와 BeanB클래스에 @Component 애노테이션을 추가하였더니 잘 작동합니다. @MyIncludeComponent @Component public class BeanA { } @MyExcludeComponent @Component public class BeanB { } 그런데 이 경우에는 또 하단의 Assertions.thorws 검증 코드가 제대로 작동하지 않습니다. ㅠ .... assertThrows( NoSuchBeanDefinitionException.class, () -> ac.getBean("beanB", BeanB.class)); 그래서 하단 코드처럼 BeanA에만 @Component를 붙이고 BeanB에는 @Component를 붙이지 않으면 테스트 코드가 올바르게 작동합니다... 원인을 알 수 있을까요? @MyIncludeComponent @Component public class BeanA { } @MyExcludeComponent public class BeanB { } BeanA, BeanB, MyExcludeComponent, MyIncludeComponent, ComponentFilterAppConfigTest 모두 테스트의 filter 패키지에 있습니다.
안녕하세요! Native Code와 Managed Code 관련해서 질문을 남겨 봅니다! C언어의 컴파일 과정에서, 목적 파일이 생성 되지않습니까? 이러한 목적 파일이, 링킹 과정을 거치면 실행 파일이 되는걸로 알고 있습니다 여기서 질문입니다! 실행 파일의 적힌 실행 코드가, Native Code와 같은 의미인가요? JVM과 같이, 소프트웨어 CPU(virtual machine)를 예로 들었을 때, 컴파일 과정을 거치고, 최종적으로 만들어진 실행파일의 적힌 코드는 Managed code라고 보면 되는걸까요? 감사합니다!
처음엔 자식타입이 부모타입보다 더 큰 범위라서 부모 인스턴스는 자식 인스턴스를 참조할 수 있다고 이해했습니다. 또한 강의자료에도 자식 클래스를 참조할 때 자식 인스턴스 안에 부모 인스턴스의 부분과 자식인스턴스의 부분이 나뉘어져있는거라고 나와 있어 그대로 이해했었는데요. 강의에선 부모가 자식을 담을 수 있다 (O) 자식은 부모를 담을 수 없다(O) 이렇게 되어있어 헷갈려서 질문드립니다... (+ 그리고 다운캐스팅은 복사한 값을 캐스팅하는 것이므로 일시적으로만 실행되는게 맞나요?) ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 여기에 질문 내용을 남겨주세요.
위 코드에서 th: class= ${errors?.containsKey('itemName')} ? ~~~ 를 if 조건식으로 참 거짓 구분하여 참이면 클래스 뒤에 append를 해주는 방식으로 해주었는데 이방식으로 하면 아예 상품명 공간이 사라지네요 ㅜ 다른방식으로도 해보고 싶은데 강사님이 알려주신 th:class 밖에 없는것일까요? 타임리프 기본 문법을 다시 보면서 변형해보고있는데 잘 안되서요 😅 th:if="${errors?.containsKey('itemName')}" th:classappend="field error"
[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 예 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 예 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) 예 [질문 내용] 3. 회원 관리 예제 - 백엔드 개발.pdf 5번째 페이지 MemoryMemberRepositoryTest 클래스의 save() 메서드 부분이 이렇게 되어 있습니다. 마지막 줄이 수정이 필요해 보입니다. @Test public void save() { //given Member member = new Member(); member.setName("spring"); //when repository.save(member); //then Member result = repository.findById(member.getId()).get(); (result).isEqualTo(member); }
안녕하십니까 코딩센세! 이번에도 어김없이 질문 드리고 싶은 부분이 있어서 질문글을 남겨봅니다. 활용(바텀업 DP) 수업에서, 8:08초와 10:55초 에서 작성하신 if문이 잘 와닿지가 않습니다. 8:08초의 경우, if idx+ interview[idx][0] > N 으로 작성하셨는데요. 설명 역시 논리적으로 다가왔습니다. 당연히 문제에서 주어진 N의 범위보다 크다면 인덱싱이 불가능할테니 idx보다 더 뒤에 있는 dp[idx+1]의 값으로 할당하는 거라고 이해했습니다. 문제는 10:55초 입니다. 작성하신 코드는 if weight < B 인데요. 부연 설명은 "가방의 무게보다 작으면 예외 처리를 한다"라고 이해했습니다. 문제의 요구사항에 따르면 가방의 무게보를 초과했을 때 예외처리를 해야 하지 않나? 라는 의문이 들었는데요. 아직 의문을 해결하지 못하여 선생님의 코드가 잘 이해가 되지 않는 상태에 있습니다... 저의 질문을 읽어주신다면, if weight < B 라고 조건을 걸어야 하는 부분에 대해 조금 더 상세한 설명을 부탁드립니다! p.s. 선생님 혹시 7강에 대한 정답 코드는 볼 수 없는건가요? 수업자료에 작성되어 있지 않아서 문의드립니다.
앞서 만든 코드에서는 OnGameClearCpp, OnGameOverCpp 이름으로 나오도록 했는데 미리 만드신것에선 이름을 다르게 지으신건가요? OnGameClear, OnGameOver 이름이 다르길래 질문드립니다. +수정 강의 뒤에 내용을 듣다보니 OnGameClearCpp, OnGameOverCpp 도 가져와 연결시켜주네요.. 미리만들어진것말고 제가 직접 만들어보고 있는데 저노드가 안보이는데 어떻게 추가를하면 될까요?
테스트 환경에서는 application.properties 를 읽지 않고 ApplicationRunner 가 동작하지 않는다고 하셨습니다. 그래서 @TestPropertySource 로 설정 파일을 넣어줬는데요 이게 동작하지 않는 이유는 테스트 환경은 스프링을 확장해서 스프링 컨테이너를 띄우고 구성 정보 클래스를 집어넣어서 빈 오브젝트만 등록하기 때문이 맞을까요 ? SpringApplication.run 은 테스트 환경과 다르게 스프링 컨테이너를 띄우고 템플릿 매서드로 컨테이너를 띄우고 구성 정보 클래스를 활용해서 빈 오브젝트를 등록하는 거 외에 추가적인 Ruuner 나 Property 파일을 읽는 작업을 별도로 하기 때문인거죠 ?
안녕하세요 강사님! 우선 양질의 강의 잘 듣고 있다는 말씀 드리고 싶습니다. Spring Security 에서 AuthenticationProvider 를 찾아서 인증을 위임하는 역할을 수행하는 ProviderManger 도 옵저버 패턴을 사용하고있다고 볼 수 있을까요? ProviderManager (AuthenticationManager) 에서 AuthenticationProvider 들을 가져온후 이들을 순회하며 인증위임을 시키는 코드입니다 단순히 supports() 를 통해 인증을 위임시킬 AuthenticationProvider 들을 골라내는 것뿐, 이것도 옵저버 패턴이 적용된 예인지 알고 싶습니다.
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? 예 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예 3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예 [질문 내용] 저와 같은 문제를 겪을까 포스팅 합니다. 스프링 부트 3.2 버전 사용 중이며, @RequestMapping 어노테이션 사용 시에 404 not found가 반환될텐데, 해당 부분 @RestController로 변경 시 정상적으로 ok 반환됩니다.
C:\Users\Yoon>cd C:\Users\Yoon\Desktop\CS\SpringStudy\hello-spring C:\Users\Yoon\Desktop\CS\SpringStudy\hello-spring>gradlew.bat build FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring root project 'hello-spring'. > Could not resolve all files for configuration ':classpath'. > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.2.1. Required by: project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.2.1 > No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.2.1 was found. The consumer was configured to find a library for use during runtime, compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.5' but: - Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.1 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '8.5') - Variant 'javadocElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.1 declares a component for use during runtime, and its dependencies declared externally: - Incompatible because this component declares documentation and the consumer needed a library - Other compatible attributes: - Doesn't say anything about its target Java version (required compatibility with Java 8) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '8.5') - Variant 'mavenOptionalApiElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.2.1 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '8.5') - Variant 'mavenOptionalRuntimeElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.2.1 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component, compatible with Java 17 and the consumer needed a component, compatible with Java 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '8.5') - Variant 'runtimeElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.1 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component, compatible with Java 17 and the consumer needed a component, compatible with Java 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '8.5') - Variant 'sourcesElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.1 declares a component for use during runtime, and its dependencies declared externally: - Incompatible because this component declares documentation and the consumer needed a library - Other compatible attributes: - Doesn't say anything about its target Java version (required compatibility with Java 8) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '8.5') * Try: > Run with --stacktrace option to get the stack trace. > 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. BUILD FAILED in 5s "빌드하고 실행하기" 강의에서 위 에러가 발생하였습니다. 우선 저는 윈도우 사용자입니다. java --version으로 확인해봐도 Java 17버전이고, 설정 가능한 모든 부분에서 17버전으로 바꿨는데도 에러가 발생합니다. 파일 링크 : https://drive.google.com/file/d/1hnY1DJJ-9loR_mcQBum97NDgOErGgoMO/view?usp=drive_link
[코드팩토리] [중급] Flutter 진짜 실전! 상태관리, 캐시관리, Code Generation, GoRouter, 인증로직 등 중수가 되기 위한 필수 스킬들!
basket screen에서 appBar에 뒤로가기 기능을 입혀보려고 합니다. 다른 페이지들은 가능한데, 장바구니 페이지에서는 뒤로가기 기능이 안되더라고요, paginationListview로 씌우고 <BasketITemModel>를 넣으려고 해서 안되는 것 같은데요, 이게 가능하도록 하려면 어떻게 해야할까요?