In the field of observation, chance favors only the prepared maind.
오직 준비된 자만이 중요한 것을 관찰하는 기회를 잡을 수 있다
- 루이 파스퇴르
In the field of observation, chance favors only the prepared maind.
오직 준비된 자만이 중요한 것을 관찰하는 기회를 잡을 수 있다
- 루이 파스퇴르
@SuppressWarning
언젠가부터 자꾸자꾸 여기저기에
이클립스가 권해주는 어노테이션이죠.
이건 컴파일러가 일반적으로 경고하는 내용 중
"이건 하지마"하고 제외시킬 때 쓰입니다.
따라서 어떤 경고를 제외시킬지 옵션을 줄 수 있어요.
몇 가지 정리해보면
이 외에도 hiding, incomplete-switch, nls, restriction, serial, static-access 등의 옵션이 있어요.
사용 예는 아래와 같습니다.
@SuppressWarnings("unused")
참고로 unused는 컴파일러 경고가 발생하는 코드 거의 모든 부분 상단에 배치가 가능해요
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"> <property name="maxUploadSize"> <value>10000000</value> </property> <property name="uploadTempDir" ref="uploadDirResource" /> </bean> <bean id="uploadDirResource" class="org.springframework.core.io.FileSystemResource"> <constructor-arg> <value>D:/Temp/fileupload/temp/</value> </constructor-arg> </bean> |
public class AttachFile { Integer fileId; // 파일ID String userFileName; // 실제 파일명 String saveFileName; // 경로포함된 파일명 String contentType; // content-type Long fileSize; // 파일 사이즈 .......... getter/setter 생략 } |
public class FileUploadBean { Integer fileUploadId; String name; AttachFile file1; // 파일 1 AttachFile file2; // 파일 2 AttachFile file3; // 파일 3 ............ getter/setter 생략 } |
public class FilePropertyEditor extends PropertyEditorSupport { if (multipartFile.isEmpty()) { String uploadTempDir = makeUploadTempDir() + File.separator; public String getUploadRepository() { public void setUploadRepository(String uploadRepository) { |
<bean id="filePropertyEditor" class="caps.support.propertyeditor.FilePropertyEditor" singleton="false" > <property name="uploadRepository"> <value>C:\temp\fileupload\upload\</value> </property> </bean> |
Spring Transaction #2 (0) | 2014.10.01 |
---|---|
Spring Transaction #1 (0) | 2014.10.01 |
VO, DTO, DAO (0) | 2013.07.08 |
domain object에 대한... (0) | 2013.07.08 |
Spring Java Mail (0) | 2013.07.05 |