일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- IntelliJ
- java
- ubuntu
- AWS
- Spring Boot
- javascript
- Spring
- springboot
- ReactJS
- laravel
- Design Patterns
- Gradle
- php
- Web Server
- jenkins
- devops
- Git
- it
- tool
- linux
- JPA
- jsp
- 맛집
- Oracle
- docker
- db
- 요리
- redis
- elasticsearch
- MySQL
- Today
- Total
목록Java (237)
아무거나
*** 오류ERROR : Error Message: Type interface com.deploy.model.HistoryMapper is not known to the MapperRegistry.(.xml파일이 읽히지 않을때 -> 즉, 기본적으로 xml파일이 포함되지 않을 때)메이븐 사용시 pom.xml 내의아래 추가[코드내용] src/main/java **/*.xml
*** pom.xml에서 packaging에서 Execution default-testResources of goal ... 에러 날 경우[코드추가] org.apache.maven.plugins maven-resources-plugin 2.4.3
[WARNING] File encoding has not been set, using platform encoding MS949, i.e. build is platform dependent!pom.xml 설정utf-8utf-8
두 개의 리스트를 합치는 방법 두 개의 리스트를 합치기// 기존에 testListOne, testListTwo가 주어졌을때 이 둘을 합친다. List testNewList = new ArrayList(); testList.addAll(testListOne); testList.addAll(testListTwo);
문자 체크 contains(boolean): 문자열에 검색하고자 하는 문자가 있는지 확인String testStr = "문자 체크 테스트 입니다."; if (testStr.contains("테스트")) { System.out.println("문자열 있음"); } else { System.out.println("문자열 없음"); }
Spring Boot + Spring Security + Mybatis + Thymeleaf + Gradle 로그인 기능 구현 [Document] Tistory: https://bkjeon1614.tistory.com/76 Github: https://github.com/bkjeon1614/java-example-code/tree/master/spring-boot-security-mybatis [Development Environment] IntelliJ IDEA Ultimate SpringBoot 2.1.2.RELEASE Java8 Gradle Lombok [Project] 1. 프로젝트 생성 File -> New -> Project 선택 Project 정보 입력 dependency 선택 Project..
Interceptor Desc: Controller에 들어오는 요청 HttpRequest와 Controller가 응답하는 HttpResponse를 가로채는 역할을 한다. Interceptor은 주로 관리자만 접근할 수 있는 관리자 페이지에 접근하기 전에 인증을 하는 용도로 활용한다. 또한 Interceptor는 Servlet의 앞, 뒤에서 HttpRequest, HttpRequest를 가로채는 Filter와 역할이 유사한데 둘은 서로 다르다. 우선 Interceptor에 대해서만 알아보자 Interceptor Class 생성 ... import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; impo..
Optional.ofNullable Optional Class: NULL 체크를 위한 if문 없이도 NullPointerException이 발생하지 않는 보다 간결한고 안전한 코드를 작성하기 위해 사용 Optional.ofNullable// testVal 값이 null이면, NullPointerException을 발생하지 않고 1을 return String testStrVal = null; System.out.println(Optional.ofNullable(testStrVal).map(Integer::valueOf).orElse(1));
@ComponentScan Desc: Stereotype Annotaion이 붙은 Bean들을 자동으로 스캔해서 등록해준다. Stereotype Annotaion(ex: @Component, @Repository, @Service, @Controller 등..)이란 Bean으로 등록하기 위한 Annotation을 뜻함 [Example Code]@ComponentScan("com.bong.myPackage") @ComponentScan(basePackages={"com.bkjeon", "com.bong"}) @ComponentScan({"com.bkjeon", "com.bong"}) @ComponentScan(basePackageClasses=TestCode.class) public interface Te..
스케줄링 Scheduler Spring Boot에서 @EnableScheduling, @Scheduled를 사용한 스케줄링 구현 메인 메소드가 있는 애플리케이션 구동 클래스인 Application.java에 @EnableScheduling 설정 및 @Bean 추가 .... import org.springframework.scheduling.annotation.EnableScheduling; @SpringBootApplication @EnableScheduling public class Application { public static void main(String[] args) { ApplicationContext ctx = SpringApplication.run(Application.class, arg..