[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예) [질문 내용] 안녕하세요. 다른 사람의 코드를 읽던 중에 궁금한 것이 생겨서 질문 남깁니다. 제가 읽은 코드에는 ~~Service(인터페이스) 와 ~~ServiceImp로 작성을 했습니다. 이 전에도 이런 구조를 사용하는 코드를 종종 봤습니다. 저는 지금까지 그냥 바로 인터페이스 없이 ~~Service를 만들고 비즈니스 로직을 작성 했습니다. 제가 찾아본 결과로는 인터페이스와 구현을 구분하는 이유는 2가지 였습니다. OCP 법칙을 더 잘 지키기 위해서 추상과 구현을 OCP 법칙을 지키고 다형성을 확보하기 위해서 AOP Proxy 과거 스프링에서 AOP를 사용할 땐 JDK Dynamic Proxy를 사용하기 때문에 인터페이스가 필요했다. 하지만 지금은 GCLIB를 사용할 수 있기 때문에 사실상 의미를 잃었다. 추가적으로 인터페이스를 나누고 인터페이스에 javadoc용 주석을 남겨두면 유지보수 측면에서 읽기에 더 나은 부분이 있지 않을까 정도 생각해 보았습니다. 서비스 계층에서 인터페이스와 구현을 나누는 것과 하나의 서비스 클래스에 구현하는 것 중에 대부분의 경우 어떤 것을 더 권장하시는지 궁금합니다. 감사합니다!
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 안녕하세요. 강의를 수강하면서 몇가지 질문이 있어서요. 실습 시 Epic > task > sub-task로 issue를 생성하기 전에 도식화를 해놓고, 실습을 진행하셨는데, 혹시 JIRA에서 sub-task까지 등록이 완료된 Epic을 도식화할 수 있는 방법이 있나요? Issue에 대한Type이 몇가지 있는데, Type별로 Template을 만들 수 있나요? (이건 별건 아니지만..) Issue의 속성에 Development(Create Branch, Create Commit)는 별도 Apps을 설치해야 하나요? (설치해야 한다면 어떤 App인지 알려주시면 감사하겠습니다.) 이상입니다.
#include <iostream> #include <iomanip> using namespace std; int main() { int widthValue{ 4 }; char sentence[10]; cout << "Enter a sentence:\n"; cin.width(5); while (cin >> sentence) { cout.width(4); cout.fill('0'); cout << sentence << "\n"; cin.width(5); } } 이 코드를 실행하면 공백 없이 sentence에 입력값을 넣었을 때는 출력값이 이해가 되는데 공백 포함해서 sentence에 입력하면 출력값이 이해가 안 돼요...! cout.width(4);가 4개를 출력하는데 sentence 배열에서 white space를 만나면 더 이상 출력을 안 하는 건가요? 왜 그런 건가요?
제가 작성한 코드인데 왜 이런 오류가 뜨는지 모르겠습니다.. 함수 전문 첨부합니다. 아래의 두 변수 total_emission_car, total_cost_car은 전역변수로 선언했고, carbon_emision_truck과 fuel_efficiency_truck은 #define을 활용해 정의했습니다.
안녕하세요 섹션 5 . 수학 객체 파트 3분 19 초 에서 077215 는 존재할 수 없다 라고 하셨는데 왜 존재할 수 없다라는 것인가요 ? 077215에서 0을 인식할 수 없어 77215로 인식하기 때문에 그런 것 같은데 제 입장에서는 급 ?뜬금없이 ? 라는 느낌이 있어서 정확히 왜 존재할 수 없다고 하신지 이해가 가지 않습니다..
[질문 내용] 처음 스프링을 배울 때 spring legacy 프로젝트로 배웠습니다. 따라서 root-context.xml, servlet-context.xml 방식으로 배웠습니다. 이전에 질문 드렸을때, " SpringApplication.run() 메서드는 기본적으로 @SpringBootApplication이 위치한 패키지와 하위 패키지를 시작점으로 모든 클래스를 스캔합니다 따라서 @Configuration, @Component, @Service, @Repository 등의 애노테이션이 있는 클래스를 찾아서 스프링 애플리케이션의 컨텍스트를 생성하는데 사용합니다. " 라고 답변을 받았습니다. 하지만 legacy 프로젝트를 실행할때에는 @SpringBootApplication을 따로 적지 않았는데, 어떻게 해당 xml(root, servlet)에서 bean을 읽어오는지 의문이 듭니다. 추가로 xml로 작성하였을때도 SpringApplication.run() 메서드가 자동으로 읽는지도 문의드립니다.
안녕하세요. home 화면에서 회원가입을 누르면 Members/new 페이지로 넘어가는데 넘어가면서 @GetMapping(/members/new) 함수가 호출되는 것으로 이해했습니다. 이 함수가 호출이 되면 members/CreateMemberForm 페이지를 리턴하는데 왜 url 에는 계속 memebers/new 가 뜨는지 궁금합니다. members/CreateMemberForm 가 url 에 있어야할 것 같은데 왜 그대로 members/new 인가요?
안녕하세요 제로초님 아이폰14프로를 연결해서 하고있는데 티맵이 설치가 안되어 있다고 알림창이 계속 뜹니다 에러는 -canOpenURL: failed for URL: "tmap:" - error: "This app is not allowed to query for scheme tmap" [javascript] 'TMap callback', false 이렇게 뜹니다 다른분 질문보고 info.plist에서 <array><string>tmap</string></array>까지 하고 xcode는 어디에서 설정을 해주어야하는지 모르겠습니다
안녕하세요! 좋은 컨텐츠 감사합니다. [질문] 14:15에 등장하는 class LinkedList가 왜 object를 상속하나요? 없어도 되지 않을까 하는데, 무슨 이유가 있는 것인지 궁금합니다. class Node는 상속없이 작성되었기에, 그 차이가 더욱 궁금합니다. 감사합니다.
우선 좋은 강의 또 만들어주셔서 감사드립니다 :) 정말 개인적으로 궁금해서 문의 드립니다. 컴파일러 실행 시 타입스크립트 코드를 변환할 때 tsconfig.json 을 참조 하는 것으로 알고 있습니다. "strict" : true 값의 변화를 컴파일전에 어떻게 알 수 있는 건가요?? 강의에서 함수 파라미터 타입을 명시하지 않았을 때 "strict" : true 면 오류 ( 컴파일 (Parameter 'message' implicitly has an 'any' type.) 가 발생합니다. 컴파일러 실행 전
안녕하세요. 수업중 질문사항이있어서 문의드립니다. '5. K번째 큰 수' 강의 중 설명 부분에 대하여 의문점이 들었습니다. 문제 설명 부분에 '만약 큰 수부터 만들어진 수가 25 25 23 23 22 20 19......이고 K값이 3이라면 K번째 큰 값은 22입니다.' 라는 설명이 있는데, k번째로 큰값은 71로 수정되어야 할것같습니다.
안녕하세요. 항상 강의 잘 듣고 있습니다. 낙관적 락에 대해서 직접 테스트 코드를 통해 동작 방식을 살펴보고자 하는데 생각대로 동작하지 않아서 질문남깁니다. 우선 테스트 코드 시 스프링 IOC 컨테이너를 사용하기 위해 @SpringBootTest를 선언한 상황이고, 아래는 테스트 코드 내용입니다. 스레드 1(트랜잭션1)에서 낙관적 락을 사용한 조회를 하도록 했고 커밋 되기 전, 스레드 2(르랜잭션2)에서 해당 데이터를 변경하도록 했습니다. 예상 대로라면 예외가 발생해야되는 데 정상 종료가 되어서 질문드립니다. ㅠㅠ 로그를 찍어보았는데, 예상대로 각 스레드 별로 독립적인 트랜잭션이 실행되고, 낙관적 락을 통해 마지막에 version 확인 쿼리까지 발행하는데 왜 오류가 발생하지 않는지 궁금합니다. 잘못된 점이 있으면 알려주시면 감사하겠습니다!!
member가 새로 생기면 해당 Team에 있는 List<Member> members에 member를 값을 넣어주는 연관관계 편의 메서드가 있다고 할 때, team.getMembers()를 하면 원래는 db에서 join을 한 뒤 해당하는 팀의 멤버들이 리스트에 담겨 반환되는거 같은데, 직접 리스트에 멤버들을 넣어주어서 이미 리스트에 멤버들이 있을텐데 이것들을 반환해주는건가요? 질문1. 연관관계 편의 메서드가 없었다면 db가 join을 해서 해당하는 team의 멤버들을 리스트에 담아서 반환해주는 것이 맞나요? 질문2. 연관관계 편의 메서드로 내가 해당 team 리스트에 멤버들을 넣어주었으면 db에 갈 필요 없이 넣어준 것들을 그대로 반환하는 건가요? 질문3. 그렇다면 db에 들어갈지 안들어가고 리스트에 담아놓은 것들을 반환할지는 jpa가 어떻게 판단하나요?
[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? 예 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예 3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예 [질문 내용] ./gradlew clean build를 했을 때 아래와 같은 에러가 발생합니다. 구글 드라이브 링크: https://drive.google.com/file/d/1noPIwH5K_JrQ_st4-VSuOOqVLuLBopJw/view?usp=sharing $ ./gradlew clean build FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring root project 'jpashop'. > Could not resolve all files for configuration ':classpath'. > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.1.0. Required by: project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.1.0 > No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.1.0 was found. The consumer was configured to find a runtime of a library compatible with Java 11, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.6.1' but: - Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.1.0 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 11 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.6.1') - Variant 'javadocElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.1.0 declares a runtime of a component, 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 11) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '7.6.1') - Variant 'mavenOptionalApiElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.1.0 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 11 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.6.1') - Variant 'mavenOptionalRuntimeElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.1.0 declares a runtime of a library, 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 11 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.6.1') - Variant 'runtimeElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.1.0 declares a runtime of a library, 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 11 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.6.1') - Variant 'sourcesElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.1.0 declares a runtime of a component, 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 11) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '7.6.1') * 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 4s