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

feat: banner for puris backend #556

Merged

Conversation

eschrewe
Copy link
Contributor

Description

  • added puris backend banner
  • for some reason, inserting a banner.txt as described here did not work during my local testing, so I used another way

Pre-review checks

Please ensure to do as many of the following checks as possible, before asking for committer review:

  • DEPENDENCIES are up-to-date. Dash license tool. Committers can open IP issues for restricted libs.
  • Copyright and license header are present on all affected files
  • If helm chart has been changed, the chart version has been bumped to either next major, minor or patch level (compared to released chart).

Copy link
Contributor

@tom-rm-meyer-ISST tom-rm-meyer-ISST left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This solution works fine for me.

Regarding the point with the banner not working: I think I resolved that. I followed spring documentation that states that you only need to place a banner.txt to the resources folder. It might also make sense to print the version of the Backend.

How I got it running:

  1. place the banner.txt in the resources folder (if you use another name, you'll need to mention that in the properties)
  2. ensure that it's in the classpath (we need to add it to the pom.xml, see below)
<!-- current line 207: add basic application properties -->
            <resource>
                <directory>${project.basedir}/src/main/resources</directory>
                <includes>
                    <include>application.properties</include>
                    <!-- add json-ld data-->
                    <include>json-ld/*</include>
                    <include>banner.txt</include>
                </includes>
                <targetPath>BOOT-INF/classes/</targetPath>
            </resource>

<!-- alternatively you could also make this easier -->
           <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
            </resource>

Please check if you would like to go the resources way :)

@eschrewe
Copy link
Contributor Author

This solution works fine for me.

Regarding the point with the banner not working: I think I resolved that. I followed spring documentation that states that you only need to place a banner.txt to the resources folder. It might also make sense to print the version of the Backend.

How I got it running:

  1. place the banner.txt in the resources folder (if you use another name, you'll need to mention that in the properties)
  2. ensure that it's in the classpath (we need to add it to the pom.xml, see below)
<!-- current line 207: add basic application properties -->
            <resource>
                <directory>${project.basedir}/src/main/resources</directory>
                <includes>
                    <include>application.properties</include>
                    <!-- add json-ld data-->
                    <include>json-ld/*</include>
                    <include>banner.txt</include>
                </includes>
                <targetPath>BOOT-INF/classes/</targetPath>
            </resource>

<!-- alternatively you could also make this easier -->
           <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
            </resource>

Please check if you would like to go the resources way :)

Ah dang ;)

I forgot about the pom.xml ... and so I could not get it working in the standard way. I will fix that :)

Copy link
Contributor

@tom-rm-meyer-ISST tom-rm-meyer-ISST left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for raising

@tom-rm-meyer-ISST tom-rm-meyer-ISST merged commit 5cbf59a into eclipse-tractusx:main Aug 21, 2024
13 checks passed
@tom-rm-meyer-ISST tom-rm-meyer-ISST deleted the feat/puris_banner branch August 21, 2024 05:25
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.

2 participants