inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

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

'블랙핑크' 검색 시에만 오류가 뜨는 현상

미해결

[신규 개정판] 이것이 진짜 크롤링이다 - 실전편 (인공지능 수익화)

안녕하세요. 강사님 아래 코드에서 '블랙핑크' 를 검색할 때 Traceback (most recent call last): File "c:\pratice_crolling\심화1_\03_스포츠 뉴스 크롤링.py ", line 52, in <module> print(article_title.text.strip()) ^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'text' 다음과 같은 오류가 뜹니다 ㅠㅠ CSS 선택자, 오타도 모두 맞게 확인이 되는데 왜 저 검색어만 오류가 뜰까요ㅠㅠ? # -*- coding: euc-kr -*- # 네이버에서 손흥민, 오승환과 같은 스포츠 관련 검색어 크롤링하기 import requests from bs4 import BeautifulSoup import pyautogui import time search = pyautogui.prompt("어떤 것을 검색하시겠어요?") response = requests.get(f"https://search.naver.com/search.naver?sm=tab_hty.top&where=news&query={search}&oquery=%EC%98%B7%EC%9C%BC%ED%99%98&tqi=i74G%2FdprvTossZPeMhCssssssko-058644") html = response.text soup = BeautifulSoup(html, "html.parser") articles = soup.select(".info_group") for article in articles: # '네이버뉴스' 가 있는 기사만 추출한다. (<a> 하이퍼링크가 2개 이상인 경우에 해당) links = article.select("a.info") if len(links) >=2 : url = links[1].attrs['href'] response = requests.get(url, headers={'User-agent':'Mozila/5.0'}) html = response.text soup = BeautifulSoup(html, "html.parser") # 스포츠 기사인 경우 if "sports" in url: article_title = soup.select_one("h4.title") article_body = soup.select_one("#newsEndContents") # 본문 내에 불필요한 내용 제거 p태그와 div태그의 내용은 출력할 필요가 없다. 없애주자. p_tags = article_body.select("p") # 본문에서 p 태그인 것들을 추출 for p_tag in p_tags: p_tag.decompose() div_tags = article_body.select("div") # 본문에서 div 태그인 것들을 추출 for div_tag in div_tags: div_tag.decompose() # 연예 기사인 경우 elif "entertain" in url: article_title = soup.select_one(".end_tit") article_body = soup.select_one("#articeBody") # 일반 뉴스 기사인 경우 else: article_title = soup.select_one("#title_area") article_body = soup.select_one("#dic_area") # 출력문 print("==================================================== 주소 ===========================================================") print(url.strip()) print("==================================================== 제목 ===========================================================") print(article_title.text.strip()) print("==================================================== 본문 ===========================================================") print(article_body.text.strip()) #strip 함수는 앞 뒤의 공백을 제거한다. time.sleep(0.3)

  • python
  • 웹-크롤링
댓글 2 좋아요 0 조회수 325

HttpServletRequest.session에 관련된 질문입니다.

미해결

토비의 스프링 부트 - 이해와 원리

서버에서 session이 어떤식으로 관리되는지 궁금합니다. 궁금하게 된 이유는 저희가 흔히 인증방식을 jwt token을 쓸 경우 session less때문에 서버에 부하를 줄인다고 알려져 있는데 spring boot를 포함한 다른 서버들도 각 요청마다 HttpServletRequest.session이 담겨져서 오고있고 실제로 컨트롤단에서 사용할 수 있는데 단지 session객체를 참조하지않고 사용한다는 것 만으로 세션을 안쓰기 때문에 서버에 부하를 안준다고 말할 수 있는 걸까요? 제가 생각하는 서버에 부하를 안준다는건, session객체 자체가 생성되지 않아야 부하가 안생긴다는 말이 자연스러울거 같은데, 단지 session객체를 참조해서 쓰지 않는다는 이유만으로 서버의 부하가 없다고 볼 수 있는지 (체감이 될 정도) 궁금합니다. 아마 제가 session에 대한 이해도가 부족해서 드는 궁금함 같습니다. 좋은 강의 만들어주셔서 감사합니다.

  • spring
  • spring-boot
  • spring-jdbc
postman 댓글 1 좋아요 0 조회수 469

'DataSource 자동 구성 클래스' 강의 중 DataSourceConfig 클래스 설정

미해결

토비의 스프링 부트 - 이해와 원리

안녕하세요. 정말 재밌고 알찬 강의 잘 보고 있습니다. 영상에 추가가 안 된 부분인거 같아 질문 올립니다. DataSource 자동 구성 클래스 강의 중에 'DataSourceConfig' 클래스를 정의하고, com.southouse.config.MyAutoConfiguration.imports에 패키지 이름을 추가해줘야 하는데 이 부분이 영상에서 빠진거 같아서요.

  • spring
  • spring-boot
  • spring-jdbc
southouse 댓글 2 좋아요 0 조회수 627

테스트시에 나오는 문제

미해결

토비의 스프링 부트 - 이해와 원리

안녕하세요. 토비님 스프링부트로 api테스트시에 가끔식 400 Bad Request 가 나오는데요. 호출하는 header와 body는 모두 동일한데, 2~30번 호출 중에 한번씩 튀어나오는 경우는 어떤 설정에 문제일까요? api 내용은 별게 없고 로그를 다 찍기도 전에 앞에서 400에러가 나는 상황입니다. 혹시 관련해서 경험하신 바가 있으신지 궁금합니다.

  • spring
  • spring-boot
  • spring-jdbc
Queza 댓글 1 좋아요 0 조회수 499

갑자기 에러가 나는데 부탁드려보겠습니다.

미해결

토비의 스프링 부트 - 이해와 원리

Caused by: java.lang.IllegalArgumentException: standardService.connector.startFailed 어제까지도 잘 돌아가던게 갑자기 이 에러가 나는데 왜 그러는건가요 ?

  • spring
  • spring-boot
  • spring-jdbc
내일은 한걸음 더 나아갈거야 댓글 3 좋아요 0 조회수 499

PDF파일이 어디에 있나요?

해결됨

Python 알고리즘 베스트 10

안녕하세요 PDF파일은 출력하려고 하는데, 노션을 보면 "PDF 노션 페이지에서 다운로드하실 수 있습니다." 로만 되어있는데 다운받을 수 있는 링크는 어디에 있나요? 노션에서 전체PDF출력하려면 비지니스라서 불가능한데... 확인부탁드립니다.

  • python
  • 코딩-테스트
한형섭 댓글 2 좋아요 0 조회수 485

admin 에 나타나지 않는 몇몇 필드들

미해결

파이썬/장고 웹서비스 개발 완벽 가이드 with 리액트

안녕하세요, 강의를 잘 듣고 있습니다. 모델 필드에 있는 몇몇 필드들이 admin에 나타나지 않더군요 예를 들면, updated_at, created_at 같은 필드들이요 이를 위해서 admin 페이지에 일일히 모델 필드를 list_display에 등록해줘야 하는게 맞나요? from django.contrib import admin # Register your models here. from .models import * admin.site .empty_value_display = "-empty-" admin.site .register(Product) admin.site .register(CartProduct) class OrderAdmin(admin.ModelAdmin): list_display = ['customer', 'transaction_id', 'total_price'] admin.site .register(Category) admin.site .register(UserProfile) admin.site .register(Order) admin.site .register(OrderedProduct) admin.site .register(ShipmentInfo) 그럼 제가 직접만든 모델의 경우에는 그렇다 쳐도.. allauth에 있는 site domain 부분이 나오질 않는거에요 ㅠㅠ... 제가 뭘 잘못 건드렸는 지 모르겠는데, 맨처음 프로젝트할 때에는 allauth의 소셜 어플리케이션 부분에 사이트 도메인을 입력할 수 있는 커다란 박스가 있었는데, 그것만 또 안난옵니다. 제가 뭘 잘못한건지 ㅠㅠ 원래 잘 나오던건데... 이번에 파이참 커뮤니티 에디션에서 유료버전으로 바꾸고, 프로젝트를 만들고 나니 admin에 몇몇 모델의 필드들이 잘 보이지 않습니다. verbose name을 설정된것들이 특히 그런 거 같은데 무엇이 문제인지 도통 모르겠습니다. 그렇다고 allauth를 제가 admin에 등록해야하는걸까요? 2.제가 모르는 무언가가 있는걸까요?

  • react
  • python
  • django
  • docker
paichai17 댓글 1 좋아요 0 조회수 307

ansible-server에 pywinrm 설치 시, 에러 발생하여 문의드립니다.

미해결

구성 관리 자동화 도구 - 앤서블(Ansible)

안녕하세요. 아래 섹션 실습 중, 에러가 발생하여 문의드립니다. 섹션 9 : [응용] 윈도우 관리학 - (1)베이그런트를 이용해서 윈도우를 추가하기 Ansible_env_ready.yaml 에 아래와 같이 추가 후, vagrant provision ansible-server을 수행했는데 pvwinrm 설치 과정에서 에러가 발생하였습니다. - name: Install python-pip yum: name: python-pip state: present - name: Install pywinrm pip: name: pywinrm state: present ansible-server에 접속하여 수동으로 pip install pywinrm을 수행했는데 역시 에러가 발생합니다. python 버전을 업그레이드 하라고 메시지가 나오는데 향후 수업 따라하기 시, 영향이 있을 듯 하여 선뜻 테스트하지 못 하고 있습니다. 해결 방법에 대해서 가이드 부탁드리겠습니다. 감사합니다 !

  • ansible
  • pywinrm
  • python
doore.park 댓글 1 좋아요 0 조회수 638

intellij CE 버전 run configurations 질문있습니다

해결됨

토비의 스프링 부트 - 이해와 원리

토비님 안녕하세요. intellij CE 버전에서 spring initializr 로 생성한 프로젝트 실행 시 궁금한게 있습니다. ultimate 버전은 영상에서처럼 run 할 때 우상단에 spring 아이콘이 있고 springboot 플러그인이 적용되어있는데, CE 버전은 그렇지 않고 따로 Run Configurations 가 설정되어있지 않아 아주 동일한 방법으로 실행할 수는 없었습니다. (영상의 "HellobootApplication" 대신 "Current File"로 표시되어있고 실행버튼이 비활성화 되어있습니다.) 일단 main 메소드가 있는 Application.java 파일에서 코드 왼쪽의 실행버튼으로 실행했는데 이렇게 해도 상관 없는건가요? Ultimate 버전과 달리 CE 버전에서 놓치고 가는게 있는지 궁금해서 여쭙니다. 좋은 강의 해주셔서 감사합니다 ~

  • spring
  • spring-boot
  • spring-jdbc
카코 댓글 1 좋아요 1 조회수 2920

[DataSource 자동 구성 클래스 테스트] properties와 yml의 차이점 관련 질문입니다.

해결됨

토비의 스프링 부트 - 이해와 원리

안녕하세요, 강사님. 섹션 9-2, DataSource 자동 구성 클래스에서, connect() 을 테스트하는 코드에서 yml 파일을 이용했을 때, 테스트 실패를 하여 질문글 드립니다. 먼저 강의와 동일하게 properties 파일을 이용한다면 정상적으로 테스트가 통과됩니다. application.properties DataSourceTest 평소에 yml 파일을 더 선호하여, yml 파일로 변경한 후, 테스트 코드 상에서 @TestPropertySource("classpath:/application.yml") 로 classpath 를 properties 에서 yml 로 바꿨을 뿐, 기존과 동일한 환경에서 테스트를 진행해봤습니다. application.yml DataSourceTest 하지만, 아래와 같은 에러 로그가 발생하며 테스트에 실패하게 됩니다. 에러 로그 java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:98) at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:124) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:118) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83) at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:248) at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:138) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$8(ClassBasedTestDescriptor.java:363) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable(ClassBasedTestDescriptor.java:368) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$9(ClassBasedTestDescriptor.java:363) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312) at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735) at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734) at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors(ClassBasedTestDescriptor.java:362) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$6(ClassBasedTestDescriptor.java:283) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:282) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4(ClassBasedTestDescriptor.java:272) at java.base/java.util.Optional.orElseGet(Optional.java:369) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5(ClassBasedTestDescriptor.java:271) at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:102) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:101) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:66) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90) at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86) at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86) at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53) at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:57) at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38) at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11) at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35) at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tobyspring.config.autoconfig.ServerProperties': Initialization of bean failed; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'server' to tobyspring.config.autoconfig.ServerProperties at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:628) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:920) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:127) at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60) at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:276) at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:244) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:141) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:90) ... 71 more Caused by: org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'server' to tobyspring.config.autoconfig.ServerProperties at org.springframework.boot.context.properties.bind.Binder.handleBindError(Binder.java:387) at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:347) at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:332) at org.springframework.boot.context.properties.bind.Binder.bindOrCreate(Binder.java:324) at org.springframework.boot.context.properties.bind.Binder.bindOrCreate(Binder.java:293) at org.springframework.boot.context.properties.bind.Binder.bindOrCreate(Binder.java:278) at tobyspring.config.autoconfig.PropertyPostProcessorConfig$1.postProcessAfterInitialization(PropertyPostProcessorConfig.java:30) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:455) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1808) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ... 85 more Caused by: org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [tobyspring.config.autoconfig.ServerProperties] at org.springframework.boot.context.properties.bind.BindConverter.convert(BindConverter.java:118) at org.springframework.boot.context.properties.bind.BindConverter.convert(BindConverter.java:100) at org.springframework.boot.context.properties.bind.BindConverter.convert(BindConverter.java:92) at org.springframework.boot.context.properties.bind.Binder.bindProperty(Binder.java:459) at org.springframework.boot.context.properties.bind.Binder.bindObject(Binder.java:403) at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:343) ... 93 more 에러 로그를 확인한 후, ServerProperties 가 제대로 바인딩 되지 않음을 확인하였습니다. 바인딩이 테스트 환경이 아닌, 일반 서버를 구동할 때도 제대로 안되는건가? 라는 의구심에 로그를 찍어보며 이를 확인해봤습니다. 로그 출력 PropertyPostProcessorConfig TomcatWebServerConfig DataSourceConfig 로그 출력 확인 (일반 서버 구동) 테스트 환경이 아닌 일반 서버를 실행시, 위의 결과와 마찬가지로 제대로 바인딩됨을 확인하였습니다. 따라서, 테스트 코드상에서 바인딩이 제대로 이뤄지지 않음을 알게 되었고, 스프링부트 레퍼런스를 찾아보니 yml 파일은 @PropertySource 와 @TestPropertySource 를 통해 로딩되지 않음을 확인하였습니다. ( https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#boot-features-external-config-yaml-shortcomings ) 이를 해결하기 위해, 구글링을 통해 해결방법을 참고하여 아래와 같이 변경하였더니, 테스트가 제대로 통과됨을 확인하였습니다. (참고링크 : https://www.inflearn.com/questions/293325/testpropertysource%EC%A7%88%EB%AC%B8%EC%9E%85%EB%8B%88%EB%8B%A4 ) 하지만 이전 토비님의 질문 답변 중, @SpringBootTest 와 @ExtendWith + @ContextConfiguration 의 차이점에 대한 글을 보게 되었습니다. ( https://www.inflearn.com/questions/834733/springboottest%EC%99%80-extendwith-contextconfiguration-%EC%B0%A8%EC%9D%B4%EA%B0%80-%EA%B6%81%EA%B8%88%ED%95%A9%EB%8B%88%EB%8B%A4 ) 혹시 @ExtendWith + @ContextConfiguration 을 유지한 채, yml 파일을 이용하여 해당 테스트를 통과할 수 있는 방법이 존재하는지 궁금합니다. 항상 수준 높은 강의에 감사드립니다.

  • spring
  • spring-boot
  • spring-jdbc
잉앙잉 댓글 1 좋아요 0 조회수 513

DataSource 관련 질문입니다.

미해결

토비의 스프링 부트 - 이해와 원리

지난번에 말씀해주신 부분들은 다 수정 처리 해서 했는데 이번에 jdbc를 연결하면서 이상하게 build.gradle도 다시 재실행하고 h2 관련 디펜던시도 다 적용을 했는데, 서버 자체는 잘 실행되는데 DataSourceTest가 지금 실행이 안되서 이렇게 질문드립니다. 뭔가 connect를 잘 못불러오는거 같은데 봐주시면 감사합니다! 깃허브 주소는 https://github.com/ted7088/hellospring_toby_study 입니다...

  • spring
  • spring-boot
  • spring-jdbc
ted3131 댓글 1 좋아요 0 조회수 562

작업형2 모의문제1

해결됨

[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)

train 데이터를 별도 분리안하고 범주형은 라벨 인코더로 스케일링하고나서 수치형데이터도 값이 큰건 minmaxscaler나 robustscaler로 적용하고 싶어서 개별 컬럼 선택해서 적용해보는데... 에러가 뜨는데 머가 문제인지 알수 있을까요? 수치형 범주형 개별로 스케일링 하고 싶으면 데이터를 분리했다가 다시 합쳐야 하는 걸까요? train['Total_Trans_Amt'] = scaler.fit_transform(train['Total_Trans_Amt']) test['Total_Trans_Amt']=scaler.transform(test['Total_Trans_Amt'])

  • python
  • 머신러닝
  • 빅데이터
  • pandas
  • 빅데이터분석기사
한상윤 댓글 1 좋아요 0 조회수 401

폭풍 질문 죄송합니다....

미해결

토비의 스프링 부트 - 이해와 원리

앞서 수강생처럼 contextPath 부분이 value를 잘 읽어오지 못해서 질문드립니다... PropertyPlaceHolderConfig를 추가하고 META-INF에도 추가를 했는데 contextPath 값을 그대로 가져오지 못해서 이렇게 질문드립니다. 깃허브 링크 남겨드립니다. 감사합니다! https://github.com/ted7088/hellospring_toby_study

  • spring
  • spring-boot
  • spring-jdbc
ted3131 댓글 1 좋아요 0 조회수 581

깃허브 커밋 후 오류 관련 질문드립니다.

미해결

토비의 스프링 부트 - 이해와 원리

제가 강의 들으면서 공부할때 매번 깃에다 올리고 커밋 후 푸시 하는 작업을 통해 두대의 컴퓨터에서 작업을 진행했는데, 색션 7,8을 어느 한 컴퓨터에서 듣고 다른컴퓨터에서 깃에서 프로젝트 업데이트 하니깐 hellobootapplication 이 실행이 안됩니다... 오류 사항은 Description: Web application could not be started as there was no org.springframework.boot.web.servlet.server.ServletWebServerFactory bean defined in the context. Action: Check your application's dependencies for a supported servlet web server. Check the configured web application type. 종료 코드 1(으)로 완료된 프로세스 이렇게 나오는데 혹시 이유를 알 수 있을까요? 깃에서 가져와서 그런지 HellobootApplication에 환경변수를 추가해도 이상하게 안되더라고요... 기존에 한컴퓨터는 실행이 지금도 잘되는데 다른컴퓨터에서는 이런 오류가 걸려서 질문드립니다

  • spring
  • spring-boot
  • spring-jdbc
ted3131 댓글 2 좋아요 0 조회수 972

완강이 된건가요?

해결됨

[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)

안녕하세요, 강사님 지금 강의실에 보면 섹션8에 작업형3, 가설검정 콘텐츠 제작중입니다 라고 뜨고 섹션 10.에 5회 기출유형(작업형1) 강의가 업로드 되지 않았습니다. 계속 강의가 업데이트 중 인가요? 감사합니다.

  • python
  • 머신러닝
  • 빅데이터
  • pandas
  • 빅데이터분석기사
댓글 1 좋아요 0 조회수 318

spring 설치 오류

해결됨

토비의 스프링 부트 - 이해와 원리

jdk는 11.0.18로 사용중이고 sdk install springboot로 최신버전을 설치하는 것은 가능한데 버전을 지정하면 오류가 발생합니다. 최신 버전(3.1.0)으로 진행해도 될까요?

  • spring
  • spring-boot
  • spring-jdbc
편협한시간 댓글 1 좋아요 2 조회수 823

로비 채팅 구현 섹션에서

해결됨

파이썬/장고로 웹채팅 서비스 만들기 (Feat. Channels) - 기본편

안녕하세요 로비 채팅 구현 강의를 들으면서 구현 중인데 redis 서버도 정상적으로 잘 작동하고 스크립트도 정확하게 썼는데 계속 채팅을 입력하고 엔터를 누르면 새로고침(초기화)이 되네요 ㅠㅠ 어떤게 문제일까요? 아무리 문제를 해결해봐도 이상한점은 찾아볼수가 없네요

  • python
  • django
  • django-channels
오창인 댓글 1 좋아요 0 조회수 306

spring boot 3.0 버전 부터 cli 를 통한 run 명령 사용불가

해결됨

토비의 스프링 부트 - 이해와 원리

spring boot 3.0 버전 부터 CLI 를 통한 run 명령어가 사용불가능한 것으로 보이는데 대체할 수 있는 방법이 있을까요? https://github.com/spring-projects/spring-boot/issues/32263

  • spring
  • spring-boot
  • spring-jdbc
jaden 댓글 2 좋아요 0 조회수 780

인기 태그

인프런 TOP Writers

주간 인기글