일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- IntelliJ
- docker
- JavaScript
- gradle
- BPMN
- tibero
- gson
- database
- react
- kubectl
- wildfly
- springboot
- nodejs
- Java
- useEffect
- intellijIDEA
- mybatis
- log4j2
- LOG4J
- nginx
- Windows
- maven
- VSCode
- Git
- MySQL
- NCP
- dbeaver
- Kubernetes
- JPA
- Spring
- Today
- Total
목록SQL (2)
두 손끝의 창조자
SpringTest로 테스트 실행 전 Sql을 실행하려면 클래스나 메소드에 @Sql 애노테이션으로 미리 작성된 쿼리를 실행할 수 있다. 만약, 실행했는데 java.lang.IllegalStateException: Failed to execute SQL scripts for test context ---- 생략 at org.springframework.util.Assert.state(Assert.java:97) ~[spring-core-5.3.13.jar:5.3.13] at org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener.executeSqlScripts(SqlScriptsTestExecutionListener.java:254) ~..
MyBatis는 특정 메소드를 인터셉트 할 수 있는 애노테이션인 Intercepts 을 제공한다. Intercepts 의 값으로 메소드 시그니처를 지정해야하는데 메소드 시그니처를 지정하는 애노테이션이 Signature 이다. 메소드 시그니처는 메소드이름과 파라미터 타입이므로 인터셉트 할 메소드를 정확하게 지정한다. 예를 들어 org.apache.ibatis.executor.Executor 인터페이스는 ... int update(MappedStatement ms, Object parameter) throws SQLException; List query(MappedStatement ms, Object parameter, RowBounds rowBounds, ResultHandler resultHandler)..