μΌ | μ | ν | μ | λͺ© | κΈ | ν |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- ν¨μ
- μλ³μ
- μ€νλ§μνλ¦¬ν° λ‘κ·Έμμ
- κ°μ²΄μ§ν₯
- SQL νλ
- λ°λ³΅λ¬Έ
- SQL
- μ°μ°μ
- join
- μ€λ²λΌμ΄λ©
- μ΄ν΄λ¦½μ€ μ€μΉ
- SpringSecurity λ‘κ·ΈμΈ
- java
- μ€λ²λ‘λ©
- @PreAuthorize("isAuthenticated()")
- μΉμ ν SQL νλ
- λ Όλ¦¬ μ°μ°μ
- StringBuffer
- μλ°μμ μ
- μΈν 리μ μ΄ Web μ ν리μΌμ΄μ
- λΉκ΅ μ°μ°μ
- SQLνλ
- μμ½μ΄
- spring κ²μν μμ
- μ°μ μ°μ°μ
- μμ
- λ°°μ΄
- μΉμ ν SQL
- SpringSecurity λ‘κ·Έμμ
- κ°μ²΄
Archives
- Today
- Total
gi_dor
[error] org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) λ³Έλ¬Έ
Back_End/Issue
[error] org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
κΈ°λ 2024. 4. 15. 09:08728x90
π μ€λ₯ νμ
νμκ°μ μ§νμ completed νμ΄μ§λ‘ μ΄λνμ§ μκ³ ν΄λΉ μ€λ₯κ° λ°μνλ€
π μμ ν΄κ²°λ°©λ²
1. Mapper Interface μ 맀νλλ xml νμΌμ μ€ν
<!-- idμ κ³΅λ°±μ΄ μλ€. -->
<select id="select " resultTYpe="String">
...
</select>
2. mapper-locations
mybatis.mapper-locations:classpath:mapper/*.xml
Mapper μΈν°νμ΄μ€
@Mapper
public interface UserMapper {
void insertUser(User user);
User selectUserByNo(Long no);
User selectUserById(String id);
User selectUserByEmail(String email);
int idCheck(String id);
int emailCheck(String email);
}
User.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.example.bookhub.user.mapper.UserMapper">
<resultMap id="UserResultMap" type="com.example.bookhub.user.vo.User">
<id column="user_no" property="no" />
<result column="user_id" property="id" />
<result column="user_password" property="password" />
<result column="user_name" property="name" />
<result column="user_email" property="email" />
<result column="user_created_date" property="createdDate" />
<result column="user_updated_date" property="updatedDate" />
<result column="user_tel" property="tel" />
<result column="user_zip_code" property="zipCode" />
<result column="user_address" property="address" />
<result column="user_address_detail" property="addressDetail" />
<result column="user_del_yn" property="delYn" />
</resultMap>
<select id="selectUserById" parameterType="string" resultMap="UserResultMap">
SELECT user_no ,
user_id ,
user_password ,
user_name ,
user_email ,
user_tel ,
user_zip_code ,
user_address,
user_address_detail ,
user_created_date ,
user_updated_date
FROM USER
WHERE user_id = #{id}
</select>
</mapper>
XML νμΌμλ μ€νμ κ³΅λ°±μ΄ μμλ€ , μΈν 리λ²μ μ μ¬μ©ν΄ μ€νκ° μλμ§ μ½κ² λ°κ²¬ν μ μλ€
ꡬκΈλ§ κ²°κ³Ό application.properties νμΌμμ λ¬Έμ κ° μκΈΈ μ μλ€κ³ νλ€
spring.application.name=BookHub
spring.datasource.url=jdbc:mysql://database-1.crzth3asbpqd.ap-northeast-2.rds.amazonaws.com:3306/BookHub
spring.datasource.username=
spring.datasource.password=
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
mybatis.mapper-locations=classpath:/mybatis/mappers/*/*.xml
mybatis.configuration.jdbc-type-for-null=null
mybatis.configuration.log-impl=org.apache.ibatis.logging.log4j2.Log4j2Impl
mybatis.mapper-locations=classpath:/mybatis/mappers/*/*.xml
μ€μ ν κ²½λ‘ μΈμ μμΉν κ³³μ xml νμΌμ΄ μμ΄μ
728x90
'Back_End > Issue' μΉ΄ν κ³ λ¦¬μ λ€λ₯Έ κΈ
[error] application.properties μνΈν Jasypt λ°μν λ¬Έμ (0) | 2024.05.02 |
---|---|
[error] update λΉλ°λ²νΈ μνΈν λ¬Έμ (0) | 2024.04.29 |
[error] localhostμμ 리λλ μ ν νμκ° λ무 λ§μ΅λλ€ (0) | 2024.04.16 |