스프링부트 작성 후 에러가 발생하고 있는데 어노테이션에러가 발생하고 있습니다. C:\prac\src\main\java\restApi\prac\service\PostService.java:8: error: cannot find symbol public PostService(PostRepository postRepository) { ^ symbol: class PostRepository location: class PostService 모든 어노테이션에서 발생하고 있는데 설정 문제 일까요?
안녕하세요. useState의 초기값으로 함수를 넣는 경우를 처음 접해서 질문드립니다. 제가 따로 찾아본 결과 useState() 초기값으로 값이 아닌 함수를 넣어주게되면 -> 리랜더링시에 값이 평가되지않고 -> 쓸때없이 uuid가 생성되지 않아서 강의(86강 5분대)와 같이 useState 초기값으로 함수를 넣어주신게 맞나요?? 그리고 이를 lazy-initialization이라 명명하는게 맞을까요?? 좋은 강의 감사드립니다.
서버로부터 받아오는 Posts를 <PostList/> 컴포넌트에서 상태로 관리하는데, 이것은 전역 상태로 관리하지 않는 이유가 있을까요? postStore에서 getTotalPages를 할때, 고정된 값 100을 사용했는데, 실제 서비스라면 어떻게 처리해야하나요? postStore에서 posts.length와 같은 전체 개수를 알아야할것같은데.
혹시나 못보실까 싶어서 글로 남겨요 여기 답변입니다. 환경변수 설정잘되있고 ide 상에서 java -version 쳤을때 잘나옵니다 ㅠㅠ start.spring.io 여기서 만들떄도 21 버전으로 선택했구요 혹시나 문제 있나싶어서 ide도 다시 지웠다 깔고, jdk도 다시 지웠다 깔고 , start.spring.io 도 다시 새로 하고 해도 안되네요 ㅠㅠ Execution failed for task ':restapi.prac.PracApplication.main()'. > Process 'command 'C:\Program Files\Java\jdk-21\bin\java.exe'' finished with non-zero exit value 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 9s 3 actionable tasks: 1 executed, 2 up-to-date 이 에러메시지가 도대체 뭔질 모르곘네요,,, gpt한테 물어봐도 알수없는 말만하고... 만들어보고싶은데 시작도 못하고 있으니 너무 답답하네요.... gpt 계속 괴롭혀도 이상한말만해요
일단 여기서 이렇게 뜨구요 이거 전에 Spring Initializr 여기서 설정하고 그거 열어줘서 작업하는건데 저렇게 뜨는데 어떻게해야하나요... 혹시나 PracApplication.java 에서 실행하면 Execution failed for task ':restapi.prac.PracApplication.main()'. > Process 'command 'C:\Program Files\Java\jdk-21\bin\java.exe'' finished with non-zero exit value 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 12s 3 actionable tasks: 1 executed, 2 up-to-date 이렇게 또 에러가 뜨구요... 추가로 ai답변으로 build.gradle 의 dependencies 확인하래서 이거 확인했는데 이상없는거 같고 정상적으로 C:\Program Files\Java\jdk-21\bin\java.exe 이 경로에 있습니다. 마지막으로 이렇게 build.gradle을 연 상태로 run을 하면되는데 (localhost:8080 은 안열림) application.properties 에서는 run 버튼 자체가 활성화가 안되있고 PracApplication.java 에서는 run이 활성화는 되있지만 계속 제가 말헀던 에러가 뜹니다 제발 ai답변말고 선생님이 답변해주시면 감사하겠습니다
일단 여기서 이렇게 뜨구요 이거 전에 Spring Initializr 여기서 설정하고 그거 열어줘서 작업하는건데 저렇게 뜨는데 어떻게해야하나요... 혹시나 PracApplication.java 에서 실행하면 Execution failed for task ':restapi.prac.PracApplication.main()'. > Process 'command 'C:\Program Files\Java\jdk-21\bin\java.exe'' finished with non-zero exit value 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 12s 3 actionable tasks: 1 executed, 2 up-to-date 이렇게 또 에러가 뜨구요...