- 에러 내용
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error updating database. Cause: java.lang.NumberFormatException: For input string: "P"
### Cause: java.lang.NumberFormatException: For input string: "P"
- Mybatis 코드
<select id="test">
<if test="TEST_VAL != 'A' and TEST_VAL != ''">
</select>
- 해결책
: 큰 따옴표(")와 작은 따옴표(') 위치 바꿔서 사용하기
-- 에러
<if test="TEST_VAL != 'A' and TEST_VAL != ''">
-- 해결
<if test='TEST_VAL != "A" and TEST_VAL != ""'>
반응형
'💻Programming > Java' 카테고리의 다른 글
[Java/자바] 배열 중복 제거 (0) | 2023.07.28 |
---|---|
[Java/자바] PreparedStatement 클래스 (0) | 2023.07.28 |
댓글