목록Server (101)
써먹는 웹개발
인터페이스를 객체 생성하여 사용하기 - 인터페이스 interface IRequest { id: number; userId: number; interfaceYn: string; } - 객체 생성 const iRequest: IRequest = { id: 1, userId: 2, interfaceYn: 'Y' };
1. TS2339: Property does not exist on type - :(콜론)을 제대로 안쓴 에러였다. 수정 전 1 2 private static getFindById(id: number) string { } Colored by Color Scripter cs 수정 후 1 2 private static getFindById(id: number): string { } Colored by Color Scripter cs 2. TS2304: Cannot find name 'asyn' - asyn 오타 => async로 변경

로컬 환경에서 프로젝트의 jar파일을 연동할때는 Java Build Path로 사용하는데 서버에 올리면 해당 파일을 못 찾는다고 에러가 난다. 여기서 처리방법은 서버에 tomcat 경로 아래 lib 폴더에 jar파일을 추가하면 된다. ※ (Filezlia 등에서) 파일 옮기기가 안되면 옮기기 가능한 위치까지 이동시키고 복사하면 됩니다.
1. Spring > Tomcat 환경에서 수정 web.xml에 소스 추가 : COOKIE -1 COOKIE 2-1. Spring Boot 환경에서 수정 spring boot 1.x - application.yml server: session: tracking-modes: cookie spring boot 2.x - application.yml server: servlet: session: tracking-modes: cookie ※ 2번 출처 : https://ddasi-live.tistory.com/76
Spring Boot 에러 Whitelabel Error Page the request was rejected because the url contained a potentially malicious string ";" 해결방법입니다. WebSecurityConfigurerAdapter를 상속받은 파일에 16~24번줄 소스 추가 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 // ... import org.springframework.security.config.annotation.web.builders.WebSecurity; import org.springframework.security.web.firewall.DefaultHttp..
1. build path가 jre로 설정되어있는 경우 - jdk로 build path 변경후에 다시 받을 것 2. pom.xml이 에러났는지 확인할 것 - 에러났으면 수정후에 다시 Maven Update
원인 : 서버가 리로드될때 어플리케이션을 리로드하고, jdbc 연결할때마다 어플리케이션을 리로드하는데 서버가 리로드된 어플리케이션을 다시 리로드하기 때문에 jdbc 재연결할때마다 서버가 리로드되어 메모리 누수가 생김 해결방법 : mybatis 에 dependency에 있는 jdbc connection driver 제거후에 톰캣홈/lib에 드라이버 추가 참고 1. https://okky.kr/articles/490470 2. https://velog.io/@shson/%ED%86%B0%EC%BA%A3%EB%A1%9C%EA%B7%B8%EC%97%90%EC%84%9C-jdbc-%EB%A9%94%EB%AA%A8%EB%A6%AC%EB%A6%AD-%EC%9B%8C%EB%8B%9D%EC%9D%B4-%EB%9C%B0%..