해당 터미널 정보 안내 사이트에서 서울특별시 ~ 제주도 지역의 리스트를 크롤링해서 엑셀로 뽑는것을 해보겠습니다. 터미널 정보 > 터미널 안내 (bustago.or.kr) 터미널 정보 > 터미널 안내 www.bustago.or.kr 프로젝트 구조 MakeExcel.java package com.crawlling.common; import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Map; import javax.servlet.http.HttpServletRequ..
프로젝트를 여러개 진행하다보면 기본적으로 라이브러리가 .m2 폴더안에 repositry 폴더에 저장이 됩니다. 프로젝트 라이브러리들이 한 폴더에 섞이기 때문에 repository 경로를 각각 지정하여 프로젝트별 라이브러리를 따로 관리하는게 좋습니다. 그래서 maven repository 경로를 지정하는 방법을 포스팅 하겠습니다. 1. settings.xml, repository 폴더 생성 settings.xml C:\project\meta_workspace\repository true false -> localRepository 경로는 라이브러리를 저장하고자 하는 경로로 수정하셔야 됩니다. 2. windows - preferences user settings 검색 - User Settings input란..
한프로젝트에 postgressql과 oracle 데이터베이스를 동시에 쓰고싶을때 사용하는 방법입니다. application-properties #Oracle spring.oracle.datasource.hikari.driver-class-name=net.sf.log4jdbc.sql.jdbcapi.DriverSpy spring.oracle.datasource.hikari.jdbc-url=jdbc:log4jdbc:oracle:thin:@ip주소:port번호:데이터베이스이름 spring.oracle.datasource.hikari.username=아이디 spring.oracle.datasource.hikari.password=패스워드 spring.oracle.datasource.hikari.maximum-po..
Controller.java import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.dataformat.xml.XmlMapper; //타입이 json일경우 String resultType = "json" //String resultType = "xml" if("xml".equals(resultType)) { response.setContentType("application/xml"); response.setCharacterEncoding("UTF-8"); response.getWriter().write(new XmlMapper().writeValueAsString(result)); } //타입이 json일경우 els..
build.gradle //email implementation 'org.springframework.boot:spring-boot-starter-mail' application-properties spring.mail.host=smtp.gmail.com spring.mail.port=587 spring.mail.username=gmail 아이디 spring.mail.password=gamil 패스워드 spring.mail.properties.mail.smtp.starttls.enable=true spring.mail.properties.mail.smtp.starttls.required=true spring.mail.properties.mail.smtp.auth=true EmailController.ja..
SecurityConfig.java package com.chatting.config; import com.chatting.common.Constants; import com.chatting.common.Url; import com.chatting.service.CustomUsersDetailService; import lombok.RequiredArgsConstructor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Bean; import o..