본문 바로가기
반응형

json5

[Java] 파일 안의 데이터 읽고 파일 이동시키기 이전글https://greed-yb.tistory.com/255 [JAVA] 파일 생성, 삭제, 쓰기, 이름변경, 이동, 복사, 읽기 하기파일 생성import java.io.File;public class FileUtil { public static void main(String args[]) throws Exception{ try{ // 만들 파일 이름 및 경로 지정 File file = new File("src/main/resources/config/config.txt"); file.createNewFile(); }catch (Excgreed-yb.tistory.com 배치로 전달받은 txt, xml 등의 json 데이터가 있는 파일들을 읽고데이터 parsing 과 파일을 이동시켜야 하는 코드가 .. 2025. 6. 1.
[SpringBoot] Ajax 통신으로 json 주고 받기 매번 잘 사용하면서도 잠깐 안 쓰다 보면 잊어버리길래 정리를 해보려 한다. Ajax 를 사용하려면 jQuery를 사용해야 한다.Jquery 사이트에서 복사해 오면 된다 https://releases.jquery.com/html 또는 jsp 의 태그 안에 넣고 사용하자!   Ajax 구조 $.ajax({ url : "", // 이동 경로 type : "", // 대소문자 가리지 않음 - GET , POST , PUT , DELETE async : true, // 기본값은 true , true : 비동기 , false : 동기 dataType : "", .. 2024. 7. 4.
[JAVA] REST API 구현하기(API KEY) - Postman 이용 https://greed-yb.tistory.com/235 [Java] google json-simple 사용하기 dependency // gradle implementation group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1.1' implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.5' // maven com.googlecode.json-simple json-simple 1.1.1 com.google.cod greed-yb.tistory.com 해당 글의 GSON 이용 Spring Boot Mybatis Gradle IntelliJ Ultima.. 2023. 9. 7.
[Java] org.json 사용하기 dependency // gradle // https://mvnrepository.com/artifact/org.json/json implementation group: 'org.json', name: 'json', version: '20230227' // maven org.json json 20180813 JSONObject public class RunTestController { public static void main(String[] args) throws Exception { /** * Json 넣기 */ JSONObject jsonObject = new JSONObject(); jsonObject.put("id", "흰둥이"); jsonObject.put("password", "1234");.. 2023. 5. 8.
[HttpsUrlConnection] 인증서 GET/POST JSON 통신 Http 가 아닌 Https 다 회사에서 사용하는 인증서가 따로 있어서 인증서 생성하는 과정은 생략 했다 Get 방식 package com.example.practice.controller; import javax.net.ssl.HostnameVerifier; import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSession; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.Malforme.. 2023. 5. 6.
반응형