SpringBoot
HandlerInterceptorAdapter - deprecated
5.3버전 부터 바뀐다고한다. extends HandlerInterceptorAdapter 이렇게 상속하는 방법에서 인터페이스를 받는 방법으로 바뀐다 implements HandlerInterceptor
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'.
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary. log4jdbc 사용중 위와 같은 메시지가 표시되었다. 근데 분명히 나는 저 드라이버를 사용한 적이 없다. 나의 application.properties는 spring.datasource.hikari.driver-class-name=net.sf.log4jdbc.sql.jdbcapi.DriverSpy 이렇게..
[MyBatis] 쿼리 입력시 CDATA사용 이유
이와 같이 MyBatis의 Mapper에 xml 쿼리 문을 지정해줄때, 을 항상 쓰는 것을 발견했다. 하지만 CDATA를 안써도 잘 돌아간다. 그렇다면 왜 쓰는가 그 이유는 바로 쿼리문 안의 특수문자를 xml문서의 내용으로 오인하지 않도록 하기 위함이다 예를 들어 쿼리문 안의 조건문에서 '>'와 같은 문자가 들어가면 잘못 실행되기도 한다. 이를 방지하기 위함이다. 즉 안의 내용을 문자열로 인식하기 때문에 이 것을쓰는것이다
Failed to load ApplicationContext
스프링 부트를 실행시키려고 해도 실행이 되지 않았다. 기본 build.gradle하고 application.properties, 그리고 DatabaseConfiguration.java만 건드렸는데 계속해서 안됬다. 주요한 원인은 @Bean @ConfigurationProperties(prefix="spring.datasource.hikari") public HikariConfig hikariConfig() { return new HikariConfig(); } 이부분, config가 안불러와진다는 것이다. 여러가지를 모두 체크했지만 모두 안됬다. 결과적으로 나의 오류 원인은 DatabaseConfiguration의 맨 위의 이부분 @Configuration @PropertySource("classpath..