IT'S DO
mybatis mapper,와 mapper.xml 경로 잡아줄때
개발/Spring Boot 2022. 10. 19. 14:31

mybatis로 mapper.xml 경로가 안잡힐때가 있음 Invalid bound statement (not found): com.example.demo.mapper.BoardMapper.boardCount 이렇게, 그럴때 com.example.demo.mapper안에 mapper.java, mapper.xml을 놔두는게 아니고 -> 설정으로 안에 넣을 수도 있음. 해당 설정이 기억이 안나서.아래 resources 아래 경로에 com.example.demo.mapper 폴더를 각각 만들어주고 그안에 mapper.xml 넣어주면 됨.설정을 하지 않는 이상 위에 있어도 의미가 없음.

springBoot 파일 용량 늘리기
개발/Spring Boot 2022. 9. 21. 13:09

처음에 자꾸만 파일 넣을 때마다, 특정한 파일은 첨부가 되지 않았다. 에러 문구 뱉으면서 원인을 찾아보니, springBoot에서는 기본적으로 설정하지 않으면 10MB만 파일 첨부가 된다고함. 그래서 용량 설정 파일을 변경 해보았다. servlet: multipart: max-file-size: 1000MB max-request-size: 1000MB 그랬더니 잘됨.

프로젝트 이름 변경하니 발생한 에러 및 변경 방법.
개발/Spring Boot 2022. 8. 29. 16:00

java.lang.IllegalStateException: For queries with named parameters you need to use provide names for method parameters. Use @Param for query method parameters, or when on Java 8+ use the javac flag -parameters. 라는 에러 나옴. 해결법은 이름을 맞춰 주는 것. 1. CTRL + ALT + SHIFT + S를 눌러서 프로젝트 탭에서 이름을 변경해줌. 2. settings.gradle에서 이름 변경 3. 폴더 자체 이름 변경 4. 설정 > 빌드, 실행, 배포, 빌드 도구 > gradle > 빌드 및 실행 > intellij idea로 변경 gr..

model 값 thymeleaf 값 담고 보내줄 때 사용
개발/Spring Boot 2022. 8. 2. 10:38

/** * 게시글 조회 */ function findBoard() { const id = /*[[ ${id} ]]*/; fetch(`/api/events/${id}`).then(response => { if (!response.ok) { throw new Error('Request failed...'); } return response.json(); }).then(json => { console.table(json); json.createdDate = moment(json.createdDate).format('YYYY-MM-DD HH:mm:ss'); Object.keys(json).forEach(key => { const elem = document.getElementById(key); if (elem)..