오류 모음집
[Java] Loading xml bean definitions from class path resource
로춘남
2021. 5. 27. 17:44
728x90
지금 생각해보면 어이가 없지만 꽤나 시간이 오랫동안 사용된 실수..
실수라고 하기엔 좀 창피한데,
Loading xml bean definitions from class path resource 라는 메시지가 계속 나타나는것이었다.
검색을 해보니 SQL문법의 구조상 오류가 있다고했는데, 내 문법은 정상적인 상황..
DB도 잘 연결되어있는데, 도대체 뭐지 뭐지라는 생각을 하고 있었다.
그런데 진짜...ㅎㅎ 나중에 파악했을때 헛 웃음 나와버렸음.
<!-- 게시글 작성 -->
<insert id="insert">
INSERT INTO reviseLIST (TITLE, CONTENT, USER_NAME)
VALUES (#{title}, #{content}, #{user_name})
</insert>
MyBatis로 Mapper로 하고 있었고 insert 해주는 녀석의 구문...
<table class="tbl-basic">
<tbody>
<tr>
<td>
<label for="title">제목</label>
<input type="text" id="title" name="title" size="80" placeholder="제목을 입력해주세요"/>
</td>
</tr>
<tr>
<td>
<label for="content">내용</label>
<textarea id="content" name="content" rows="7" cols="100" placeholder="내용을 입력해주세요"></textarea>
</td>
</tr>
<tr>
<td>
<label for="user_name">작성자</label>
<input type="text" id="user_name" name="USER_NAME" size="50" placeholder="이름을 입력해주세요"/>
</td>
<tr>
</tbody>
</table>
자세히보면 mapper에서의 #{user_name} 이랑... JSP 파일에서 input type 내부의 name="USER_NAME"을 보면..
동일한 영어지만 스펠링이 소문자 대문자로 다르다.
당황쓰... 대소문자를 구별..!
VO단과 Name은 항상 일치해야한다는것..! 소문자는 소문자로! 대문자는 대문자로!
허탈했지만 아마 앞으로는 절대 이런일이 발생되지 않을듯..^^;
728x90