Skip to content

Feature/cors #91

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Feature/cors #91

wants to merge 6 commits into from

Conversation

lakeward
Copy link
Contributor

@lakeward lakeward commented Apr 16, 2021

Hi Paul,

I used the spring-docs project to exercise spring-content functionality; it is still a good way to test the various components.

With the 2.3.4.RELEASE version of spring-boot, I encountered a few issues. I shared the details in case something is worth another look or you want to keep.

Here is a summary:

  • System Properties
    • Had to use SystemProperties.get("SPRINGDOCS_ALLOW_HOST") instead of System.getenv("SPRINGDOCS_ALLOW_HOST")
  • spring-boot maven plugin
    • -Dspring-boot.run.profiles=postgres instead of spring.profiles.active. I suspect the -Dspring-boot.run.jvmArguments="-Dspring.profiles.active=postgres" would also work.
  • The following endpoints return CORS errors with CorsOriginUpdater enabled. I was able to get it to work by adding the global CORS configuration, but I was not successful with the ContentRestConfigurer example.
  • Had to remove spring-content-elasticsearch as a dependency before search calls were directed to Solr. spring.content.elasticsearch.autoindex=false prevented Elasticsearch indexing but search defaulted to Elasticsearch.
  • UndeclaredThrowableException
    -This occurs if you do not have elasticsearch configured and didn't set spring.content.elasticsearch.autoindex=false. The system throws UndeclaredThrowableException, but it is not the full stack trace. During testing, I update the class to catch and print the exception to identify the issue. Line 200 in ContentStoreContentService was throwing the exception (i.e., Object updatedDomainObj = ReflectionUtils.invokeMethod(methodToUse, targetObj, updateObject, contentArg)). See
    UndeclaredThrowableExceptionFullStack.txt full stack trace.

UndeclaredThrowableException.txt
UndeclaredThrowableExceptionFullStack.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant