본문 바로가기

오류노트37

intellij gradle java file outside of source root 인텔리제이에서 스프링 부트 프로젝트를 생성하고 그 프로젝트안에서 new > Module로 스프링부트 프로젝트를 또 생성하였다. 그렇게 잘 사용하던중 인텔리제이를 업데이트하고 나는 추가한 모듈 프로젝트 중에 하나가 위와같은 오류가 나오며 실행이 안되는 현상이 발생하였다. 그래서 오류를 찾던중 다음과 같은 방법으로 해결하였다. 1. 인텔리제이 우측 gradle 탭에서 실행이 안되는 모듈을 삭제한다. 2. 삭제가 되면서 다시 gradle을 인식을 하는 창이 다음과 같이 뜬다 3. Load gradle project를 클릭하면 다시 gradle 모듈이 표시된다. 4. 이후 다시 모듈을 run시켜면 제대로 스프링 부트가 start가 된다. 2021. 4. 15.
The specified project directory '프로젝트 디렉토리' does not exist 인텔리제이로 개발을 하다보면 The specified project directory '프로젝트디렉토리' does not exist. 오류가 나오는걸 볼수 있다. 나의 경우는 인텔리제이에서 gradle를 사용할경우 나오는 오류 메세지이다. 이런 오류가 생기는 이유는 새 모듈을 하나 생성했지만 잘못 생성하여 삭제후 다시 생성한경우 위와 같은 오류가 났다. 이런 경우에는 인텔리제이 우측탭에서 gradle를 선택하고 생성하고 지운 모듈을 삭제해주면 된다. 인텔리 제이에서 모듈삭제시에 gradle 탭에있는 프로젝트까지 삭제하지 않아서 생기는 문제이다. 참조: stackoverflow.com/questions/49598291/the-specified-project-directory-does-not-exist 2021. 4. 5.
스프링 시큐리티 thymeleaf에서 sec:authentication이 안될때 build.gradle에 compile('org.springframework.boot:spring-boot-starter-thymeleaf') 추가한다음 springsecurity를 사용할수 있게 extra도 추가해야한다. // https://mvnrepository.com/artifact/org.thymeleaf.extras/thymeleaf-extras-springsecurity5 implementation group: 'org.thymeleaf.extras', name: 'thymeleaf-extras-springsecurity5', version: '3.0.4.RELEASE' 2021. 4. 3.
springboot option 403 cors 서버에 적용중 option 403 오류로 api서버 호출이 안되는 현상 발생 @Bean public WebMvcConfigurer corsConfigurer(){ return new WebMvcConfigurer() { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**") .allowedOrigins("http://localhost:3000") .allowedOrigins("https://www.domain.net"); } }; } allowedOrigins에 도메인 추가해주어야함 2021. 3. 17.
aws 로드밸랜서 등록후 nginx 503 Service Temporarily Unavailable 발생시 aws 로드밸랜서 등록후 나오는 503에러 해결방법 로드밸랜서의 대상그룹에 등록된 대상이 없을때 나는 오류 대상그룹에서 사용할 ec2 인스턴스를 등록한다. 참조: docs.aws.amazon.com/ko_kr/elasticloadbalancing/latest/application/load-balancer-troubleshooting.html#http-503-issues Application Load Balancer 문제 해결 - Elastic Load Balancing 이 페이지에 작업이 필요하다는 점을 알려 주셔서 감사합니다. 실망시켜 드려 죄송합니다. 잠깐 시간을 내어 설명서를 향상시킬 수 있는 방법에 대해 말씀해 주십시오. docs.aws.amazon.com 2021. 3. 17.
aws 에서 https 설정후 접속이 안될때 확인사항 aws에서 https 설정시에 로드밸런스 생성후 https로 접속을 할수 있다. 이때 설정을 다 했는데도 접속이 안되는경우가 있는데 이럴경우 보안그룹이 어떤게 선택되었는지 확인해보아야 한다. 로드밸런스 생성시에 다른 보안그룹을 선택하지 않았다면 기본 보안그룹이 선택되는데 기본 보안그룹은 사용자가 인바운드포트를 설정하지 않은경우 인바운드 포트가 셋팅된게 없기 때문에 http로 접속시에 사이트에 연결할수 없음 메세지가 뜬다. 이런경우 생성된 로드밸런스에서 보안그룹 편집에 들어가서 443포트가 열린 보안그룹을 선택해주면 된다. 어떤 보안그룹에 443포트가 열린지 모를때는 보안그룹 메뉴에서 확인을 한다. 확인하는 메뉴는 네트워크 및 보안> 보안그룹 에서 보안그룹 ID를 클릭하면 인바운드 규칙에서 확인할수 있다... 2021. 3. 17.
Uncaught Error: ErrorComponent(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null. 리액트에서 다음과 같은 오류가 날때 Uncaught Error: ErrorComponent(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null. function ErrorComponent({show,setError,message,type}){ const [close, setClose] = useState(show); useEffect(()=>{ setClose(show) },[show]) const handleClose = () => { setClose(false); setError(false); return 0; } const err.. 2021. 3. 16.
스프링부트 jwt Handler dispatch failed; nested exception is java.lang.StackOverflowError 스프링 부트 적용중 스택 오버플로우 오류발생 원인은 다음 코드에 있음 authenticationManager() -> authenticationManagerBean()으로 바꿔줘야 함 public class SecurityConfig extends WebSecurityConfigurerAdapter { @Bean @Override public AuthenticationManager authenticationManager() throws Exception{ return super.authenticationManagerBean(); } 출처 : stackoverflow.com/questions/61594513/while-try-to-authenticate-my-login-i-am-getting-error-h.. 2021. 3. 13.
스프링부트 : Could not autowire authentication manager 에러 참조 : stackoverflow.com/questions/49348551/could-not-autowire-authentication-manager-in-spring-boot-2-0-0/50163092 Could not autowire authentication manager in Spring Boot 2.0.0 So I've been trying to implement oAuth2 in a simple Spring MVC app. In the guide I was following, in their AuthorizationServerConfigurerAdapter they @Autowired an AuthenticationManager. They used ... stackoverflow.com Web.. 2021. 3. 13.
Java validation @Max @Min이 적용이 안될때 @Max @Min 는 Nubmer타입에만 적용이된다. @Min(1) @Max(255) String name; 이렇게 사용하면 계속 exception이 발생한다. 문자열 타입에는 다음과 같이 쓴다. @Size(min = 1, max = 255) String name; Number 타입일때 @Min(1) @Max(255) int number; 출처: stackoverflow.com/questions/11189398/difference-between-sizemax-value-and-minvalue-maxvalue difference between @size(max = value ) and @min(value) @max(value) I want to do some domain validation in my ob.. 2021. 3. 10.