spring-native icon indicating copy to clipboard operation
spring-native copied to clipboard

Add application.yaml support

Open grekier opened this issue 5 years ago • 3 comments

Hi.

I might be mistaken but it seems to me that application.yaml files are ignored thus some auto-configured beans are missing when building a native image. Those are available when running on JVM locally or in container. I could not find any mention of yaml support or not in the documentation except for the flag to remove support so I wanted to clarify (and eventually request support for this).

To avoid the question, I did not have the flag to remove support. Here is my plugin config:

            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <image>
                        <builder>paketobuildpacks/builder:tiny</builder>
                        <env>
                            <BP_BOOT_NATIVE_IMAGE>true</BP_BOOT_NATIVE_IMAGE>
                            <BP_BOOT_NATIVE_IMAGE_BUILD_ARGUMENTS>
                                --enable-all-security-services
                                -H:+ReportExceptionStackTraces
                                -H:+PrintAnalysisCallTree
                                --enable-https
                                --enable-http
                            </BP_BOOT_NATIVE_IMAGE_BUILD_ARGUMENTS>
                        </env>
                    </image>
                </configuration>
            </plugin>

So, did I miss something?

Thanks for clarification.

grekier avatar Jan 04 '21 17:01 grekier

Hum, indeed, it seems we have a regression here. I will dig into that bring back a sample to make sure this is tested.

sdeleuze avatar Jan 05 '21 09:01 sdeleuze

@grekier In fact we just missed application.yaml resource configuration, only application.yml was configured. Could you confirm you are using application.yaml in your sample?

sdeleuze avatar Jan 05 '21 10:01 sdeleuze

Hi @sdeleuze

Thanks for the quick answer. And yes, I was using yaml extension on my files.

grekier avatar Jan 05 '21 15:01 grekier