본문 바로가기

IT34

Spring Security 기본 API, filter 1. 스프링 시큐리티 시작 (dependency 추가) maven - pom.xml org.springframework.boot spring-boot-starter-security gradle - build.gradle implementation 'org.springframework.boot:spring-boot-starter-security'2. SecurityConfig 설정 클래스를 만들어 보안 및 인가 필터 설정 import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org... 2021. 7. 8.
XML to JSON 변환하기 (java) open API 사용 중 데이터를 XML를 리턴해 주는 경우가 있습니다. 서버사이드에서 XML을 JSON으로 파싱하여 넘겨 주기 위한 방법 입니다. 우선 필요한 dependency를 추가합니다. org.json commons-io //gradle의 경우 url을 읽어 String에 넣는 code String urlStr = "api_url"; URL url = new URL(urlStr); BufferedReader bf; bf = new BufferedReader(new InputStreamReader(url.openStream(), "UTF-8")); String result = bf.readLine(); xmlToJson(result); xml을 Json으로 파싱하는 code public void .. 2021. 6. 8.
[DBever] auto-commit 설정/해제 mac 기준 설정방법입니다. 1. Preferences를 클릭합니다. ( 단축키 commend + , ) 2. 연결 -> 연결유형 -> Auto-commit by default 체크/해제 위와 같이 작업하면 auto-commit을 설정 및 해제 할 수 있습니다. 메뉴 -> 데이터베이스 -> 트랜잭션 모드 -> Manual Commit으로 설정하면 커밋 및 롤백 버튼이 활성화 됩니다. 2021. 5. 27.
Error와 Exception Error : 컴파일 시 문법적인 오류와 런타임 시 발생하여 프로세스에 심각한 문제를 야기 시켜 프로세스를 종료 시킬 수 있습니다. Exception과 다르게 에러가 발생할 경우 코드를 고치지 않고서는 해결이 불가능 합니다. ex) StackOverflowError, OutOfMemoryError Exception : 컴퓨터 시스템의 동작 도중 예기치 않았던 이상 상태가 발생하여 수행 중인 프로그램이 영향을 받는 것을 의미 합니다. Checked Exception, Unchecked Exception 두 종류의 예외가 존재 합니다. Checked Exception과 Unchecked Exception Checked Exception Unchecked Exception 처리여부 반드시 예외처리 해야함 명시.. 2021. 4. 8.
반응형