inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

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

라이브러리 인식 오류

해결됨

스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술

이클립스 환경인데요, build과정에서 오류가나서 프로젝트를 지우고 다시 불러왔는데 아예 gradle 라이브러리 인식을 못합니다.. ㅠㅠ 구글링을 엄청했는데도 못고쳐서 진도를 못나가고 있어요 The import org.springframework cannot be resolved 오류이름은 이거에요

  • MVC
  • java
  • spring-boot
  • spring
hyun 댓글 3 좋아요 0 조회수 591

강의 slide 공유

미해결

[개정판] 파이썬 머신러닝 완벽 가이드

강의 slide를 보며 공부하려는데 공유받을 수 있는지 질문드립니다

  • 통계
  • 머신러닝 배워볼래요?
  • python
kh9342 댓글 1 좋아요 0 조회수 469

퀴즈 8 'house' object has no attribute 'show_detail'

해결됨

파이썬 무료 강의 (기본편) - 6시간 뒤면 나도 개발자

선생님이 입력하신 코드대로 똑같이 했는데 'house' object has no attribute 'show_detail'이라는 에러가 뜨네요. 혹시 왜 그런지 알려주실 수 있으신가요???

  • python
gjwns1404 댓글 1 좋아요 0 조회수 261

@Transactional 애노테이션 질문

미해결

실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발

@Transactional 애노테이션만 붙이면 jpa기본편에서 배웠던 대로 해당 메소드를 아래와 같이 감싸서 실행하게 되는건가요? tx.begin() try { --- 메소드 실행 --- tx.commit() } catch (Exception e) { tx.rollback() } finally { em.close() } emf.close()

  • JPA
  • 웹앱
  • java
  • spring
  • spring-boot
E mergency 댓글 2 좋아요 3 조회수 259

(해결완료) 코드 변경사항 있습니다. 참고들 하세요!

미해결

스프링 시큐리티

package io.security.basicsecurity.security.provider; import io.security.basicsecurity.security.common.FormWebAuthenticationDetails; import io.security.basicsecurity.security.service.AccountContext; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.authentication.AuthenticationProvider; import org.springframework.security.authentication.BadCredentialsException; import org.springframework.security.authentication.InsufficientAuthenticationException; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.Authentication; import org.springframework.security.core.AuthenticationException; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.transaction.annotation.Transactional; @Slf4j public class FormAuthenticationProvider implements AuthenticationProvider { @Autowired private UserDetailsService userDetailsService; @Autowired private PasswordEncoder passwordEncoder; public FormAuthenticationProvider(PasswordEncoder passwordEncoder) { this.passwordEncoder = passwordEncoder; } @Override @Transactional public Authentication authenticate(Authentication authentication) throws AuthenticationException { String username = authentication.getName(); String password = (String) authentication.getCredentials(); AccountContext accountContext = (AccountContext) userDetailsService.loadUserByUsername(username); if(!passwordEncoder.matches(password, accountContext.getAccount().getPassword())) { throw new BadCredentialsException("Invalid Password"); // throw new BadCredentialsException("BadCredentialsException"); } String secretKey = ( (FormWebAuthenticationDetails) authentication.getDetails() ).getSecretKey(); // FormWebAuthenticationDetails formWebAuthenticationDetails = (FormWebAuthenticationDetails) authentication.getDetails(); // String secretKey = formWebAuthenticationDetails.getSecretKey(); if(secretKey == null || ! secretKey.equals("secret")) { // if(secretKey == null || !"secret".equals(secretKey)) { throw new IllegalArgumentException("invalid Secret"); // throw new InsufficientAuthenticationException("InsufficientAuthenticationException"); } return new UsernamePasswordAuthenticationToken(accountContext.getAccount(), null, accountContext.getAuthorities()); // UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(accountContext.getAccount(), null, accountContext.getAuthorities()); // return authenticationToken; } @Override public boolean supports(Class<?> authentication) { return authentication.equals(UsernamePasswordAuthenticationToken.class); // return UsernamePasswordAuthenticationToken.class.isAssignableFrom(authentication); } }

  • spring-boot
  • Spring Security
  • java
강프로그래머 댓글 1 좋아요 5 조회수 721

KerasYolo3_학습및_Detection 그레이 이미지 출력 에러( 커스텀 데이터)

해결됨

[개정판] 딥러닝 컴퓨터 비전 완벽 가이드

안녕하세요 강사님 오랜만에 인사드립니다. 강사님이 저번에 가르쳐 주셔서 labellmg 을 이용해서 직접 Dataset을 만들어 공부를 하고 있습니다. 그런데 문제가 발생했습니다. 그레이스케일을 그대로 출력하는 문제입니다. 강사님 강의중 "Raccoon 데이터 세트를 YOLO V3로 학습" Code를 이용하여 학습 모델까지 만들었는데 아래 마지막 이미지와 같이 "TypeError: function takes exactly 1 argument (3 given)" 에러가 발생했습니다. 그레이스케일을 RGB로 다시 변경해주는 코드를 생성해줘야하는것은 강의를 들어서 이해했는데 어느부분 Code를 어떻게 수정해야할 지.. 막막해서 질문드립니다. 그레이이미지 그대로 디텍션 하려면 어느부분의 Code가 수정되야할 지 궁금합니다.

  • 딥러닝
  • keras
  • 컴퓨터-비전
  • python
  • tensorflow
  • 머신러닝 배워볼래요?
sungho kang 댓글 8 좋아요 0 조회수 1161

안녕하십니까? 도메인 설계시 인터페이스, 추상클래스 에 대한 의견을 듣고 싶습니다.

해결됨

실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발

안녕하십니까? 강의 영상 모두 결제해서 잘 보고 있습니다. 바로 본론부터 말씀 드리면, 회사에서 여러개의 프로젝트를 준비하고 있고 그중 자주 쓰이는 공통적인 기능을 ( 회원, 게시판 등 ) 만들어 놓고 프로젝트마다 재활용하여 시간을 단축하자는 의견이 나왔습니다. 그래서 JPA 에서 사용하는 entity 도 인터페이스와 추상클래스를 사용해서 설계를 해보라고 해서 진행중에 있습니다. 들어가기 앞서, 스프링 프로젝트의 코드를 살펴보면 인터페이스를 잘 사용해서 설계를 잘 했다고 생각하고 있습니다.그러나 데이터베이스와 직접적인 연관이 없는 코드라서 자유롭게 쓸수 있었던것 같은데요. JPA 를 쓰고 있는 입장에서 인터페이스와 추상클래스를 사용해서 다형성을 구현할려고 할때마다 한계에 자꾸 봉착하는 느낌이 듭니다. 결국 도메인 클래스는 CRUD 가 중요한데, 인터페이스로는 실제 구현된 클래스가 뭔지 알수 없어 사용하기가 난감합니다. Item 과 Book 과 같이 강하게 결합 하는것에 대해서는 어느정도 수긍이 갑니다만, 거의 대부분은 그렇게 강하게 연결되는 경우가 잘 없는거 같아서요. 인터페이스를 쓰는경우도 잘 못본거 같습니다. 실무에서는 인터페이스와 추상클래스를 어느 정도 까지 사용하는지궁금합니다.

  • java
  • JPA
  • 웹앱
  • spring-boot
  • spring
구본수 댓글 3 좋아요 15 조회수 1903

(해결완료) FormAuthenticationProvider 클래스가 이전에 작성했던 CustomAuthenticationProvider 클래스였네요;

해결됨

스프링 시큐리티

1. 클래스명 CustomAuthenticationProvider -> FormAuthenticationProvider 변경되었습니다. 2. class 위에 @Slf4j 애노테이션이 추가되었습니다. 3. public FormAuthenticationProvider 생성자가 추가되었습니다. 4. authenticate 메서드 위에 @Transactional이 추가되었습니다. 다른분들은 저처럼 혼란스러워서 저번 강의 다시 보시지 않기를.. ---------------------------------------------------------- 5. SecurityConfig 클래스에 authenticationProvider 메서드에 passwordEncoder() 매개변수가 추가되었습니다.

  • Spring Security
  • spring-boot
  • java
강프로그래머 댓글 1 좋아요 11 조회수 405

JdbcMemberRepository에서 import 문제

미해결

스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술

선생님 안녕하세요. 우선 정말 이 수업을 개설해 주셔서 정말정말 감사하다는 말씀 드립니다. 프로젝트 수업으로 스프링 프레임워크에서 스트레스를 엄청 받다가 선생님의 강의를 듣고 한줄기 희망이 생겼습니다!!! 지금 DB 파트 강의에서 순수 JDBC 듣는 중인데, 원래는 오라클 SQL을 사용하려다 import 하는 부분에서 막히길래, 역시 강의와 다른 걸 쓰려니 힘들구나 싶어서ㅜㅜ 우선은 그냥 수업에서 사용하시는 H2로 다시 시도하고 원리를 좀 깨친 다음에 오라클로 재시도 하려 했습니다만.... 결국은 똑같은 곳에서 문제가 생기길래 이렇게 질문을 드립니다. H2에서 DB 생성하고, build.gradle에서 의존성 주입했고, application.properties에 url, driver-class-name까지 설정은 완료한 상태입니다. 그러고나서 JdbcMemberRepository 코드를 작성했는데, 이상하게 이 부분만 import에서 오류가 생깁니다. import org.springframework.jdbc .datasource.DataSourceUtils; (밑줄 친 부분에 오류가 있다고 빨간 줄이 생김) 에러메시지는 "The import org.springframework.jdbc cannot be resolved" 라고 뜨고, 클래스를 새로 생성하라는 식으로만 나오고 있습니다 ㅜㅜ 강제로 실행시키면 다음 메시지가 나옵니다. " Description: Parameter 0 of constructor in hello.hellospring.SpringConfig required a bean of type 'javax.sql.DataSource' that could not be found. The following candidates were found but could not be injected: - Bean method 'dataSource' in 'JndiDataSourceAutoConfiguration' not loaded because @ConditionalOnClass did not find required class 'org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType' - Bean method 'dataSource' in 'XADataSourceAutoConfiguration' not loaded because @ConditionalOnClass did not find required class 'javax.transaction.TransactionManager' Action: Consider revisiting the entries above or defining a bean of type 'javax.sql.DataSource' in your configuration. " 사용 환경은 윈도10 / Eclipse EE / Spring boot 2.3.3. 입니다. 수업을 착실히 들었다고 생각했는데 혹시 설정 같은 걸 빼먹은 게 아닌지 싶은데, 구글링해도 답을 얻을 수 없어 여쭤봅니다. 감사합니다 !!

  • spring-boot
  • spring
  • MVC
  • java
Yeahwon Do 댓글 4 좋아요 1 조회수 3067

update에대한 질문입니다!

미해결

실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발

지금은 Book 상품등록, 상품수정의 기능만 한다고 하셨는데 영화와 음반까지 추가하려면 단순히 controller와 service에 메서드들을 추가해서 로직을 짜면 되는건가요? 아니면 메서드를 추가안하고 다른 방법이 있을까요?

  • spring-boot
  • java
  • 웹앱
  • JPA
  • spring
밥밥 댓글 2 좋아요 1 조회수 270

sequence 변수에 대하여 너무 궁금한 점이있습니다.

미해결

스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술

안녕하세요. 김영한 강사님. 이번 강의를 듣던 도중 실무 이야기를 몇번 하셨는데요. sequence 변수에 대해 궁금하 점이 생겼습니다. Member를 save할때마다 id 값을 1씩 증가시켜주는데요. 이건 DB기반이 아니라 메모리 기반이기 때문에 id값을 이렇게 임의로 정해주는 것인가요? 실무에서 DB는 id 값을 auto increment를 주지 않고 이런 식으로 sequence를 올려가며 회원 저장마다 id값을 지정해주는 건가요? 제가 이해한것이 맞다면 서버가 재가동 될때마다 모든 회원 DB를 다 읽어와야 하는 시스템인것 같은데 제가 이해한바가 맞는지요.. 너무 궁금해서 그냥 넘어갈수가 없었습니다. 감사합니다.

  • java
  • MVC
  • spring
  • spring-boot
sda362002 댓글 2 좋아요 0 조회수 310

조회 v3.1에서 to One 관계는 모두 페치 조인하고 나머지 컬렉션은 지연로딩을 유지했을때 다음과 같은 에러가 발생합니다.

미해결

실전! 스프링 부트와 JPA 활용2 - API 개발과 성능 최적화

좋은 강의 감사합니다. 조회 v3.1에서 to One 관계는 모두 페치 조인하고 나머지 컬렉션은 지연로딩을 유지했을때 다음과 같은 에러가 발생합니다. query specified join fetching, but the owner of the fetched association was not present in the select list 고심하던 중 @Query부분을 value 와 countQuery로 나눠어서 처리 한 결과 정상적으로 조회 됬습니다.(Spring Data Jpa사용) 예) @Query(value = "select u from User u join fetch u.store s", countQuery = "select count(u) from User u") Page<User> findAllUser(Pageable pageable); 꼭 countQuery를 사용해야 하는지 궁금합니다.

  • spring-boot
  • JPA
  • java
  • spring
개발자 댓글 2 좋아요 2 조회수 551

옛날 사람 아닙니다!! ㅠㅠ

미해결

스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술

공공기관 취직해서 1년 근무했는데 옛날사람들이 쓰는 기술이라고 하는 기술들만 쓰고 있습니다. ㅠㅠ 잘 공부해서 최신사람으로 거듭나겠습니다! 응원해주세요... 따로 메시지 보내고 싶었는데 찾을수가 없어서 여기 남깁니다.

  • MVC
  • spring
  • spring-boot
  • java
jimbae 댓글 2 좋아요 12 조회수 4774

bash: pip: command not found 는 어떻게 해결 할 수 있나요?

미해결

파이썬 무료 강의 (기본편) - 6시간 뒤면 나도 개발자

맥북에서 공부하고 있습니다. pip install beautifulsoup4를 python 터미널에서 입력했을 때 bash: pip: command not found라고 뜨며 설치가 되지 않습니다. pip 부분이 화면처럼 노란색으로 변하지 않는데 뭔가 먼저 설치해야하는 것이 있나요?

  • python
moony 댓글 2 좋아요 1 조회수 18806

thymeleaf 의 경로를 못찾는다고 나오네요

미해결

실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발

indx.html을 /src/main/resourcee/static/index.html을 넣어도 못찾네요 hello예제에서는 "template might not exist or might not be accessible by any of the configured Template Resolvers" 로 나오네요 경로가 차이가 있는건지 모르겠습니다. 아래는 grandle 설정입니다 어떤 문제가 있는건지 모르겠습니다. plugins { id 'org.springframework.boot' version '2.1.16.RELEASE' id 'io.spring.dependency-management' version '1.0.9.RELEASE' id 'java' } group = 'jpabook' version = '0.0.1-SNAPSHOT' sourceCompatibility = '1.8' configurations { compileOnly { extendsFrom annotationProcessor } } repositories { mavenCentral() } dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' 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' }

  • spring-boot
  • 웹앱
  • JPA
  • java
  • spring
hbs0606 댓글 6 좋아요 3 조회수 40433

cmd 연산 명령어 관련 질문

미해결

프로그래밍 시작하기 : 파이썬 입문 (Inflearn Original)

강의에서 선보인 것처럼 3+3을 입력했는데 6이 안뜨네요. 다음과 같이 나오는데 어떻게 해야 하나요? 강의와 관련있는 질문 을 남겨주세요. &bull; 강의와 관련이 없는 질문은 지식공유자가 답변하지 않을 수 있습니다. (사적 상담, 컨설팅, 과제 풀이 등) &bull; 질문을 남기기 전, 비슷한 내용을 질문한 수강생이 있는지 먼저 검색 을 해주세요. (중복 질문을 자제해주세요.) &bull; 서비스 운영 관련 질문은 인프런 우측 하단 &lsquo;문의하기&rsquo; 를 이용해주세요. (영상 재생 문제, 사이트 버그, 강의 환불 등) 질문 전달 에도 요령이 필요합니다. &bull; 지식공유자가 질문을 좀 더 쉽게 확인할 수 있게 도와주세요. &bull; 강의실 페이지 (/lecture) 에서 '질문하기'를 이용해주시면 질문과 연관된 수업 영상 제목이 함께 등록됩니다. &bull; 강의 대시보드에서 질문을 남길 경우, 관련 섹션 및 수업 제목을 기재 해주세요. &bull; 수업 특정 구간에 대한 질문은 꼭 영상 타임코드 를 남겨주세요! 구체적인 질문 일수록 명확한 답을 받을 수 있어요. &bull; 질문 제목은 핵심 키워드를 포함해 간결하게 적어주세요. &bull; 질문 내용은 자세하게 적어주시되, 지식공유자가 답변할 수 있도록 구체적으로 남겨주세요 . &bull; 정확한 질문 내용과 함께 코드 를 적어주시거나, 캡쳐 이미지 를 첨부하면 더욱 좋습니다. 기본적인 예의 를 지켜주세요. &bull; 정중한 의견 및 문의 제시, 감사 인사 등의 커뮤니케이션은 더 나은 강의를 위한 기틀이 됩니다. &bull; 질문이 있을 때에는 강의를 만든 지식공유자에 대한 기본적인 예의를 꼭 지켜주세요. &bull; 반말, 욕설, 과격한 표현 등 지식공유자를 불쾌하게 할 수 있는 내용 은 스팸 처리 등 제재를 가할 수 있습니다.

  • python
gloriayoum 댓글 0 좋아요 0 조회수 323

winsound명령어를 예제에 따라서 정확하게 넣었는데

미해결

프로그래밍 시작하기 : 파이썬 입문 (Inflearn Original)

cmd에서 실행하게되면 오류는 안뜨는데 소리가 안나네요 import time # csv 처리 import csv # 랜덤 import random # 사운드 처리 import winsound # 처음 인사 name = input("What is you name?") print("Hi, " + name, "Time to play hangman game!") print() time.sleep(1) print("start Loading...") print() time.sleep(0.5) # CSV 단어 리스트 words = [] # 문제 CSV 파일 로드 with open('./resource/word_list.csv', 'r') as f: reader = csv.reader(f) # Header Skip next(reader) for c in reader: words.append(c) # 리스트 섞기 random.shuffle(words) q = random.choice(words) # 정답 단어 word = q[0].strip() # 추측 단어 guesses = '' # 기회 turns = 10 # 핵심 While Loop # 찬스 카운트가 남아 있을 경우 while turns > 0: # 실패 횟수 failed = 0 print(guesses) # 정답 단어 반복 for char in word: # 정답 단어 내에 추측 문자가 포함되어 있는 경우 if char in guesses: #추측 단어 출력 print(char, end=' ') else: # 틀린 경우 대시로 처리 print("_", end=' ') failed += 1 #단어 추측이 성공 한 경우 if failed == 0: print() print() # 성공 사운드 winsound.PlaySound('./sound/good.wav', winsound.SND_FILENAME()) print('Congratulations! the Guesses is correct.') # while 구문 중단 break print() # 추측 단어 글자 단위 입력 print() print('Hint : {}'.format(q[1].strip())) guess = input("guess acharater : ") # 단어 더하기 guesses += guess # 정답 단어에 추측한 문자가 포함 되어 있지 않으면 if guess not in word: turns -= 1 # 오류 메세지 print("Oops! Wrong") # 남은 기회 출력 print("You have", turns, 'more guresses!') if turns == 0: # 실패 사운드 winsound.PlaySound('./sound/bad.wav', winsound.SND_FILENAME()) # 실패 메세지 print("You hangman game failed. Bye!") 이렇게 했으니 Cmd에서 소리는 안나는데 이유를 알고싶어요

  • python
쫑지쫑지 댓글 1 좋아요 0 조회수 606

post vs put

미해결

실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발

안녕하세요. 보통 리소스를 수정하는데 put 메서드를 사용한다고 알고 있는데, post를 사용한 이유 같은게 있나요?

  • spring
  • 웹앱
  • spring-boot
  • java
  • JPA
백엔드개발자 댓글 1 좋아요 1 조회수 376

인기 태그

인프런 TOP Writers

주간 인기글