Skip to content

Allow setting of appPrefix in Spring Boot Starter Adaptive Form Rendering code. #40

@rmcdouga

Description

@rmcdouga

The Adaptive Form Service rendering code in FluentFormsAutoConfiguration.java always uses StandardFormsFeederUrlFilters.getStandardInputStreamFilter(). Instead, this should be configurable.

It should be configurable in a couple of different ways. The client should be able replace this filter with a custom filter and there there should be an application.properties entry that can provide an appPrefix to the standardStreamFilter.

I would propose that I update the autoconfiguration class to look for a bean named afInputStreamFilter that implements Function<InputStream, InputStream>. If not provided, then it would default to StandardFormsFeederUrlFilters.getStandardInputStreamFilter().

This would allow you to provide a bean that would override the default using something like:

      @Bean
      public Function<InputStream, InputStream> afInputStreamFilter() {
            return StandardFormsFeederUrlFilters.getStandardInputStreamFilter("/myClientApp");
      }

Also, if no afInputStreamFilter is supplied but a configuration property called fluentforms.af.appPrefix is supplied, then we should set the appPrefix on the standardInputStreamFilter using the value of that property

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions