java.lang.RuntimeException: Driver net.sf.log4jdbc.sql.jdbcapi.driverspy claims to not accept jdbcurl .... .. log4jdbc.log4j2.properties 파일 log4jdbc.drivers= !!데이터베이스 드라이버 추가!! log4jdbc.spylogdelegator.name=net.sf.log4jdbc.log.slf4j.Slf4jSpyLogDelegator log4jdbc.dump.sql.maxlinelength=0 추가
애플리케이션을 실행할 때 특정 코드를 실행하고 싶을때 CommandLineRunner 와 ApplicationRunner를 사용한다. CommnadLineRunner /** * Interface used to indicate that a bean should run when it is contained within * a {@link SpringApplication}. Multiple {@link CommandLineRunner} beans can be defined * within the same application context and can be ordered using the {@link Ordered} * interface or {@link Order @Order} annotation. * *..
들어가며 자바에서 Http 통신에 대해서 궁금해지면서 스프링의 RestTemplate 이란 걸 어디선가 본 적이 있어서 찾아보다가 JDK 1.1에 있는 순수 자바로만 Http 통신을 할 수 있는 HttpURLConnection 클래스의 사용법도 찾게 되고.. 그걸 또 사용하기 쉽게 추상화한 Apache HttpClient도 알게 되고.. 그런데 이게 버전업을 해서 HttpComponents로 사용된다는 것도 알게 되고.. 결국 마지막에 RestTemplate도 이런 기술을 기반으로 작동한다는 것도 알게 돼서 하나씩 남들이 작성해놓은 블로그를 토대로 작성(카피)해보려고 함. 엄청난 참고 신공 개발환경 Mac OS JDK 11 Intellij SpringBoot 2.3.8 RELEASE API 테스트는 영진..
스프링부트 프로젝트를 처음 생성하면 Application에 작성되어있는 main 이 한줄로 웹 애플리케이션을 실행하고 자동 설정 파일을 읽어서 가져온다. @SpringBootApplication public class DemoApplication { public static void main(String[] args) { SpringApplication.run(DemoApplication.class, args); } } @SpringBootApplication 를 타고 들어가본다. @Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) @Documented @Inherited @SpringBootConfiguration @EnableAutoCon..
@Controller 어노테이션은 클래스레벨에서 사용되며 @Controller 어노테이션이 붙은 클래스는 SpringMVC에서 웹 요청을 처리하는 컨트롤러로 사용할 수 있다. @RequestMapping 어노테이션은 Spring MVC 에서 클라이언트의 요청을 클래스 또는 메소드에 HTTP method를 맵핑할 때 사용하는 어노테이션이다. @Controller public class SampleController{ @RequestMapping(value="/event", method=RequestMethod.GET) public String eventList(){ return "event"; } } 간단한 컨트롤러를 만들어보았다. event 요청을 HttpMethod.Get으로 받는 eventList 메..
spring-core.jar 에 org.springframework.util 패키지 밑에는 개발에 도움이 되는 여러 클래스들이 있다. 그 중에 StringUtils라는 추상클래스가 있는데 이 클래스는 String을 다루는데 편리한 기능들이 몇개 있는 것 같아서 정리해본다. 실제로 들어가서 소스를 보면 도움이 많이 될 것 같다. @Deprecated는 제외 메서드 위에 친절히 어떻게 사용하는지 설명도 되어있고 예제도 있다. 보통 개발하다가 만들어야 될 공통 함수들이 웬만한 것은 정의되어 있는 것 같다. hasLength hasLength 메서드는 자료형으로 char 나 String을 받을 수 있게 오버로딩 되어있는데 단순히 파라미터가 null 이거나 "" 비어있는 문자 일경우 false를 반환하고 나머지 ..
- Total
- Today
- Yesterday
- LocalDate
- JavaScript
- LocalDateTime
- svn
- jQuery
- mybatis config
- Spring
- maven
- input
- docker
- Linux
- Bash tab
- Kotlin
- Java
- localtime
- 오라클
- rocky
- config-location
- intellij
- Spring Security
- Github Status
- mybatis
- window
- springboot
- oracle
- Mac
- 베리 심플
- elasticsearch
- 북리뷰
- 프로페셔널 스튜던트
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |