본문 바로가기

전체 글

(94)
[Spring] context:component-scan 사용법 component-scan 이란? 빈으로 등록 될 클래스들을 스캔하여 빈으로 등록해주는 것이다. default - @Controller, @Service, @Component, @Repository 기본적으로 @Component 를 빈 등록 대상으로 포함한다. @Controller , @Service는 어떻게 인식하는 걸까? @Controller, @Service 가 @Component를 포함하고 있기 때문이다. 1. xml 파일 설정 base-package 기준으로 클래스들을 스캔하여 빈으로 등록한다. 여러개의 패키지를 쓸 수 있다. ex) 위와 같이 설정하면 base-package 하위의 @Controller, @Service, @Component, @Repository 모두 빈으로 등록된다. 특정한..
[Mybatis] ResultType(ResultClass) : ResultMap 차이점 https://mybatis.org/mybatis-3/sqlmap-xml.html mybatis – MyBatis 3 | Mapper XML Files Mapper XML Files The true power of MyBatis is in the Mapped Statements. This is where the magic happens. For all of their power, the Mapper XML files are relatively simple. Certainly if you were to compare them to the equivalent JDBC code, you would immedi mybatis.org Mybatis 공식 문서에 기재된 차이점. resultType The fully..
[API] Swagger @ApiResponse Multi 사용법 @ApiResponse 란? 해당 Method의 Response 내용을 변경해준다. Config 에서 ResponseMessage 처리 하는 것과 동일하다. 각 Method별 에러코드 별도 지정이 가능하다. (코드가 길어짐) @ApiImplicitParam과 동일하게 복수 사용이 가능하다. 코드 별 지정이 가능하나, 동일한 코드에 Message를 담아야 하는 경우는 어떻게 해야할까? @GetMapping(value="/codegroup") @ApiResponses({ @ApiResponse(code=200, message="성공입니다."), @ApiResponse(code=400, message="비정상적인 접근입니다."), @ApiResponse(code=400, message="등록 되지 않은 유저입..
[Window] 윈도우 마우스 커서 바꾸기 * 원하는 마우스 커서 다운로드 받기. https://www.cursors-4u.com/ Free Cursor Downloads - Cursors-4U.com Date: 4 Feb 2021, 21:35 By Tor With 3 Comments This month's favorite cursors is the "Sexy Red Lips". It's unknown who made the image. If you know who did it, send me an email so I can give proper credit. Also being February, check out some Valentine's Day www.cursors-4u.com 1. 윈도우 검색창에 설정 검색 2. 장치 클릭 3. 마우스 ..
[Tistory] 티스토리 마우스 커서 효과 바꾸기 1. 마우스 커서 바꾸기 https://www.cursors-4u.com/ Free Cursor Downloads - Cursors-4U.com Date: 4 Feb 2021, 21:35 By Tor With 3 Comments This month's favorite cursors is the "Sexy Red Lips". It's unknown who made the image. If you know who did it, send me an email so I can give proper credit. Also being February, check out some Valentine's Day www.cursors-4u.com 해당 사이트에서 원하는 마우스 커서 아이콘 찾기. 원하는 아이콘의 HTML ..
[API] Spring boot Swagger 기본 사용법 https://swagger.io/ API Documentation & Design Tools for Teams | Swagger swagger.io Swagger UI 란 ? 별도의 코드 추가 없이 OpenAPI 규격에 맞게 자동으로 API를 시각화 시켜준다. Spring - Rest API를 개발 하고 API에 대한 문서를 정리 / 공유해야 할 때 Swagger를 사용하면 보다 편리해진다. API 문서 자동화 뿐만 아니라 UI에서 직접 API 테스트도 가능하다. 개발환경 Spring Boot Maven Java 8 Swagger 2.9.2 Swagger 의존성 추가 - pom.xml io.springfox springfox-swagger2 2.9.2 io.springfox springfox-swagg..
[Error] org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fileUploadController': 경로 에러 Controller 내에 있는 DAO를 불러오지 못 했다고 한다. root-context.xml 을 확인하니 context:component-scan 선언이 되어있지 않음. org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fileUploadController': Unsatisfied dependency expressed through field 'fileUploadDAO'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com...
[Error] Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for mapper.saveData - mybatis, root-context.xml mapper선언 에러 DAO, DTO, VO 를 통한 Mybatis 연동 설정 중 에러 발생. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource[/WEB-INF/spring/root-context.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [C:\Users\eclipse-workspace\.metadata\.plu..
[Error] Java Spring MVC + Mybatis + PostgreSQL - CannotGetJdbcConnectionException : DB연동 오류 Mybatis + PostgreSQL database error Exception ......nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error updating database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is org.postgresql.util.PSQLException: ID,PW와 에러 내용 한글 깨져서 나옴. ### Cause: org.springframework.jdbc.CannotGetJdbcConnectionExceptio..
[Error] Mybatis SqlSession 오류 - Cannot find class: 패키지명(package) Mapper.xml 에서 해당 경로의 패키지명을 찾지 못 했다는 에러 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in ServletContext resourc [/WEB-INF/spring/root-context.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [C:\Users\~경로\Mapper.xml]'; nested exception..