Monthly Archives: August 2014

tiles2 tiles3 변경 적용시 주의점

servlet-context.xml

tiels2 설정

	<!-- tiles -->
	<beans:bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles2.TilesConfigurer">
		<beans:property name="definitions">
			<beans:list>
				<beans:value>classpath:layouts/layouts.xml</beans:value>
			</beans:list>
		</beans:property>
		<beans:property name="preparerFactoryClass" value="org.springframework.web.servlet.view.tiles2.SpringBeanPreparerFactory"/>
	</beans:bean>
	<beans:bean id="tilesViewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
		<beans:property name="viewClass" value="org.springframework.web.servlet.view.tiles2.TilesView"/>
		<beans:property name="order" value="1"/>
	</beans:bean>

maven버전을 변경하고 여기서 2를 3으로 고치면 에러도 안뜨고 이상이 없어 보이지만…

로딩이 안된다. ClassNotFoundException

아마 이 에러?

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tilesConfigurer' defined in URL [file:/D:/a_workspace/idea/buskingplay-parent/web-mobile/target/web-mobile/WEB-INF/classes/servlet/servlet-context.xml]: Initialization of bean failed; nested exception is java.lang.TypeNotPresentException: Type org.apache.tiles.preparer.factory.PreparerFactory not present
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:703) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760) ~[spring-context-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) ~[spring-context-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:658) ~[spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:624) ~[spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:672) ~[spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:543) ~[spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:484) ~[spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) [spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at javax.servlet.GenericServlet.init(GenericServlet.java:158) [servlet-api.jar:3.0.FR]
	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284) [catalina.jar:7.0.55]
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197) [catalina.jar:7.0.55]
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087) [catalina.jar:7.0.55]
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5229) [catalina.jar:7.0.55]
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5516) [catalina.jar:7.0.55]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:7.0.55]
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) [catalina.jar:7.0.55]
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) [catalina.jar:7.0.55]
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649) [catalina.jar:7.0.55]
	at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1763) [catalina.jar:7.0.55]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_11]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_11]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_11]
	at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_11]
	at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301) [tomcat-coyote.jar:7.0.55]
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) [na:1.8.0_11]
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) [na:1.8.0_11]
	at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:618) [catalina.jar:7.0.55]
	at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:565) [catalina.jar:7.0.55]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_11]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_11]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_11]
	at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_11]
	at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301) [tomcat-coyote.jar:7.0.55]
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) [na:1.8.0_11]
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) [na:1.8.0_11]
	at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1466) [na:1.8.0_11]
	at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76) [na:1.8.0_11]
	at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1307) [na:1.8.0_11]
	at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1399) [na:1.8.0_11]
	at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:828) [na:1.8.0_11]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_11]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_11]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_11]
	at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_11]
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323) [na:1.8.0_11]
	at sun.rmi.transport.Transport$1.run(Transport.java:178) [na:1.8.0_11]
	at sun.rmi.transport.Transport$1.run(Transport.java:175) [na:1.8.0_11]
	at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_11]
	at sun.rmi.transport.Transport.serviceCall(Transport.java:174) [na:1.8.0_11]
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:557) [na:1.8.0_11]
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:812) [na:1.8.0_11]
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:671) [na:1.8.0_11]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_11]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_11]
	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_11]
Caused by: java.lang.TypeNotPresentException: Type org.apache.tiles.preparer.factory.PreparerFactory not present
	at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:117) ~[na:1.8.0_11]
	at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125) ~[na:1.8.0_11]
	at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49) ~[na:1.8.0_11]
	at sun.reflect.generics.reflectiveObjects.WildcardTypeImpl.getUpperBounds(WildcardTypeImpl.java:130) ~[na:1.8.0_11]
	at com.sun.beans.TypeResolver.resolve(TypeResolver.java:175) ~[na:1.8.0_11]
	at com.sun.beans.TypeResolver.resolve(TypeResolver.java:218) ~[na:1.8.0_11]
	at com.sun.beans.TypeResolver.resolve(TypeResolver.java:169) ~[na:1.8.0_11]
	at com.sun.beans.TypeResolver.resolve(TypeResolver.java:218) ~[na:1.8.0_11]
	at com.sun.beans.TypeResolver.resolveInClass(TypeResolver.java:96) ~[na:1.8.0_11]
	at java.beans.FeatureDescriptor.getParameterTypes(FeatureDescriptor.java:387) ~[na:1.8.0_11]
	at java.beans.MethodDescriptor.setMethod(MethodDescriptor.java:116) ~[na:1.8.0_11]
	at java.beans.MethodDescriptor.<init>(MethodDescriptor.java:72) ~[na:1.8.0_11]
	at java.beans.MethodDescriptor.<init>(MethodDescriptor.java:56) ~[na:1.8.0_11]
	at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1163) ~[na:1.8.0_11]
	at java.beans.Introspector.getBeanInfo(Introspector.java:426) ~[na:1.8.0_11]
	at java.beans.Introspector.getBeanInfo(Introspector.java:173) ~[na:1.8.0_11]
	at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:284) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:188) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:327) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptors(BeanWrapperImpl.java:335) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.filterPropertyDescriptorsForDependencyCheck(AbstractAutowireCapableBeanFactory.java:1343) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.filterPropertyDescriptorsForDependencyCheck(AbstractAutowireCapableBeanFactory.java:1322) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1180) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
[2014-08-27 04:46:05,374] Artifact web-mobile:war exploded: Artifact is deployed successfully
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	... 61 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.apache.tiles.preparer.factory.PreparerFactory
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720) ~[catalina.jar:7.0.55]
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571) ~[catalina.jar:7.0.55]
	at java.lang.Class.forName0(Native Method) ~[na:1.8.0_11]
	at java.lang.Class.forName(Class.java:340) ~[na:1.8.0_11]
	at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114) ~[na:1.8.0_11]
	... 84 common frames omitted
[2014-08-27 04:46:05,374] Artifact web-mobile:war exploded: Deploy took 12,242 milliseconds
16:46:05.917 ERROR [http-bio-8080-exec-1] o.s.web.servlet.DispatcherServlet.initServletBean : Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tilesConfigurer' defined in URL [file:/D:/a_workspace/idea/buskingplay-parent/web-mobile/target/web-mobile/WEB-INF/classes/servlet/servlet-context.xml]: Initialization of bean failed; nested exception is java.lang.TypeNotPresentException: Type org.apache.tiles.preparer.factory.PreparerFactory not present
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:703) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760) ~[spring-context-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) ~[spring-context-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:658) ~[spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:624) ~[spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:672) ~[spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:543) ~[spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:484) ~[spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) [spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at javax.servlet.GenericServlet.init(GenericServlet.java:158) [servlet-api.jar:3.0.FR]
	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284) [catalina.jar:7.0.55]
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197) [catalina.jar:7.0.55]
	at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:864) [catalina.jar:7.0.55]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:134) [catalina.jar:7.0.55]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) [catalina.jar:7.0.55]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) [catalina.jar:7.0.55]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) [catalina.jar:7.0.55]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) [catalina.jar:7.0.55]
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) [catalina.jar:7.0.55]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) [catalina.jar:7.0.55]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) [catalina.jar:7.0.55]
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070) [tomcat-coyote.jar:7.0.55]
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) [tomcat-coyote.jar:7.0.55]
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314) [tomcat-coyote.jar:7.0.55]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_11]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_11]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-coyote.jar:7.0.55]
	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_11]
Caused by: java.lang.TypeNotPresentException: Type org.apache.tiles.preparer.factory.PreparerFactory not present
	at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:117) ~[na:1.8.0_11]
	at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125) ~[na:1.8.0_11]
	at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49) ~[na:1.8.0_11]
	at sun.reflect.generics.reflectiveObjects.WildcardTypeImpl.getUpperBounds(WildcardTypeImpl.java:130) ~[na:1.8.0_11]
	at com.sun.beans.TypeResolver.resolve(TypeResolver.java:175) ~[na:1.8.0_11]
	at com.sun.beans.TypeResolver.resolve(TypeResolver.java:218) ~[na:1.8.0_11]
	at com.sun.beans.TypeResolver.resolve(TypeResolver.java:169) ~[na:1.8.0_11]
	at com.sun.beans.TypeResolver.resolve(TypeResolver.java:218) ~[na:1.8.0_11]
	at com.sun.beans.TypeResolver.resolveInClass(TypeResolver.java:96) ~[na:1.8.0_11]
	at java.beans.FeatureDescriptor.getParameterTypes(FeatureDescriptor.java:387) ~[na:1.8.0_11]
	at java.beans.MethodDescriptor.setMethod(MethodDescriptor.java:116) ~[na:1.8.0_11]
	at java.beans.MethodDescriptor.<init>(MethodDescriptor.java:72) ~[na:1.8.0_11]
	at java.beans.MethodDescriptor.<init>(MethodDescriptor.java:56) ~[na:1.8.0_11]
	at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1163) ~[na:1.8.0_11]
	at java.beans.Introspector.getBeanInfo(Introspector.java:426) ~[na:1.8.0_11]
	at java.beans.Introspector.getBeanInfo(Introspector.java:173) ~[na:1.8.0_11]
	at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:284) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:188) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:327) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptors(BeanWrapperImpl.java:335) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.filterPropertyDescriptorsForDependencyCheck(AbstractAutowireCapableBeanFactory.java:1343) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.filterPropertyDescriptorsForDependencyCheck(AbstractAutowireCapableBeanFactory.java:1322) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1180) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	... 33 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.apache.tiles.preparer.factory.PreparerFactory
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720) ~[catalina.jar:7.0.55]
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571) ~[catalina.jar:7.0.55]
	at java.lang.Class.forName0(Native Method) ~[na:1.8.0_11]
	at java.lang.Class.forName(Class.java:340) ~[na:1.8.0_11]
	at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114) ~[na:1.8.0_11]
	... 56 common frames omitted
16:46:06.069 ERROR [http-bio-8080-exec-2] o.s.web.servlet.DispatcherServlet.initServletBean : Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tilesConfigurer' defined in URL [file:/D:/a_workspace/idea/buskingplay-parent/web-mobile/target/web-mobile/WEB-INF/classes/servlet/servlet-context.xml]: Initialization of bean failed; nested exception is java.lang.TypeNotPresentException: Type org.apache.tiles.preparer.factory.PreparerFactory not present
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:703) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760) ~[spring-context-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) ~[spring-context-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:658) ~[spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:624) ~[spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:672) ~[spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:543) ~[spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:484) ~[spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) [spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at javax.servlet.GenericServlet.init(GenericServlet.java:158) [servlet-api.jar:3.0.FR]
	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284) [catalina.jar:7.0.55]
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197) [catalina.jar:7.0.55]
	at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:864) [catalina.jar:7.0.55]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:134) [catalina.jar:7.0.55]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) [catalina.jar:7.0.55]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) [catalina.jar:7.0.55]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) [catalina.jar:7.0.55]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) [catalina.jar:7.0.55]
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) [catalina.jar:7.0.55]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) [catalina.jar:7.0.55]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) [catalina.jar:7.0.55]
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070) [tomcat-coyote.jar:7.0.55]
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) [tomcat-coyote.jar:7.0.55]
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314) [tomcat-coyote.jar:7.0.55]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_11]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_11]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-coyote.jar:7.0.55]
	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_11]
Caused by: java.lang.TypeNotPresentException: Type org.apache.tiles.preparer.factory.PreparerFactory not present
	at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:117) ~[na:1.8.0_11]
	at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125) ~[na:1.8.0_11]
	at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49) ~[na:1.8.0_11]
	at sun.reflect.generics.reflectiveObjects.WildcardTypeImpl.getUpperBounds(WildcardTypeImpl.java:130) ~[na:1.8.0_11]
	at com.sun.beans.TypeResolver.resolve(TypeResolver.java:175) ~[na:1.8.0_11]
	at com.sun.beans.TypeResolver.resolve(TypeResolver.java:218) ~[na:1.8.0_11]
	at com.sun.beans.TypeResolver.resolve(TypeResolver.java:169) ~[na:1.8.0_11]
	at com.sun.beans.TypeResolver.resolve(TypeResolver.java:218) ~[na:1.8.0_11]
	at com.sun.beans.TypeResolver.resolveInClass(TypeResolver.java:96) ~[na:1.8.0_11]
	at java.beans.FeatureDescriptor.getParameterTypes(FeatureDescriptor.java:387) ~[na:1.8.0_11]
	at java.beans.MethodDescriptor.setMethod(MethodDescriptor.java:116) ~[na:1.8.0_11]
	at java.beans.MethodDescriptor.<init>(MethodDescriptor.java:72) ~[na:1.8.0_11]
	at java.beans.MethodDescriptor.<init>(MethodDescriptor.java:56) ~[na:1.8.0_11]
	at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1163) ~[na:1.8.0_11]
	at java.beans.Introspector.getBeanInfo(Introspector.java:426) ~[na:1.8.0_11]
	at java.beans.Introspector.getBeanInfo(Introspector.java:173) ~[na:1.8.0_11]
	at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:284) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:188) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:327) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptors(BeanWrapperImpl.java:335) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.filterPropertyDescriptorsForDependencyCheck(AbstractAutowireCapableBeanFactory.java:1343) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.filterPropertyDescriptorsForDependencyCheck(AbstractAutowireCapableBeanFactory.java:1322) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1180) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	... 33 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.apache.tiles.preparer.factory.PreparerFactory
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720) ~[catalina.jar:7.0.55]
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571) ~[catalina.jar:7.0.55]
	at java.lang.Class.forName0(Native Method) ~[na:1.8.0_11]
	at java.lang.Class.forName(Class.java:340) ~[na:1.8.0_11]
	at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114) ~[na:1.8.0_11]
	... 56 common frames omitted
16:46:06.714 ERROR [http-bio-8080-exec-3] o.s.web.servlet.DispatcherServlet.initServletBean : Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tilesConfigurer' defined in URL [file:/D:/a_workspace/idea/buskingplay-parent/web-mobile/target/web-mobile/WEB-INF/classes/servlet/servlet-context.xml]: Initialization of bean failed; nested exception is java.lang.TypeNotPresentException: Type org.apache.tiles.preparer.factory.PreparerFactory not present
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:703) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760) ~[spring-context-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) ~[spring-context-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:658) ~[spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:624) ~[spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:672) ~[spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:543) ~[spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:484) ~[spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) [spring-webmvc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at javax.servlet.GenericServlet.init(GenericServlet.java:158) [servlet-api.jar:3.0.FR]
	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284) [catalina.jar:7.0.55]
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197) [catalina.jar:7.0.55]
	at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:864) [catalina.jar:7.0.55]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:134) [catalina.jar:7.0.55]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) [catalina.jar:7.0.55]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) [catalina.jar:7.0.55]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) [catalina.jar:7.0.55]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) [catalina.jar:7.0.55]
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) [catalina.jar:7.0.55]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) [catalina.jar:7.0.55]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) [catalina.jar:7.0.55]
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070) [tomcat-coyote.jar:7.0.55]
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) [tomcat-coyote.jar:7.0.55]
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314) [tomcat-coyote.jar:7.0.55]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_11]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_11]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-coyote.jar:7.0.55]
	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_11]
Caused by: java.lang.TypeNotPresentException: Type org.apache.tiles.preparer.factory.PreparerFactory not present
	at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:117) ~[na:1.8.0_11]
	at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125) ~[na:1.8.0_11]
	at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49) ~[na:1.8.0_11]
	at sun.reflect.generics.reflectiveObjects.WildcardTypeImpl.getUpperBounds(WildcardTypeImpl.java:130) ~[na:1.8.0_11]
	at com.sun.beans.TypeResolver.resolve(TypeResolver.java:175) ~[na:1.8.0_11]
	at com.sun.beans.TypeResolver.resolve(TypeResolver.java:218) ~[na:1.8.0_11]
	at com.sun.beans.TypeResolver.resolve(TypeResolver.java:169) ~[na:1.8.0_11]
	at com.sun.beans.TypeResolver.resolve(TypeResolver.java:218) ~[na:1.8.0_11]
	at com.sun.beans.TypeResolver.resolveInClass(TypeResolver.java:96) ~[na:1.8.0_11]
	at java.beans.FeatureDescriptor.getParameterTypes(FeatureDescriptor.java:387) ~[na:1.8.0_11]
	at java.beans.MethodDescriptor.setMethod(MethodDescriptor.java:116) ~[na:1.8.0_11]
	at java.beans.MethodDescriptor.<init>(MethodDescriptor.java:72) ~[na:1.8.0_11]
	at java.beans.MethodDescriptor.<init>(MethodDescriptor.java:56) ~[na:1.8.0_11]
	at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1163) ~[na:1.8.0_11]
	at java.beans.Introspector.getBeanInfo(Introspector.java:426) ~[na:1.8.0_11]
	at java.beans.Introspector.getBeanInfo(Introspector.java:173) ~[na:1.8.0_11]
	at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:284) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:188) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:327) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptors(BeanWrapperImpl.java:335) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.filterPropertyDescriptorsForDependencyCheck(AbstractAutowireCapableBeanFactory.java:1343) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.filterPropertyDescriptorsForDependencyCheck(AbstractAutowireCapableBeanFactory.java:1322) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1180) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537) ~[spring-beans-4.0.6.RELEASE.jar:4.0.6.RELEASE]
	... 33 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.apache.tiles.preparer.factory.PreparerFactory
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720) ~[catalina.jar:7.0.55]
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571) ~[catalina.jar:7.0.55]
	at java.lang.Class.forName0(Native Method) ~[na:1.8.0_11]
	at java.lang.Class.forName(Class.java:340) ~[na:1.8.0_11]
	at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114) ~[na:1.8.0_11]
	... 56 common frames omitted

이무렇지도 않게 pom.xml을 켜서 의존성 문제를 해결하면 끝.

tiles2 tiles3는 버전이 그냥 올라간게 아니라 거의 라이브러리가 바뀐 수준인 것 같다. 그런데 이름을 유지하고 있다. 하위호환성이 제로면.. 아예 패키지명이라도 바꾸던가 좀..
어쨌든 2.x버전을 3.x로 마이그레이션 할 때 pom에 2.x버전이 남아있게 되면 별별오류가 뜬다. 3.0.5버전부터는 jdk6도 지원을 안한다고 하니 주의.
아직 jdk6쓰는사람 잘 없을 것 같지만…
이것만 주의하면 매우 쉽다. 그냥 servlet-context에서 tiles2 -> tiles3으로 바꿔주면 된다.

Spring-Encache 문제 Another unnamed CacheManager already exists in the same VM

스프링4.x와 jpa, encache를 설정해서 사용. 멀티모듈프로젝트로 포팅하면서 문제가 발생했다.

JavaConfig.java를 복붙하는 과정에서 오류가 있었나 해서 여기저기 찾아봤는데 역시 없었고 빈 생성타임을 의심하고 찾아서 문제점을 발견했다.

component-scan이 JavaConfig.java 설정파일을 두번 읽으면서 빈을 두번생성하고~ 캐시가 두번 생성되면서 발생하는 문제…

servlet에서 스캔을 없애버리거나… servlet이 담당하는 부분만을 스캔하게 만든다. Controller, 또는 Service까지…

root에서는 기타 등등 의존성을 미리 생성해야 하니 이쪽에서 대부분의 스캔을 맡겨놓는다.설정은 다음과 같다.

문제상황

root-context.xml
<context:component-scan base-package="org.beansugar">

servlet-context.xml
<context:component-scan base-package="org.beansugar">

 

해결방법

root-context.xml

<context:component-scan base-package="org.beansugar">
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
</context:component-scan>

servlet-context.xml
<context:component-scan base-package="org.beansugar" use-default-filters="false">
<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
</context:component-scan>