반응형 Annotation2 Custom Annotation 생성하기 @interface 알짜만 빼먹기 @Annotation을 생성하는 방법에 대해 알아보겠습니다. 1. annotation의 생성 annotation은 @interface로 생성할 수 있습니다. public @interface CustomAnotation{}; 이렇게 생성한 어노테이션은 어디에든 붙여서 사용할 수 있습니다. @CustomAnnotation @RequiredArgsConstructor public class TestController { @CustomAnnotation private final TestService service; @CustomAnnotation @GetMapping(value="hello") public String getPage(){ return "hello" } } 2. Meta Annotation의 종류.. Programing/JAVA 2022. 11. 15. Spring Boot Multiple Database Configuration + Mybatis +HikariCP, MySQL, Oracle, Using Mapper annotation Spring Boot Multiple Database Configuration + Mybatis +HikariCP, MySQL, Oracle, Using Mapper Annotation 스프링 부트에서 멀티 Database 연결 설정 Mybatis + HikariCp, MySql, Oracle, 어노테이션 방식 Spring Boot version : 2.1.1 Gradle spring boot 2.0.0 이상부터는 DBCP는 HikariCP가 기본입니다. 스프링 부트, Mybatis 환경에서 Oracle과 Mysql로 멀티 데이터베이스 연동하는 방법을 알아보겠습니다. 우선 필요한 라이브러리의 의존성 주입을 합니다. dependencies { compile('org.springframework.boot:s.. Programing/JAVA 2019. 4. 2. 이전 1 다음 💲 추천 글 반응형