학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 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]'
제목과 같습니다! SSG와 SSR을 동시에 사용할 수 없을 뿐더러 요새는 하나의 페이지에 정적인 데이터만 존재하는 페이지는 거의 없다고 생각하거든요 떄문에 과연 프리패칭은 하고 싶지만 정적인 데이터가 너무 커서 SSG를 선택하는 경우의 수가 얼마나 있을까?? 하는 추측이 드는데요. 저의 이런 추측이 충분히 가능성 있는 의문인지 궁금합니다!
잘 로드가 되다가 갑자기 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 이 에러가 뜹니다... 올려주신 걸 복붙했는데도 이러는데 왜 이럴까요?
[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예) [질문 내용] 여기에 질문 내용을 남겨주세요. 섹션4 회원 서비스 테스트 강의 13:13즈음에서 설명하신 내용에 대해 질문 드리려고 합니다. 강사님께서는 MemberService에 있는 memberRepository와 MemberServiceTest에 있는 memberRepository가 서로 다른 객체여서 애매하다고 설명해주셨습니다. 두 클래스 모두 new로 새로 생성해줘서 서로 다른 객체인건 이해가 갑니다. 하지만 Test에서 확인하려는건 작성한 코드가 제대로 돌아가는지 확인하기 위함이므로 서로 다른 객체이긴 하지만 동일한 메서드를 이용하므로 Test차원에서는 상관없다고 생각되어 질문드려봅니다! 감사합니다~
#include <stdio.h> void strcopy(char d[], const char s[]) { int i = 0; while (s[i] != '\0') { d[i] = s[i]; i++; } d[i] = '\0'; } int main() { char str1[] = "first"; char str2[50] = "teststring"; int result = 0; strcopy(str2, str1); for (int i = 0; str2[i] != '\0'; i++) { result += i; } printf("%d\n", result); for (int i = 0; i < 10; i++) { printf("%c", str2[i]); } } 출력값: 10 first ring printf("%c", str2[i]); // first ring 이렇게 출력되었는데 while (s[i] != '\0') { d[i] = s[i]; i++; } d[i] = '\0'; 여기서 while타고 s[i]에 first 마지막인 t 가 들어가면 다음 배열이 들어가지않으니 d[i] = '\0'; 들어가고 firist\0 담기는게 아닌가해서 질문드립니다. 그래서 출력값이 first ring 이렇게 나오는게 맞을까요?
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예) [질문 내용] 위와 같은 에러가 뜹니다. 프로그램에서 java 11이나 jdk 11 버전은 모두 삭제되어 있습니다. (choco uninstall openjdk11 명령어 실행 시 openjdk11이 uninstall 되어있다는 fail이 뜸) 환경변수도 모두 17버전으로 맞춰놓은 상태입니다. ./gradlew build까지는 됐는데 java -jar 했을 때 오류가 납니다.
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 여기에 질문 내용을 남겨주세요. jsp인식 오류입니다 new-form.jsp 회원목록 누르면 어런식으로 나옵니다
전공자따라잡기 데이터베이스 공부중에 mysql 대신 이 강의 할때 깔았던 postgreSQL로 연습해보려고 하다가 질문드립니다 서버그룹 우클릭 -> register -> server 하면 사용자 이름으로 된 기본db와 함께 zcom이 항상 같이 생성되는데 이 zcom db 생성안되게 하려면 어떻게 해야하나요?
[질문 내용] JdbcMemberRepository클래스를 만들고 코드를 복붙했으며, 대부분 오류나는 부분은 모두 import해서 없어졌지만, 해결되지 않은 부분이 2군데 있었습니다. java: hello.hello_spring.repository.JdbcMemberRepository is not abstract and does not override abstract method findAlL() in hello.hello_spring.repository.MemberRepository java: method does not override or implement a method from a supertype 12줄에 public class JdbcMemberRepository implements MemberRepository { 이 부분에서 빨간줄이 계속 표시되고, 71줄에 findAll()메소드에서 바로 상단에 @Override에 빨간줄이 뜹니다. 어떤 방식을 적용하든 계속 오류가 해결되지 않은데 어떻게 해야 좋을지 궁금합니다.