Page 1 of 2
Broadleaf 3 and Spring 4
Posted: Wed Apr 16, 2014 6:04 am
by retaildev
Hi,
I would like to know will it be upgrade safe to upgrade spring 3 in broadleaf 3 to spring 4. As couple of modules in spring have released with good amount of code changes( example spring social) and they depend on spring 4.
So what is the road map of broadleaf coming with spring 4 or is it worthwhile to go that path.
Thanks
Vish
Re: Broadleaf 3 and Spring 4
Posted: Tue Apr 22, 2014 11:58 am
by phillipuniverse
We will definitely have support for Spring 4 but it's not on our immediate roadmap. I would say that Spring 4 support is at least a month out on the priority list.
We would love to see any and all pull requests or initial investigation on Broadleaf with Spring 4.
Re: Broadleaf 3 and Spring 4
Posted: Sat Jun 21, 2014 2:14 pm
by retaildev
Hi Phillip,
Thanks for your response. Any further update on this as broadleaf out with 3.2 nightly release as to when we can have spring 4.0.
I would also like to comment that there are certain other dependencies which also have to be upgraded. Like jackson from 1.9 to 2.3.
This creates a problem as the package have been changed and certain api have been deprecated.
Thanks
Dev
Re: Broadleaf 3 and Spring 4
Posted: Mon Jun 23, 2014 11:25 am
by phillipuniverse
@retaildev you can see the changes that are being made to the Broadleaf framework at
https://github.com/BroadleafCommerce/Br ... e/pull/930. As you indicated, one of the harder things was to upgrade Jackson to the latest version with the change in maintainers.
As of right now, that branch is the 'spring4' branch of the framework, utilizing Broadleaf 3.2.0-SNAPSHOT. If you want, you could pull down the framework, switch to that branch, ensure that you are targeting Broadleaf 3.2.0-SNAPSHOT and try out Spring 4 in your project. We have not built any of the Broadleaf spring 4 artifacts onto our nexus. We would love to hear about any problems that you might run into so that we can get them resolved. At this point, that branch is relatively stable.
The one thing we are still discussing internally is exactly what version of Broadleaf will Spring 4 target. As I said, we are currently targeting Broadleaf 3.2.0-SNAPSHOT but that might change to a later version of Broadleaf. We should have that ironed out in the next couple of weeks.
Re: Broadleaf 3 and Spring 4
Posted: Mon Jun 23, 2014 3:06 pm
by retaildev
@phillipuniverse Thanks for information. I will try the branch and pull it in.
I have tried to upgrade to 2.3 jackson, and was able to achieve this.
Only change which got blew up was this.
Class: DataDTODeserializer
Line: Around 95,
dataDTO.setGroups((ArrayList<DataDTO>)mapper.readValue(element.getValue(), new TypeReference<ArrayList<DataDTO>>(){}));
To be changed to
dataDTO.setGroups((ArrayList<DataDTO>)mapper.readValue(element.getValue()toString(), new TypeReference<ArrayList<DataDTO>>(){}));
Ideally element.getValue().traverse() should have worked but it threw nullpointer in certain situtations of building rules.
Hope this helps..
Thanks
Kunal
Re: Broadleaf 3 and Spring 4
Posted: Mon Jun 23, 2014 4:28 pm
by phillipuniverse
@retaildev - ran into that problem as well, you can see the changes that I made to like 95:
https://github.com/BroadleafCommerce/Br ... 70fbf34R95My solution was to add a getNullAwareText() method:
Code: Select all
protected String getNullAwareText(JsonNode node) {
return "null".equals(node.asText()) ? null : node.asText();
}
This appropriately deals with deserializing Strings that are hardcoded as "null" and removes any NPEs.
Re: Broadleaf 3 and Spring 4
Posted: Fri Jul 25, 2014 4:57 am
by retaildev
Hi @phillipuniverse,
What is the latest target milestone for spring 4 in broadleaf and also when would be the GA release for broadleaf 3.2.0 targeting..
Thanks
Dev
phillipuniverse wrote:@retaildev you can see the changes that are being made to the Broadleaf framework at
https://github.com/BroadleafCommerce/Br ... e/pull/930. As you indicated, one of the harder things was to upgrade Jackson to the latest version with the change in maintainers.
As of right now, that branch is the 'spring4' branch of the framework, utilizing Broadleaf 3.2.0-SNAPSHOT. If you want, you could pull down the framework, switch to that branch, ensure that you are targeting Broadleaf 3.2.0-SNAPSHOT and try out Spring 4 in your project. We have not built any of the Broadleaf spring 4 artifacts onto our nexus. We would love to hear about any problems that you might run into so that we can get them resolved. At this point, that branch is relatively stable.
The one thing we are still discussing internally is exactly what version of Broadleaf will Spring 4 target. As I said, we are currently targeting Broadleaf 3.2.0-SNAPSHOT but that might change to a later version of Broadleaf. We should have that ironed out in the next couple of weeks.
Re: Broadleaf 3 and Spring 4
Posted: Fri Jul 25, 2014 10:39 am
by phillipuniverse
We will be targeting whatever the latest 4.0 release of Spring is at that time.
Depending on how timing works out, we might end up changing this to target 4.1 instead. However, we are not specifically planning on waiting to release 3.2.0-GA until Spring 4.1 comes out.
Re: Broadleaf 3 and Spring 4
Posted: Mon Jul 28, 2014 5:59 am
by retaildev
Hi Phillip,
Thanks for your update..
And what is the tentative release data for Broadleaf 3.2.0 GA ?
Thanks
Kunal
Re: Broadleaf 3 and Spring 4
Posted: Tue Jul 29, 2014 3:11 pm
by phillipuniverse
Really not sure at this point, probably sometime towards the end of August.