[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예) [질문 내용] 여기에 질문 내용을 남겨주세요. 3:40초 근처에 h2/bin폴더안에서 cmd를열고 ./ h2.sh 를 입력하는 것을 따라 했으니 visual studio에서 h2.sh 파일이 열린것 외엔 아무것도 나오지 않았습니다. cmd를 확인해보니 이러한 문구가 나와 있었습니다. [main 2024-10-09T21:04:03.696Z] update#setState idle [main 2024-10-09T21:04:33.705Z] update#setState checking for updates [main 2024-10-09T21:04:33.793Z] update#setState idle 큰 문제는 없는것 같은데 왜 아무것도 안나오는지 모르겠습니다 ㅠㅠ 이러한 문제는 어떻게 해결해야할까요?
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 여기에 질문 내용을 남겨주세요. 질문 1) intelli j 설정 중 setting에 들어가서 gradle을 검색하고 설정에 들어가니까 영한님이 띄운 설정 화면과 다르게 나와서 질문 드립니다 저는 왜 밑에 설정 하는게 안뜰까요? +혹시 몰라서 dependency 부분도 올립니다. 질문 2) sdk 설정에서 jdk 분명 23설정하고 혹시 몰라서 21 oracle 꺼로 하나 더 설치하고 servletApplication.java 파일을 실행하려고 해도 안되서 나갔다도 와보고 했는데 설정이 안바뀝니다. 그래서 혹시 src 디렉토리에 넣어야하나 싶어서 거기 설치하려고하니까 '타겟경로가 비어있지않은 기존디렉토리입니다' 라고 뜹니다. 어떻게 해야할까요?
[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예) [질문 내용] 해당 문제가 발생합니다 아마 자바 버전 문제때문에 발생되는것같습니다. 혹시 위의 그림과같이 환경설정을 java23으로 했을시 수업내용을 따라가기가 어려울까요? 수업자료에 업데이트 되어있는 버전대로 진행해도 계속 첫번째 사진과 같은 에러가 나타납니다.ㅠ
[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예) [질문 내용] 5. 자바 예외 이해.pdf (v20231127) 6페이지에 MyUncheckedException이라고 써져 있는데 MyCheckedException으로 바꿔야 할 것 같습니다
t1 >> t3 t2 >> t3 이렇게 테스크를 연결했을때 case 1 : t1, t2 둘다 종료되어야 t3가 실행되는지 case 2 : t1이 종료되었을떄, t2가 종료되었을때 각각 t3가 한번씩 실행되는지 궁금합니다. 위의 방법과 [t1, t2] >> t3 가 동등하다고 설명해주셨는데 case 1, case2 두가지 방법을 설정하고싶을때는 어떻게 처리하면 될까요?
안녕하세요! 강의 잘 보고 있습니다. 강의를 보는 중에 헷갈리는 개념이 있어서 질문드려요! 올려주신 강의 중 미들웨어 챕터 부분을 보고 있어요. 그런데 문득 미들웨어와 uvicorn, gunicorn, hypercorn 과 같은 WSGI, ASGI 서버 간의 관계에 대해서 궁금증이 들었습니다. 보통 언어에 상관없이 웹 통신을 한다라고 하면 아래와 같은 구조로 통신한다고 볼 수 있잖아요?(DB가 있다고 가정) """ Client(Web Browser) ---> Web Server ---> Web Application Server ---> DB """ 그리고 파이썬에서는 uvicorn, gunicorn 과 같은 WSGI, ASGI 서버들이 Web Server 역할을, Flask, FastAPI 와 같은 프레임워크 서버들이 Web Application Server의 역할을 한다고 알고 있습니다. 그리고 저 Web Server 요소가 미들웨어라고 정의한다고 알고 있었는데요! 그런데 FastAPI 공식문서 상 에서는 미들웨어라는 것을 소개할 때, "모든 요청 또는 응답에 대해서 사전 또는 사후 처리 로직을 추가할 때 사용하는 것" 이라고 소개를 하면서 문득 "그러면 여기서 이야기하는 미들웨어랑 uvicorn, gunicorn 과는 어떤 차이점이 있는거지?" 하면서 헷갈리더라구요. 자바에서는 미들웨어라는 개념이 JVM 위에서 동작하면서 DB 연결, TCP/IP 연결 등과 같이 다른 소프트웨어(ex.애플리케이션)가 잘 동작하도록 지원해주는 소프트웨어라고 알고 있는데요! 만약 이러한 관점에서 본다면 uvicorn, gunicorn 과 같은 WSGI 또는 ASGI 서버들도 미들웨어라고 볼 수는 없는 걸까요? ChatGPT 한테 물어보았을 때는 엄연히 다른 개념이라고 하는데.. 정확히 차이점을 잘 모르겠어서요. 답변 해주시면 감사하겠습니다! (참고로 저는 파이썬으로만 오랫동안 개발해와서 자바나 다른 언어 관련해서는 잘 모를 수도 있어서 다른 언어에 대한 비유로 답변 주시면 제가 잘 이해를 못할 수도 있습니다!)
MyException Class 오류발생 =>com.boot.sailing_jsp.v2.service.MenuSvcV2 rror Error Error Error : My Exception 처리 => [[ ### Error updating database. Cause: java.sql.SQLSyntaxErrorException: (conn=4058) Truncated incorrect DECIMAL value: '1>' ### The error may exist in file [C:\Users\mins1\OneDrive\Desktop\Sailing_jsp\build\resources\main\sqlmapper\v2\CoffeeMenuV2.xml] ### The error may involve defaultParameterMap ### The error occurred while setting parameters ### SQL: Update coffee_menu set price = CAST(? as INTEGER) WHERE no in ( ? ) ### Cause: java.sql.SQLSyntaxErrorException: (conn=4058) Truncated incorrect DECIMAL value: '1>' ; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: (conn=4058) Truncated incorrect DECIMAL value: '1>' ]] 이렇게 오류가 뜨는데 해결 못한지 3일째예요ㅠㅠ
다른 분 질문의 답변을 봐도 이해가 잘 안되서 질문 남깁니다! 앞 포인터 강의에서 int *p = &n; printf("%d\n", p); 를 실행하면 n의 주소값이 출력된다고 이해했는데, char *str; printf("%s\n", str); 을 했을때는 왜 myString의 0번째 인덱스 주소값이 출력되는게 아니라 this is string 이 출력되는지 이해가 안되서요.. 설명해주시면 감사하겠습니다!
세션을 실행하고 있어 curl로 실행하려고 하는데 아래와 같은 에러 메세지가 뜨네요. Invoke-WebRequest : 매개 변수 이름 'c'이(가) 모호하므로 매개 변수를 처리할 수 없습니다. 일치하는 항목은 다음과 같습니다. -Credential -CertificateThumbprint -Certificate -ContentType. 위치 줄:1 문자:45 + curl -X POST http://127.0.0.1:8000/set/ -i -c cookies.txt + ~~실행하면 위와 같은 에러메시지가 나오는데 어떻게 해결할 수 있나요? from fastapi import FastAPI,Request from fastapi.security import HTTPBasic from starlette.middleware.sessions import SessionMiddleware app=FastAPI() app.add_middleware(SessionMiddleware,secret_key="your-secret-key") @app.post("/set/") async def set_session(request:Request): request.session["username"]='smith' return {"message":"Session value"} @app.get("/get/") async def get_session(request:Request): username=request.session.get("username","Guest") return {"username":username}
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오)네 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)네 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)네 [질문 내용] 여기에 질문 내용을 남겨주세요. 강의자료로 주신 내용그대로 작성후 서버실행하고 url입력하면 다음과 같이나타납니다. 어떻게 해결하나요?? jdk는 21쓰고 인텔리제이는 무료버전씁니다. jdk버전도 17도 바꿔보고, 인텔리제이 다시 깔아보고 하는데도 인식을 못하네요
새로운 Authentication 생성시에, public Authentication createNewAuthentication(Authentication currentAuth, String username) { UserDetails newPrincipal = this.loadUserByUsername(username); UsernamePasswordAuthenticationToken newAuth = new UsernamePasswordAuthenticationToken(newPrincipal, currentAuth.getCredentials(), newPrincipal.getAuthorities()); newAuth.setDetails(currentAuth.getDetails()); return newAuth; } 위 코드에 관하여 질문드립니다. currentAuth.getCredentials()는 현재 SecurityContext에 있는 Authentication의 비밀번호를 가져와서 newAuth생성에 쓰임으로 알고있는데요. 이 때, 비밀번호를 수정한 경우에는.. newPrincipal.getCredentials() 라고 고친 메서드를 써야할까요? 아니면 Authentication을 바꿔서 유지해주기보다 로그아웃시켜서 다시 로그인해주는 방식이 옳을까요?
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="hello.sailing_jsp.v2.dao.MenuDaoV2"> <!--조회--> <select id="doList" resultType="hello.sailing_jsp.v2.vo.Coffee_menu"> select no, coffee, kind, price, date_format(reg_day,'%Y,%m,%d') as reg_day, date_format(mod_day,'%y,%m,%d') as mod_day from coffee_menu </select> <!--검색에 의한 쿼리--> <select id="doSearch" resultType="hello.sailing_jsp.v2.vo.Coffee_menu"> select no, coffee, kind, price, date_format(reg_day,'%Y,%m,%d')as reg_day, date_format(mod_day,'%y,%m,%d')as mod_day from coffee_menu where 1=1 and reg_day >= date_format( #{strStartDate}, '%Y,%m,%d') and reg_day < date_add(date_format(#{strEndDate}, '%Y,%m,%d'), interval +1 day) <if test="strCoffee != 'ALL'"> and coffee like concat('%',#{strCoffee},'%') </if> <if test="strKind != 'ALL'"> and kind = #{strKind} </if> </select> <!--메뉴조회--> <select id="doListOne" resultType="java.util.Map"> select no, coffee, kind, price, date_format(reg_day,'%Y,%m,%d')as reg_day, date_format(mod_day,'%y,%m,%d')as mod_day from coffee_menu where no = cast(#{strNo} as Integer) </select> <insert id="doInsert"> Insert Into coffee_menu(coffee,kind,price) values(#{coffee},#{kind},cast(#{price} as Integer)) </insert> <update id="doUpdate"> update coffee_menu set coffee = #{coffee}, kind = #{kind}, price = cast(#{price} as Integer) where no = cast(#{no} as Integer) </update> <delete id="doDelete"> Delete from coffee_menu where no = cast(#{strNo} as Integer) </delete> <!--메뉴 가격 수정 입력--> <update id="doUpdatePrice"> update coffee_menu set price = cast(#{strPrice} as integer) where no = cast(#{strNo} as integer) </update> <!--가격 로그 입력--> <insert id="doInsertLog"> insert into coffee_menu_log(coffee_no, price) values( #{strNo}, cast(#{strPrice} as integer) ) </insert> <!--메뉴 가격 수정 원쿼리로 처리--> <update id="doUpdatePriceOne"> update coffee_menu set price = cast(#{strPrice} as integer) <where> <foreach item="item" index="index" collection="chkList" open="no in (" separator="," close=")" nullable="true"> #{item} </foreach> </where> </update> <!--가격 로그 입력 원쿼리--> <insert id="doInsertLogOne"> insert into coffee_menu_log(coffee_no, price) <foreach item="item" index="index" collection="chkList" separator="union all" nullable="true"> select #{item}, cast(#{strPrice} as integer) from dual </foreach> </insert> <!--boot 로그 입력--> <insert id="doBootLog"> insert into boot_log (class) values( #{strClass} ) </insert> </mapper> org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'bootlog': Unsatisfied dependency expressed through field 'menuDaoV2'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'menuDaoV2' defined in file [C:\Users\mins1\OneDrive\Desktop\Sailing_jsp\build\classes\java\main\com\boot\sailing_jsp\v2\dao\MenuDaoV2.class]: Cannot resolve reference to bean 'sqlSessionTemplate' while setting bean property 'sqlSessionTemplate'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionTemplate' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionTemplate' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.i o.IOException: Failed to parse mapping resource: 'file [C:\Users\mins1\OneDrive\Desktop\Sailing_jsp\build\resources\main\sqlmapper\v2\CoffeeMenuV2.xml]'
잘 로드가 되다가 갑자기 Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2024-10-09 14:33:58.683 ERROR 21648 --- [ restartedMain] o.s.boot.SpringApplication : Application run failed 이 에러가 뜹니다... 올려주신 걸 복붙했는데도 이러는데 왜 이럴까요?