Skip to content
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

add spring boot integration #83

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

Commits on Nov 22, 2024

  1. add spring boot integration

    this adds an `AutoConfiguration` for spring which automatically triggers
    the liquibase migration if this library is added to a project which
    already has spring boot on the classpath.
    the dependency to spring boot is marked as optional, thus it is not
    added as a transitive dependency to consumers which do not use spring
    boot.
    
    this needs to be added here until a more generic solution exists
    directly within spring. see spring-projects/spring-boot#37936 for more
    details.
    
    the test coverage for this is a bit small since we currently don't have
    access to the instanciated `OpenSearchClient` and would instead have to
    create one on our own just for the test.
    
    in the best case we'd be able to share some code with
    [`spring-data-opensearch-testcontainers`] (or pull it in as a
    dependency) to support [`@ServiceConnection`] usage. however, it seems
    that this library hasn't yet been published to maven, thus this isn't
    possible and copying over all the code might not make that much sense.
    
    for more information see these links:
    - [general information on spring auto-configuration](https://docs.spring.io/spring-boot/reference/using/auto-configuration.html)
    - [creating your own auto-configuration](https://docs.spring.io/spring-boot/reference/features/developing-auto-configuration.html)
    
    [`spring-data-opensearch-testcontainers`]: https://github.com/opensearch-project/spring-data-opensearch/tree/main/spring-data-opensearch-testcontainers
    [`@ServiceConnection`]: https://docs.spring.io/spring-boot/reference/testing/testcontainers.html#testing.testcontainers.service-connections
    rursprung committed Nov 22, 2024
    Configuration menu
    Copy the full SHA
    49392e6 View commit details
    Browse the repository at this point in the history
  2. OpenSearchConnection: use built-in TrustAllStrategy

    no need to hand-roll this if there's a built-in alternative.
    rursprung committed Nov 22, 2024
    Configuration menu
    Copy the full SHA
    7ec5ceb View commit details
    Browse the repository at this point in the history