자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
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; // 예외를 호출자에게 다시 전달 } } } 강의에서 생성되는 프록시 객체의 형태는 정확하진 않지만 대략적으로 위와 같다고 생각해도 될까요?
안녕하세요. LangGraph 공부하면서 질문이 생겨 이렇게 질문을 남기게 되었습니다. add_messages를 사용하여 데이터를 append하거나, MessageState를 사용하여 append 하거나 결국 같은 결과를 얻을 것 같은데 정확한 차이가 궁금합니다. # 기본 State 초기화 방법을 사용 class GraphState(TypeDict): messages : Annotated[list[AnyMessage], add_messages] -> MemorySaver 기능도 있다. from langgraph.graph import MessageState class GraphState(MessageState): # messages 키는 기본 제공 - 다른 키를 추가하고 싶을 경우 아래 주석과 같이 적용 가능 documents : List[Document] grade : float num_generation : int create_react_agent 관련 질문 https://rudaks.tistory.com/entry/langgraph-Multi-agent-supervisor 위 URL만 보면 create_react_agent는 conditional_edge의 역할을 똑똑한 에이전트가 대체한다는 느낌인 것 같은데 맞을까요? 답변 부탁드리겠습니다. 감사합니다.
실제 https로 배포된 API를 fetch를 활용하여 SSR을 구현하고있습니다. 문제는 local에서는 yarn build -> yarn start 하고 테스트를 진행하면 fetch가 정상적으로 작동합니다. 하지만 AWS Amplify를 활용하여 Next JS를 배포하고 배포한 사이트에서 fetch(pending 이후에 catch로 빠짐)가 작동하지않습니다. API에 문제가 있나해서 다른 API를 CSR로 테스트를 해보면 정상적으로 200이 됩니다. 원인이 뭘까요?
강의상에서는 @RestController 어노테이션을 넣지 않더라도 문제없이 매핑되는걸 확인할 수 있는데요. 혹시 버전이 최신버전으로 바뀌면서 이 어노테이션을 넣지 않으면 매핑이 안되고 그런걸까요?? 일단 3.3.7에서는 [에노테이션 매핑 정보 사용] 이 강의편에서 나온 것 처럼 @RestController를 빼고 하면 매핑정보를 못 찾는 듯 싶습니다.
폴라우트 페이지 2를 보면서 / 인덱스페이지가 강사님은 static 페이지가 아닌 다이나믹 페이지로 빌드가 되는 부분에서 강사님은 fetch에 force-cache를 적용시키면서 이제 다이나믹된 페이지를 static 페이지로 바꾸셨느데 일단 저는 force-cache 옵션을 적용을 안해도 static 페이지이더라구요 강사님과 저랑 다른 점은 api호출하는 함수 부분을 따로 api 폴더에 빼둔거 말고는 다른 점은 없습니다 . 이렇게 따로 빼놓은 뒤 그냥 promis.all로 데이터 패칭을 해서 그대로 화면에 보여줬습니다 (이것저것 시험하느라 Allbook ,RandomBook 컴포넌트를 따로 빼지는 않은 상태입니다. ) export default async function Home() { const [allBooks, randomBooks] = await Promise.all([ fetchBooks(), fetchRandomBook(), ]); 저는 force-cache 를 적용안햇는데도 왜 다이나믹 페이지가 안되고 static 페이지가 되는걸까요 ...
과목명 : 프로퍼티 빈의 후처리기 도입 개요 : 프로퍼티를 객체로 추출하여 사용할 때 TomcatServerConfig에 @Import(ServerProseties.class)를 사용하는 이유와 이를 제거하였을 때 ServerProperties 클래스를 주입받지 못하는 이유가 궁금합니다. 세부 : ServerProperties.java의 경우 @MyConfigurationProperties 메타 어노테이션을 통해 @Component 어노테이션이 설정되어 Bean으로써 등록이 가능하다고 생각하였습니다. 그러므로 ServerProperties.java는 서비스내에서 유일하게 선언된 ServerProperties 객체이기 때문에 굳이 @import문을 별도로 선언해줄 필요 없다고 생각하였습니다. 따라서 Spring이 기동 될 때 TomcatServerConfig의 servletWebServerFactory에 자동으로 의존성이 주입 될 것이라 생각하였습니다. 그래서 실제로 @ImportServerProperties.class)를 TomcatServerConfig.java에서 지우고 서비스를 기동하였을 때 다음과 같은 에러가 발생하면서 서비스 구동에 실패 하였습니다. 2025-01-13T06:55:22.586+09:00 ERROR 1088 --- [tobySpringBoot] [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPLICATION FAILED TO START *************************** Description: Parameter 0 of method servletWebServerFactory in tobyspringboot.config.autoConfig.TomcatWebServerConfig required a bean of type 'tobyspringboot.config.autoConfig.ServerProperties' that could not be found. Action: Consider defining a bean of type 'tobyspringboot.config.autoConfig.ServerProperties' in your configuration. 이러하여 해당 부분에 왜 Import를 선언하는지 질문 드립니다!!
int[] number = new int[] {10, 20, 30} 이렇게 선언하고 초기화 하면 number의 0번째 인덱스에 10이 들어가는건가요? 그리고 만약 10이 number의 0번째 인덱스에 들어간다면, int[]number = {10,20,30} 이렇게 선언해도 되는데 굳이 new int[] 사용해서 초기화하는 경우에 대해 궁금합니다. 그리고 선언과 초기화에 따른 메모리 동작 원리에 대해서도 궁금합니다!
정적페이지 크롤링의 경우 1) BeautifulSoup에서 select, select_one 함수를 이용하여 태그를 찾고 이를 제어하는 방법으로 이해했고요 2) Selenium에서 find_element, find_element함수를 이용하여 태그를 찾고 이를 제어하는 방법으로 이해했습니다. 위 두가지 방법 중에 근본적인 차이가 있나요? (동적페이지의 경우 selenium이 필요하다는 것은 다음 강의를 통해서 이해했습니다.)
시나리오 2를 실습해 개발 & 운영 환경 배포를 모두 완료했고 ELB(로드 벨런서)가 2개 생성된걸 확인했는데 ec2가 2개 뿐이라 살펴보니 두 ELB가 이 2개의 ec2를 둘 다 바라보고 있어 살짝 혼란이 왔습니다! (개발 & 운영 각각 2개씩 총 4개의 ec2가 생성됨을 예상했습니다!) 이건 강사님이 실습 비용 절약을 위해 쿠버네티스와 helm 설정에 개발 & 운영환경이 같은 ec2 2개를 같이 사용하도록 설정하셔서 그런걸까요? (쿠버네티스를 이번 강의에서 처음 다뤄서 설정 내용 해석이 잘 안되네요..)
섹션 4. DOM API-1 강의 6:30초 쯤 변수명을 다음과 같이 작성해주셨는데, 이는 미리 소개하신 2가지 방법의 예시를 모두 보여주기 위함인가요? let $animalInfo = document.querySelector('div.animal-info'); let ageElement = document.querySelector('div#age'); 실제 프로젝트에서는 2가지 방법 중 하나를 사용해 통일성을 주는게 좋을 것 같은데 혹시 다른 이유가 있으신지 궁금합니다!
이미지를 업로드한 후 푸시 커밋 하여 나온 블로그 화면 일부입니다. 처음에는 경로에 한글이 포함되어있어서 업데이트 자체가 되지 않았는데 경로에 한글 제거 후 업데이트하니 저렇게 나오는 데 제가 뭘 누락 했는지 잘 모르겠습니다.. Typora에는 잘 출력되고 페이지도 정상적으로 업데이트 되었다고 출력됩니다. 다만 _Posts파일에 업데이트된 코드에는 사진이 출력되지않고 images에서는 정상적으로 이미지가 출력됩니다. posts에 사진파일명만 표시되는데 파일명을 클릭하면 "The master branch of "깃허브 주소" does not contain the path" 라는 404오류메시지가 표시됩니다. 경로가 잘못되었다는 내용 같은데 해결 방법을 잘 모르겠어서 질문 남깁니다. 좋은 강의 제공해 주셔서 감사합니다.
[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 섹션 2-5 듣고 있습니다 MemberRepositoryTest를 실행하면 test는 패스 되고 다른 기능들도 잘 동작하지만 주의 문구가 뜹니다 프로그램에 지장이 있는걸까요? 어떻게 해결해야 할까요? Mockito is currently self-attaching to enable the inline-mock-maker. This will no longer work in future releases of the JDK. Please add Mockito as an agent to your build what is described in Mockito's documentation: https://javadoc.io/doc/org.mockito/mockito-core/latest/org/mockito/Mockito.html#0.3 WARNING: A Java agent has been loaded dynamically (C:\Users\shina\.gradle\caches\modules-2\files-2.1\net.bytebuddy\byte-buddy-agent\1.15.11\a38b16385e867f59a641330f0362ebe742788ed8\byte-buddy-agent-1.15.11.jar) WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information WARNING: Dynamic loading of agents will be disallowed by default in a future release package jpabook.jpashop; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.annotation.Rollback; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.transaction.annotation.Transactional; import static org.assertj.core.api.Assertions.assertThat; @ExtendWith(SpringExtension.class) @SpringBootTest class MemberRepositoryTest { @Autowired MemberRepository memberRepository; @Test @Transactional @Rollback(false) public void testMember() throws Exception{ //given Member member = new Member(); member.setUsername("memberA"); //when Long saveId = memberRepository.save(member); Member findMember = memberRepository.find(saveId); //then assertThat(findMember.getId()).isEqualTo(member.getId()); assertThat(findMember.getUsername()).isEqualTo(member.getUsername()); assertThat(findMember).isEqualTo(member); } }
Parent 클래스가 자료형 Child 클래스가 생성자로 // 업캐스팅 이름이 parent 인 객체를 만들었는데 parent.x parent.y 를 했을경우 값이 어떻게 출력돼나요? 변수x는 부모랑 자식에 둘다 있어서 모르겠습니다 상속을 받는 경우 , 기능(매서드)을 상속받고 변수들은 어떻게 되는건가요? Static 처럼 타입형을 참조하는건가요?