목록Java (21)
main

* Spring MVC Project 안 보여서 그냥 STS3 따로 설치해서 사용했음. 1. Help > Eclips Marketpalce > Spring Tools 3 Add-On for Spring Tools4 설치 2. 기존에 설치된 플러그인과 충돌이 있는것으로 보인다. 설치를 취소하려면 cancel을 클릭, sts3 for sts4 설치를 진행하려면 update my installation~~~ 선택한다. 이때 Spring Tool Suite 4 Main Feature이 삭제된다. 3. 설치가 끝나면 STS 재시작 후, spring legacy project 생성 가능

톰캣 공식 사이트 https://tomcat.apache.org/whichversion.html Apache Tomcat® - Which Version Do I Want? Apache Tomcat® is an open source software implementation of a subset of the Jakarta EE (formally Java EE) technologies. Different versions of Apache Tomcat are available for different versions of the specifications. The mapping between the specifications tomcat.apache.org 설치 및 설정 1. Java version에 맞는 T..

에러 Springboot 에서 Test case 작성 중 fail() 메소드 사용 할 때 에러가 발생하였다. import static org.assertj.core.api.Assertions.*; import static org.junit.jupiter.api.Assertions.*; fail("에러가 발생해야 합니다."); Ambiguous method call. Both 원인 동일한 이름을 가진 method가 중복 되어서 발생한 에러. 두 개의 Assertions 가 모두 static으로 import 되어 있어서 발생하였다. 해결 import static org.assertj.core.api.Assertions.*; import static org.junit.jupiter.api.Assertions...

1. 의존성(Dependency) 추가 build.gradle 수정 dependencies { implementation 'org.springframework.boot:spring-boot-devtools' } 참고) dependencies 우클릭 > Generate > Add dependency > 검색 > Add 로 추가 가능 2. IntelliJ 설정 1) Setting > Build, Exeution, Deployment > Compiler > Build project autiomaically 체크 2) Advanced Settings > Allow auto-make to start even if developed application is currently running 체크 3. Load Gr..
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int N = Integer.parseInt(br.readLine()); int[] arr = new int[N + 1]; int count = 0; // 에라토스테네스의 체 arr[1] = 1; // 1은 소수 아님. for (int i = 2; i < arr.length; i++) { if (arr[i] == 0) { count++; // 소수일 때, count ..