개발기술 (119) 썸네일형 리스트형 배치처리 배치 처리란?한꺼번에(일괄로) 많은 데이터를 처리하는 방식. 주로 사용자 개입 없이, 예약된 시점에 자동 실행됨 배치 처리의 구성 요소 (Spring 기준)Spring에서는 보통 @Scheduled 또는 Spring Batch를 이용해 구현해. @Scheduled (간단한 주기성 작업)가볍고 단순한 배치에 적합트랜잭션/재시도/병렬처리 기능 없음@Scheduled(cron = "0 0 0 * * *") // 매일 자정public void sendDailyReport() { // 작업 수행} Spring Batch (전문 배치 프레임워크) @Beanpublic Job myJob() { return jobBuilderFactory.get("myJob") .start(step1()) .. 파일서빙 전략, 표준 그리고 구현 파일 서빙 전략1. 주체별 분류누가 실제로 클라이언트에 파일을 보내주는가?분류설명예시앱(Java( 서버에서 직접 응답Java에서 InputStream → OutputStream으로 전달바이트 스트림 방식웹(Ngnix, S3) 서버에서 정적 서빙클라이언트가 직접 정적 파일 서버에 요청해서 받음Nginx /files/, S3 public 버킷앱 + 웹 연계(Java 인증 후 Nginx 서빙)Java가 인증/권한 체크 후 Nginx로 위임X-Accel-Redirect 등으로 우회시킴CDN글로벌 캐시 서버가 등록된 파일을 대신해서 전송해주는 전송 대행 서비스CloudFront, Cloudflare주체별 분류 : Java 직접 응답바이트 스트림 방식 (Java 등에서 직접 처리)Java (Spring 등)에서 I.. Static File Upload Generalized Static File Upload WorkflowClient uploads a file (MultipartFile)Client (frontend or mobile) sends a multipart/form-data request:POST /uploadContent-Type: multipart/form-data--boundaryContent-Disposition: form-data; name="file"; filename="image.jpg"Content-Type: image/jpeg (binary data) Server stores the file (locally or in cloud) and returns a public-accessible URL@PostMapping("/u.. Java 리플렉션, 제네릭 Class클래스 자체도 객체로 표현한 것으로, 특정 타입(T)의 Class 객체를 의미해요. 해당 클래스의 정의(필드, 메서드 등)에 대한 정보를 담은 객체를 반환합니다.Class clazz = String.class;System.out.println(clazz.getName()); // java.lang.StringSystem.out.println(clazz.getDeclaredFields()); // 필드 정보들 리플렉션클래스, 필드, 메서드, 생성자 등의 정보를 런타임에 동적으로 조회하거나 조작할 수 있게 해주는 기능즉, Java에서 "클래스나 메서드 등의 정보를 코드로 다루는 기능"이에요.이 모든 건 Class 객체를 통해 시작됨정적(static) 인스턴스 생성 방식컴파일 타임에 타입이 명확히 정.. 자바스크립트 내장함수 JavaScript 언어 자체의 기능JavaScript 엔진(V8, SpiderMonkey 등)**에서 제공하는 기능으로 어디서든 동작 가능 (브라우저, Node.js, 서버 등) JavaScript KeywordIn Operator(javascript property in object) : The in operator returns true if the specified property is found in the specified object or its prototype chain. Its syntax is: String Object MethodStringinstance.toUpperCase() : 문자열을 대문자로 변환 후 반환함Stringinstance.length() : 문자열의 길이를 반환.. Tomat And Netty Tomcat vs Netty — What's the Difference? Feature / AspectTomcatNettyBuilt forServlet-based web apps (Spring MVC)General-purpose networking (low-level)I/O modelBlocking or semi-blockingFully non-blocking, event-drivenProtocolsHTTP/1.1, some HTTP/2HTTP/1.1, HTTP/2, WebSocket, TCP, UDPUse caseTraditional web serversReactive systems, custom protocolsAbstraction levelHigh (Servlets, Filters)Low (Chan.. Java Blocking I/O vs non-Blocking I/O 1.. JDBC (Database Access)java복사편집String name = jdbcTemplate.queryForObject("SELECT name FROM users WHERE id = ?", String.class, 1); 🔒 Blocking behavior:The current thread sends the SQL query over the network to the DBThe thread waits (blocks) until the DB returns a responseNo other work happens on that thread until the DB reply is received📌 JDBC is a blocking API, always🔸 2. RestTemplate (HT.. JavaScript, Node JS, Event-Driven Programming 그리고 Java, Spring, MultiThreading - java와 javascript의 스타일 차이. 태생이다르다- node js의 등장- epoll과 같은 os method의 발전- java의 발전 프로그래밍 스타일 비교 Java Style: Sequential and ConditionalIn Java, you call a function, wait for the result, and then use if statements to control logic: @RestControllerpublic class UserController { private final UserService userService; public UserController(UserService userService) { this.userService = use.. 이전 1 2 3 4 ··· 15 다음