java - Adding Session Beans in Spring boot results in No Scope registered for scope 'session' -


i have issue not able add session beans in spring boot. in application.xml have defined 2 beans scope session referenced in "leadsjobschedule" controller below.

application.xml

  <bean id="leadsjobschedule" class="za.co.discovery.portal.vitality.util.leadsjobschedule">      <property name="leaddetailsmap" ref="leaddetailsmap"/>      <property name="googleanalyticshelper" ref="googleanalyticshelper"/>   </bean>    <bean id="googleanalyticshelper" class="za.co.discovery.portal.vitality.util.googleanalyticshelper" scope="session">      <property name="readtimeout" value="${timeout.read}" />      <property name="connectiontimeout" value="${timeout.connect}" />      <property name="gatrackingid" value="ua-63460442-1"/>      <property name="proxyauthenticator" ref="proxyauthenticator" />   </bean>    <bean id="proxyauthenticator" class="za.co.discovery.portal.vitality.util.proxyauthenticator" scope="session">     <property name="proxyhost" value="${proxy.host}" />     <property name="proxyport" value="${proxy.port}" />     <property name="username" value="${proxy.username}" />     <property name="password" value="${proxy.password}" />   </bean> 

when start apache in spring boot followingerror:

could not autowire field: private za.co.discovery.portal.vitality.util.googleanalyticshelper za.co.discovery.portal.vitality.util.leadsjobschedule.googleanalyticshelper; nested exception java.lang.illegalstateexception: no scope registered scope 'session'     @ org.springframework.boot.context.embedded.embeddedwebapplicationcontext.onrefresh(embeddedwebapplicationcontext.java:124)     @ org.springframework.context.support.abstractapplicationcontext.refresh(abstractapplicationcontext.java:476)     @ org.springframework.boot.context.embedded.embeddedwebapplicationcontext.refresh(embeddedwebapplicationcontext.java:109)     @ org.springframework.boot.springapplication.refresh(springapplication.java:691)     @ org.springframework.boot.springapplication.run(springapplication.java:320)     @ org.springframework.boot.builder.springapplicationbuilder.run(springapplicationbuilder.java:142)     @ za.co.discovery.portal.vitality.application.main(application.java:31)     @ sun.reflect.nativemethodaccessorimpl.invoke0(native method)     @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57)     @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43)     @ java.lang.reflect.method.invoke(method.java:606)     @ com.intellij.rt.execution.application.appmain.main(appmain.java:144) caused by: org.springframework.beans.factory.beancreationexception: error creating bean name 'tomcatembeddedservletcontainerfactory' defined in class path resource . 


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -