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

Open
#40 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
spring, spring-boot
Domain
api, backend

Research direction

The issue is about modifying FluentFormsAutoConfiguration.java to make the Adaptive Form Service rendering code configurable. Look for the class and locate where StandardFormsFeederUrlFilters.getStandardInputStreamFilter() is used. The change involves adding a bean lookup for 'afInputStreamFilter' and reading a configuration property 'fluentforms.af.appPrefix'. Check existing Spring Boot configuration patterns in the project to understand how properties are bound and beans are defined. After implementing, verify by running any related tests or starting the application with a custom bean or property set.

Written by the indexing model from the issue text.

Description

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

Dominant language
Java
Stars
7
Forks
8
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from 4PointSolutions/FluentFormsAPI

All issues in 4PointSolutions/FluentFormsAPI

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.