Java/Spring Boot(70)
-
Spring boot 소스 변경시 자동으로 restart하기
pom.xml에 아래 내용 추가 org.springframework.boot spring-boot-devtools runtime자동 build 설정: Project > Build Automatically 체크
2024.12.07 -
Spring boot 이미지 stream 또는 base64로 넘기기
StreamSpring bootimport org.springframework.core.io.Resource;import org.springframework.core.io.UrlResource;import org.springframework.http.HttpHeaders;import org.springframework.http.MediaType;import org.springframework.http.ResponseEntity;import org.springframework.web.bind.annotation.GetMapping;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.bind.a..
2024.12.05 -
Spring boot 이미지 Map으로 전달하기
Spring boot@RestController@RequestMapping("/api")public class ResourceController { @GetMapping("/resource-with-map") public ResponseEntity> getResourceWithMap() throws IOException { // Load the resource (example: an image) Path imagePath = Paths.get("/path/to/your/image.jpg"); Resource resource = new UrlResource(imagePath.toUri()); if (!resource.exists() || !res..
2024.12.05 -
Spring boot URL로 access되지 않는 이미지 웹으로 전달하기
Spring bootimport org.springframework.core.io.Resource@RestController@RequestMapping("/images")public class ImageController { @GetMapping("/{imageName}") public ResponseEntity getImage(@PathVariable String imageName) throws IOException { Path imagePath = Paths.get("/path/to/your/private/images/" + imageName); Resource resource = new UrlResource(imagePath.toUri()); if (..
2024.12.05 -
STS Javascript 자동완성 지원 설정
Help > Install New Software.Update: https://download.eclipse.org/wildwebdeveloper/releases/latest/ Eclipse software repository | The Eclipse FoundationThe Eclipse Foundation - home to a global community, the Eclipse IDE, Jakarta EE and over 360 open source projects, including runtimes, tools and frameworks.download.eclipse.org재시작
2024.12.01 -
STS4 javascript 메뉴가 보이지 않는 경우
참조: https://www.egovframe.go.kr/home/qainfo/qainfoRead.do?pagerOffset=0&searchKey=&searchValue=&menuNo=69&qaId=QA_00000000000020192 묻고 답하기 | 표준프레임워크 포털 eGovFrame처리중입니다. 잠시만 기다려주십시오.www.egovframe.go.krjavascript 메뉴가 제대로 지원이 안되서 발생한 문제Help > Install New Software 추가: http://download.eclipse.org/releases/photon 선택: [Web, XML, Java EE ~~] > [JavaScript Development Tools] 재기동
2024.11.30