@gsujeeth we have not optimized for adding Broadleaf to another project. The
DemoSite that you referenced has a fair amount of additional boilerplate (e.g. security settings) that you would need to likely re-create if you wanted to add Broadleaf to an existing project
One thing that you could try is to:
broadleaf-framework-webto your dependencies
@EnableBroadleafSiteAutoConfigurationto your project. This must be on an inner static class if you're adding it to an
Hello @phillipuniverse , thanks for you reply.
Java version? I'm using java 8 as you can see in my Dockerfile
COPY target/ROOT.jar ROOT.jar
EXPOSE 8080 8443 8983
I already faced different error messages, but they seem related with Solr.
Now i get the following exception trace:
Method [public void com.community.core.service.search.SolrIndexCleanupServiceImpl.rebuildIndexAtStartupIfNecessary() throws org.broadleafcommerce.common.exception.ServiceException,java.io.IOException]
Caused by: org.broadleafcommerce.common.exception.ServiceException: Could not delete documents
Caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:8983 [localhost/127.0.0.1] failed: Connection refused (Connection refused)
So it seems that the embedded solr cannot be reached.
I can try to use docker-compose and provide a solr server, but for now i just wanted to run broadleaf.
blc:bundleprocessor is called
ResourceBundleProcessor. The part where the name is generated is in
ResourceBundlingServiceImpl. I believe specifically in the method
resolveBundleResourceName. It looks like that number is generated by taking the absolute value of the hashcode of all of the file names combined out of box.
@EnableBroadleafSiteRootAutoConfiguration. By using this annotation it will load all my site components and specially site controllers I defined in
/blc-config/site/bl-*-applicationContext.xml. And I have to add any dependencies required by the site components which I don't need and I don't want my site controllers to be created or exposed. Do you think it's a good idea to handle that with an new annotation
EnableBroadleafApiRootAutoConfiguration? It will allow blc users to separate site,admin,api and common contexts. And maybe to add it to BLC ? I can do a PR if it is worthwhile.
@danielcolgrove Thanks, I will wait for your reply. It's critical for us "Social Alpha https://socialalpha.org" to know as we are building an open source platform in India for elderly people.
An additional question if you can provide an answer to:
As I mentioned we are building a open source platform for elderly care, being a non-profit organization, can we expect to get a community version of broadleaf with market place extension?
@NafanyaVictorovna sure enough, that logging configuration file is not included in our base. You can add those lines into a file as documented in the Spring Boot docs.
Your specific question was about
hibernate.show_sql. The reason this gets clobbered is a we have a class called
JPAPropertiesPersistenceUnitPostProcessor. This allows us to override some
persistence.xml values from the Spring Environment (properties files).
Sooooo, in your case, you are trying to set
hibernate.show_sql. Instead, you can set
blPU.hibernate.show_sql in your Spring properties files (
runtime-properties/development.properties, etc). You can see that it's overridden in the
DemoSite project here to be
You might want to review the
JPAPropertiesPersistenceUnitPostProcessor to see the other properties that can be set via environment properties instead of
I have a problem with adding a FacetSearch on BroadLeaf. I need to add an additional filter on product research that is not based on the solr index but goes straight on the db. It is a filter on product availability (AVAILABLE / NOT AVAILABLE). Has such a thing ever been implemented? Alternatively, it was decided to act on the field of the quantityAvailable index and re-index every few hours. In this case, however, trying to define the ranges in this way:
0 TO 1 1 TO *
but only 1 TO * is displayed, even if there are actually products with availability 0. A possible problem is that we had to set the field availability to double and not int in the scheme because, with int it generated a cast error since in the range the values are numeric and therefore, for example, 0.0000. Do you have a possible idea on how to solve this problem? My field in schema is this:
<field name="it_quantityAvailable_i" type="double" indexed="true" stored="true"/>
org.broadleafcommerce.core.search.service.solr.AbstractSolrSearchServiceExtensionHandler#modifySolrQuery(org.apache.solr.client.solrj.SolrQuery, java.lang.String, java.util.List<org.broadleafcommerce.core.search.domain.SearchFacetDTO>, org.broadleafcommerce.core.search.domain.SearchCriteria, java.lang.String)