반응형 프로그래밍/Spring12 Java Blob byte[] get File mime type Chrome 이나 Firefox 같은 브라우저에서는 상관이 없지만 IE 에서 outputStream 으로 이미지를 표시해줄때 ContextType 으로 이미지의 mime type 을 정확하게 담아주지 않으면 엑스박스 처리되는 문제가 있다. DB 에 이미지 의 mime 를 저장해놓으면 상관이 없으나 외부 DB 를 연동할 경우 저장하지 않고 파일만 담아놓는 경우가 있어 byte[] 에서 mime Type 을 가져올수 있는 라이브러리를 찾아 Java Mime Magic Library 0.1.2 를 적용하였다 response.setContentType(Magic.getMagicMatch(byte[]).getMimeType()); 기능은 문제없이 작동 하였으나 IE도 좀더 여유롭게 타입체크를 하였으면... 이라고.. 2019. 3. 25. Eclipse Gradle JRE version set sourceCompatibility = 1.8 targetCompatibility = 1.8 2018. 2. 28. Spring Project .gitignore *.java.hsp *.sonarj *.sw* .DS_Store .settings .springBeans bin build.sh integration-repo ivy-cache jxl.log jmx.log derby.log spring-test/test-output/ .gradle .project .classpath argfile* pom.xml activemq-data/ classes/ /build buildSrc/build /spring-*/build /src/asciidoc/build target/ # IDEA artifacts and output dirs *.iml *.ipr *.iws .idea out test-output atlassian-ide-plugin.xml .gradletaskname.. 2018. 1. 31. Spring 4.x Mix JavaConfig and XML 스프링 4.x 버전에서 이중화 , 세션 시간설정 등 JavaConfig 로 해결 되지 않는 설정 사항 Xml 과 같이 사용하는 방법 import javax.servlet.FilterRegistration; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.ServletRegistration; import org.springframework.security.web.session.HttpSessionEventPublisher; import org.springframework.web.WebApplicationInitializer; import org.springframework.web.c.. 2017. 1. 20. 이전 1 2 3 다음 반응형