SpringBoot (4) 썸네일형 리스트형 [Spring/IntelliJ] This generated password is for development use only. Your security configuration must be updated before running your application in production. 오류 해결 Spring Security 스프링 시큐리티를 적용한 프로젝트 진행 중 빌드도 잘되고 런도 되는데 Postman에서 다른 api를 테스트 하려고 하면 아무 결과값이 나오지 않고 해당 문구가 떴다. 찾아보니 build.gradle에 시큐리티 관련한 implements들 때문에 자동으로 적용되어 그런 것이었고, 나는 아직 시큐리티 모듈을 만들어만 놓고 다른 브랜치에서 관리하고 있었기 때문에 필요가 없었다. 그래서 우선은 다 주석 처리 해놓고 돌렸더니 api 테스트가 잘 되는 걸 확인할 수 있었다. //security //implementation 'org.springframework.boot:spring-boot-starter-security' //implementation 'org.springframewo.. [Spring/JPA]스케줄러 Scheduler 사용하기 먼저 annotation 추가를 해야한다. 프로젝트 클래스에 @EnableScheduling 어노테이션을 추가 스케줄러 자바 메소드에 @Scheduled 어노테이션을 추가 나는 Scheduler 클래스를 따로 정의해서 그 안에 해당 메소드를 추가했다. 한시간에 한 번, *시 5분에 조회수를 초기화해주는 로직이다. CRON 표현식 cron = * * * * * * 일 때, 맨 왼쪽부터 초 / 분 / 시 / 일 / 월 / 요일 [Spring/JPA] Request processing failed; nested exception is java.lang.NullPointerException 오류 해결 이 오류는 서버가 해당 요청을 충족시키지 못하게 하는 예기치 않은 조건을 맞닥뜨렸을 때 나타난다. 예기치 않은 조건에는 수많은 것들이 있기 때문에 로그에 찍힌 root cause를 보고 어떤 코드에서 생긴 오류인지 알아내야 한다. 나의 경우에는 Controller에서 Service의 특정 함수를 호출하는 곳에서 오류가 난 것으로 보였다. - 오류난 코드 결론적으로는 호출한 service를 private으로 정의해서 생긴 문제였다. private을 private final로 수정하였더니 오류가 해결되었다. //수정 전 private FollowService followService; //수정 후 private final FollowService followService; [Android/Kotlin] Retrofit2 설정부터 코드까지 1. build.gradle 에 추가 //Retrofit implementation "com.squareup.retrofit2:retrofit:2.9.0" implementation "com.squareup.retrofit2:converter-gson:2.9.0" implementation "com.squareup.retrofit2:adapter-rxjava2:2.9.0" 2. manifest 파일에 internet permission 추가 **주의할 점 만약 직접 기기를 연결해서 테스트 중이라면 기기도 인터넷에 연결되어 있어야 한다. 3. data class 에 response 받을 데이터 정의 data class PostListResponse( @SerializedName("isSuccess") va.. 이전 1 다음