Spring 3
3.2 Bean Scopes
Bean scopes: singleton and prototype 1. singleton Only one instance in Spring IoC container. Only return the same Bean. One instance of the bean is created for …
4.1 Resource
Resource 1. Resource API public interface InputStreamSource { InputStream getInputStream() throws IOException; } public interface Resource extends …
4.2 Using Resource
Using Resource 1. ByteArrayResource Junit test: import org.junit.Test; import org.springframework.core.io.ByteArrayResource; import …
4.3 Access Resource
Access Resource 1. ResourceLoader Spring has a DefaultResourceLoader which can return ClassPathResource, UrlResource, and ServletContextResourceLoader which …