서버 작업을 하다보면, PC에 있는 파일을 서버에 올리거나, 서버에 있는 로그파일을 PC로 받고 싶을 때가 있습니다. 그런 용도로 저는 다운로드를 할 때는 Winstone을, 업로드를 할 때는 간단한 웹애플리케이션인 만든 Uploader 를 사용합니다.
제 블로그의 아래 포스트를 통해서 그 방법을 설명했었습니다.
또는 파이썬이 설치되어 있아면 'python -m SimpleHTTPServer'를 실행하면 간단한 웹서버를 띄울 수도 있습니다.
| import static com.sun.btrace.BTraceUtils.*; | |
| import com.sun.btrace.BTraceUtils.Aggregations; | |
| import com.sun.btrace.BTraceUtils.Sys; | |
| import com.sun.btrace.aggregation.Aggregation; | |
| import com.sun.btrace.aggregation.AggregationFunction; | |
| import com.sun.btrace.annotations.BTrace; | |
| import com.sun.btrace.annotations.Duration; | |
| import com.sun.btrace.annotations.Kind; | |
| import com.sun.btrace.annotations.Location; | |
| import com.sun.btrace.annotations.OnEvent; |
| total = 0 | |
| for i in range (1,11): | |
| total += pow(i-1,2) + pow(i,2) | |
| print total |
| <%@ page contentType="text/html; charset=UTF-8" session="false"%> | |
| <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> |
| <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> | |
| <fmt:message key="main_hello"> | |
| <fmt:param>benelog</fmt:param> | |
| </fmt:message> |
| package edu.tdd.aop; | |
| import org.aspectj.lang.JoinPoint; | |
| import org.aspectj.lang.annotation.Aspect; | |
| import org.aspectj.lang.annotation.Before; | |
| @Aspect | |
| public class LogAspect { | |
| private LogRepository repository; |
| package net.benelog.quiz; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| public class RankFinder<T extends Comparable<T>> { | |
| private List<T> topValues; | |
| private int rankToFind; |
| <bean id="dateEditor" class="org.springframework.beans.propertyeditors.CustomDateEditor"> | |
| <constructor-arg> | |
| <bean class="java.text.SimpleDateFormat"> | |
| <constructor-arg value="yyyy/MM/dd HH:mm:ss" /> | |
| </bean> | |
| </constructor-arg> | |
| <constructor-arg value="true" /> | |
| </bean> | |
서버 작업을 하다보면, PC에 있는 파일을 서버에 올리거나, 서버에 있는 로그파일을 PC로 받고 싶을 때가 있습니다. 그런 용도로 저는 다운로드를 할 때는 Winstone을, 업로드를 할 때는 간단한 웹애플리케이션인 만든 Uploader 를 사용합니다.
제 블로그의 아래 포스트를 통해서 그 방법을 설명했었습니다.
또는 파이썬이 설치되어 있아면 'python -m SimpleHTTPServer'를 실행하면 간단한 웹서버를 띄울 수도 있습니다.
| @Test | |
| public void batchUpdateTest(){ | |
| SqlParameterSource[] source = new SqlParameterSource[]{new MapSqlParameterSource("id", 1), new MapSqlParameterSource("id", 2),new MapSqlParameterSource("id", 3)}; | |
| int[] updated = simpleJdbcTemplate.batchUpdate("update perform set id=:id where id = :id", source); | |
| System.out.println(Arrays.toString(updated)); | |
| } |