학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 여기에 질문 내용을 남겨주세요. 정렬구현하다가 OrderSpecifier을 구글링으로봤는데 아직 영상을 다못봐서요 영상에서 학습하나요?
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 여기에 질문 내용을 남겨주세요. 그냥 상품등록 버튼 눌러서 상품을 추가할때는 정상적으로 재고수량이 나오는데 initdb로 만들어지는 샘플데이터의 재고수량(stockquantiy)의 데이터가 변경됩니다 ex(100->2) 로그를 보면 item을 insert후에 자동으로 update -> 데이터가 변경.. 이유를 모르겠습니다. 프로젝트 첨부합니다 ㅜㅜ https://drive.google.com/file/d/1p_rlIECRXz4hLxr-aB3EpVSYM-jw2TIc/view?usp=sharing
[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 여기에 질문 내용을 남겨주세요. 회원 목록 클릭시 Whitelabel Error가 나오는데 정확한 이유를 모르겠습니다.
안녕하세요. 강의대로 실시간으로 따라 치면서 어플리케이션을 실행시켰는데 다음과 같은 오류가 발생했습니다. 그래서 코드를 아래와 같이 수정했는데 실행이 잘 되었습니다. 어떤 이유에서 안된 것인지.. 영한님께서는 왜 성공하셨는지 궁금합니다. @GeneratedValue(strategy = GenerationType.IDENTITY)
=========================저의 build.gradle 설정 =========================== plugins { id 'java' id 'org.springframework.boot' version '3.4.1' id 'io.spring.dependency-management' version '1.1.7' } group = 'study' version = '0.0.1-SNAPSHOT' java { toolchain { languageVersion = JavaLanguageVersion.of(23) } } configurations { compileOnly { extendsFrom annotationProcessor } } repositories { mavenCentral() } dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-web' compileOnly 'org.projectlombok:lombok' runtimeOnly 'com.h2database:h2' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' testRuntimeOnly 'org.junit.platform:junit-platform-launcher' //test 롬복 사용 testCompileOnly 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' //Querydsl 추가 implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta' annotationProcessor "com.querydsl:querydsl-apt:${dependencyManagement.importedProperties['querydsl.version']}:jakarta" annotationProcessor "jakarta.annotation:jakarta.annotation-api" annotationProcessor "jakarta.persistence:jakarta.persistence-api" } tasks.named('test') { useJUnitPlatform() } clean { delete file('src/main/generated') } =============================Hello Entity============================== package study.querydsl.entity; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; import lombok.Getter; import lombok.Setter; @Entity @Getter @Setter public class Hello { @Id @GeneratedValue private Long id; } Tasks -> build -> clean 정상적으로 작동합니다. Tasks -> build -> build 실행시 에러가 발생합니다. ==========================에러 코드=================================== 오후 11:58:17: Executing 'build --scan'... > Task :compileJava > Task :processResources > Task :classes > Task :resolveMainClassName > Task :bootJar > Task :jar > Task :assemble > Task :compileTestJava > Task :processTestResources NO-SOURCE > Task :testClasses > Task :test FAILED 7 actionable tasks: 7 executed FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':test'. > There were failing tests. See the report at: file:///C:/Users/USER/OneDrive/%EB%B0%94%ED%83%95%20%ED%99%94%EB%A9%B4/querydsl/querydsl/build/reports/tests/test/index.html BUILD FAILED in 16s Publishing a build scan to scans.gradle.com requires accepting the Gradle Terms of Use defined at https://gradle.com/help/legal-terms-of-use. Do you accept these terms? [yes, no] The build scan was not published due to a configuration problem. The Gradle Terms of Use have not been agreed to. For more information, please see https://gradle.com/help/gradle-plugin-terms-of-use. Alternatively, if you are using Develocity, specify the server location. For more information, please see https://gradle.com/help/gradle-plugin-config. 오전 12:01:06: Execution finished 'build --scan'. 해당 작업 파일 구글 드라이브 입니다. Onedrive 모드가 문제일수 있다해서 연결은 해제했습니다. https://drive.google.com/file/d/16tFQifUb64ZzBfhJkSc7RUHfLuFiJTjm/view?usp=drive_link 경로가 문제인가 싶어서 onedrive가 없는 C:\springtest 이렇게 파일 생성후 똑같이 해봤는데 clear 이상없고 build 실행하는데 에러코드는 안뜨지만 계속 Run 상태가 되어서 멈추니까 코드가 아래처럼 뜨네요..ㅠㅠ 오전 12:47:10: Executing 'build --scan'... > Task :compileJava > Task :processResources > Task :classes > Task :resolveMainClassName > Task :bootJar > Task :jar > Task :assemble > Task :compileTestJava > Task :processTestResources NO-SOURCE > Task :testClasses OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended 2025-01-14T00:47:41.902+09:00 INFO 16840 --- [querydsl] [ionShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' 2025-01-14T00:47:41.925+09:00 INFO 16840 --- [querydsl] [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... 2025-01-14T00:47:41.929+09:00 INFO 16840 --- [querydsl] [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. > Task :test > Task :check > Task :build BUILD SUCCESSFUL in 31s 7 actionable tasks: 7 executed Publishing a build scan to scans.gradle.com requires accepting the Gradle Terms of Use defined at https://gradle.com/help/legal-terms-of-use. Do you accept these terms? [yes, no] The build scan was not published due to a configuration problem. The Gradle Terms of Use have not been agreed to. For more information, please see https://gradle.com/help/gradle-plugin-terms-of-use. Alternatively, if you are using Develocity, specify the server location. For more information, please see https://gradle.com/help/gradle-plugin-config. 오전 12:47:48: Execution finished 'build --scan'. 제발 도와주세요 ㅠㅠ 너무 힘듭니다...
안녕하세요 실습 진행 중 wsl을 이용해서 가상공간에서 작업을 진행하시는 것 같은데 도커데스크탑을 깔고 그 안에서 이미지들을 다운받는 식으로 작업을 하는 것과 차이가 있을까요? 제가 알기로는 터미널에서 코드 쳐서 다운 받는 것과 도커데스크탑에서 이미지 찾아서 다운 받는 것과의 차이는 없는 걸로 알고 있어서요 혹시 wsl로 작업을 하지않고 컴퓨터 두 대로 진행하려면 어떻게 해야될까요? 같은 네트워크에 있는 상태 입니다.
confluent-6.1.0\bin\windows\kafka-run-class.bat 파일 안에 rem Classpath addition for release으로 검색하셔서 밑에 코드를 넣으시면 됩니다. rem Classpath addition for LSB style path if exist %BASE_DIR%\share\java\kafka\* ( call :concat %BASE_DIR%\share\java\kafka\* )
# Quiz) 사이트별로 비밀번호를 만들어주는 프로그램을 작성하시오 # 예) http://naver.com # 규칙1 : http:// 부분은 제외 => naver.com # 규칙2 : 처음 만나는 점(.) 이후 부분은 제외 => naver # 규칙3 : 남은 글자 중 처음 세자리 + 글자 갯수 + 글자 내 'e' 갯수 + "!"로 구성 # 예) 생성된 비밀번호 : nav51! domain = "http://naver.com" sitename = domain[7:(domain.find("."))] first3 = sitename[:3] length = len(sitename) count_e = sitename.count("e") print(f"생성된 비밀번호 : {first3}{length}{count_e}!")
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? ( 예 /아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? ( 예 /아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? ( 예 /아니오) [질문 내용] 여기에 질문 내용을 남겨주세요. 안녕하세요 강의 잘 보고 있습니다! 강의를 수강하다 몇가지 궁금한게 생겨 이렇게 질문 남깁니다. 1. BooleanExpression - where 다중 파라미터 사용 강의에서 강사님이 'where 다중 파라미터 사용'이라는 제목으로 이야기 하실 때 BooleanExpression 을 소개하시는데 아래와 같이 구현하면 BooleanBuilder 로도 where 다중 파라미터가 가능한 것 아닌가요?? private List<Member> searchMember1(String usernameCond, Integer ageCond) { return queryFactory .selectFrom(member) .where(usernameBuilder(usernameCond), ageBuilder(ageCond)) .fetch(); } private BooleanBuilder usernameBuilder(String usernameCond) { if (usernameCond != null) { return new BooleanBuilder(member.username.eq(usernameCond)); } else return new BooleanBuilder(); } private BooleanBuilder ageBuilder(Integer ageCond) { if (ageCond != null) { return new BooleanBuilder(member.age.eq(ageCond)); } else return new BooleanBuilder(); } 2. BooleanExpression 을 선호하시는 이유 다음과 같이 BooleanExpression 으로 allEq() 구현시 BooleanExpression은 추상클래스라 객체생성이 안되기 때문에 NPE가 발생할 수 있는데 private BooleanExpression usenameEq(String usernameCond) { return usernameCond != null ? member.username.eq(usernameCond) : null; } private BooleanExpression ageEq(Integer ageCond) { return ageCond != null ? member.age.eq(ageCond) : null; } private BooleanExpression allEq(String usernameCond, Integer ageCond) { return usenameEq(usernameCond).and(ageEq(ageCond)); // NPE 조심 } 반면 BooleanBuilder 은 실제 클래스라 객체 생성이 되기 때문에 NPE도 방지가 가능합니다. private BooleanBuilder usernameBuilder(String usernameCond) { if (usernameCond != null) { return new BooleanBuilder(member.username.eq(usernameCond)); } else return new BooleanBuilder(); } private BooleanBuilder ageBuilder(Integer ageCond) { if (ageCond != null) { return new BooleanBuilder(member.age.eq(ageCond)); } else return new BooleanBuilder(); } private BooleanBuilder allBuilder(String usernameCond, Integer ageCond) { return usernameBuilder(usernameCond).and(ageBuilder(ageCond)); } 이렇게만 보면 사실 BooleanExpression을 쓸 이유가 없어보이는데 BooleanExpression을 선호하시는 이유가 있으신가요??
안녕하세요 스타트코딩님! 수업 잘 듣고 있는 학생입니다. 질문이 있어 글 남깁니다. 수업 듣기 전에 혼자 해볼 때 저는 soup를 사용하지 않고 find_element를 사용해서 이렇게 코드를 작성했는데 뭐가 다른 걸까요? from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys import time import pandas as pd driver = webdriver.Chrome() driver.get('https://search.shopping.naver.com/search/all?query=%EB%8B%AD%EA%B0%80%EC%8A%B4%EC%82%B4') # 스크롤 전 높이 last_height = driver.execute_script('return document.body.scrollHeight') while True: # 스크롤 끝까지 내리기 driver.execute_script('window.scrollTo(0, document.body.scrollHeight)') # 대기 시간 줘야됨 !!! time.sleep(1) # 스크롤 후 높이 after_height = driver.execute_script('return document.body.scrollHeight') # 비교 (if, break) if last_height == after_height: break # 스크롤 전 높이 업데이트 last_height = after_height products = driver.find_elements(By.CSS_SELECTOR, '.product_item__MDtDF') data = [] for product in products: name = product.find_element(By.CSS_SELECTOR, '.product_title__Mmw2K').text link = product.find_element(By.CSS_SELECTOR, '.product_title__Mmw2K > a').get_attribute('href') price = product.find_element(By.CSS_SELECTOR, '.price_num__S2p_v').text.split('원')[0].replace(',', '') data.append([name, link, int(price)]) df = pd.DataFrame(data, columns = ['상품명', '상세페이지링크', '가격']) df.to_excel('네이버쇼핑.xlsx')
안녕하세요. 강의를 듣고 pyside로 데스크톱 어플리케이션을 만들고 있는 중에 있습니다. QGridLayout 안에 위젯들을 2열로 배치하였는데요, 이 위젯들이 위젯 아이템들 중 가장 너비가 넓은 것에 맞춰 같은 너비를 차지하면서도 위젯들이 윈도우 전체를 차지하지 않는(=커지거나 작아지지 않는) 방법이 있나요..? 생각보다 어려워서 며칠 째 끙끙대다 결국 질문남겨봅니다.
자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
1..2일차 영상 보면서... 환경을 만드는데.... 서버 구동이 안됩니다. 초초초보입니다....... A problem occurred configuring root project 'library-app'. > Could not resolve all files for configuration ':classpath'. > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.0.1. Required by: project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.0.1 > No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.1 was found. The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.5' but: - Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 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 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.5') - Variant 'javadocElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 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 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 '7.5') - Variant 'mavenOptionalApiElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.1 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 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.5') - Variant 'mavenOptionalRuntimeElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.1 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 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.5') - Variant 'runtimeElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 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 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.5') - Variant 'sourcesElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 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 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 '7.5')
public class OrderService$$EnhancerBySpringCGLIB extends OrderService { private final OrderService target; // 실제 대상 객체 (원본 OrderService) private final TransactionManager transactionManager; // 트랜잭션 매니저 //의존 관계를 주입 받았다 가정 @Override public void order(Order order) throws Exception { TransactionStatus transactionStatus = null; try { // 트랜잭션 시작 transactionStatus = transactionManager.beginTransaction(); // 실제 비즈니스 로직 호출 (OrderService의 order 메서드) target.order(order); // 정상적으로 완료된 경우 트랜잭션 커밋 transactionManager.commit(transactionStatus); } catch (RuntimeException e) { // 언체크 예외(RuntimeException): 자동 롤백 transactionManager.rollback(transactionStatus); throw e; // 예외 다시 던지기 } catch (Exception e) { // 체크 예외: 기본적으로 커밋 transactionManager.commit(transactionStatus); // 트랜잭션 커밋 throw e; // 예외를 호출자에게 다시 전달 } } } 강의에서 생성되는 프록시 객체의 형태는 정확하진 않지만 대략적으로 위와 같다고 생각해도 될까요?