Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
A confusing issue or Bug in liferay 7.2 Service Builder
Hi guys
I am testing liferay 7.2.1 build service to moving some modules to this new environment
So i just create a liferay work space with running blade command as below :
Then i create a sample Foo module with type service-builder in Intelij IDEA.
Next i just ran the buildService gradle task under the Sample module.
may service.xml is as below :
As you see dependency-injector is set to ds so i should not have any @ServiceReference Or @BeanReference in Service classes!
But i have @ServiceReference Or @BeanReference.
As Liferay said in below article we just replace this annotation to @Reference manually!
https://help.liferay.com/hc/en-us/articles/360032624732-Migrating-a-Service-Builder-Module-from-Spring-DI-to-OSGi-DS#step-1-prepare-your-project-for-ds
is it Ok?
I should do this replacement manually on every running build-service !?
I am testing liferay 7.2.1 build service to moving some modules to this new environment
So i just create a liferay work space with running blade command as below :
blade init -v 7.2
Then i create a sample Foo module with type service-builder in Intelij IDEA.
Next i just ran the buildService gradle task under the Sample module.
may service.xml is as below :
<service-builder dependency-injector="ds" package-path="com.liferay.sample">
</service-builder >
As you see dependency-injector is set to ds so i should not have any @ServiceReference Or @BeanReference in Service classes!
But i have @ServiceReference Or @BeanReference.
As Liferay said in below article we just replace this annotation to @Reference manually!
https://help.liferay.com/hc/en-us/articles/360032624732-Migrating-a-Service-Builder-Module-from-Spring-DI-to-OSGi-DS#step-1-prepare-your-project-for-ds
is it Ok?
I should do this replacement manually on every running build-service !?
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™