on 12-15-2015 12:41 PM
Hello All,
We are working on hybris migration from 4.7 to 5.7 .
We have used Annotation based approach for dependancy injecttion.
Suppose I have class :
@Service(CustomDefaultUIAccessRightService.BEAN_NAME) @Scope(value = "tenant") public class CustomDefaultUIAccessRightService extends DefaultUIAccessRightService {
@Autowired(required = true)
@Override
public void setUserService(final UserService userService)
{
super.setUserService(userService);
}
@Autowired(required = true)
@Override
public void setCockpitTypeService(final TypeService typeService)
{
super.setCockpitTypeService(typeService);
}
.... . .... .....
}
Auto wiring is working fine for UserService - bean dependency injection . It is also working fine for ModelService , but It is not working fine for CockpitTypeService .
I think we are able to bind beans which are inside platform .but not which are outside platform . ( bocs Hybris has revamped it internal structure .)
Any Suggestion will be appreciated .
Since CockpitService bean is not available within the specific spring context for the platform, please try the following code to get it from global context.
Registry.getApplicationContext().getBean(name) - name will be "cockpitTypeService"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, scope tenant is no longer used since version 5.0.
Please take a look to this link: https://wiki.hybris.com/display/release5/Spring+Framework+in+the+hybris+Commerce+Suite#SpringFramewo...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.