Hi,

It's not possible to generate a native image with the composite profile. Executing the process-aot step, we get the error:

Default code generation is not supported for bean definitions declaring an instance supplier callback: Root bean: class [org.springframework.cloud.config.server.support.**EnvironmentRepositoryProperties**]; scope=singleton; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodNames=null; destroyMethodNames=null

application.yaml sample:

spring:
  application:
    name: config-server

  profiles:
    active: composite

  cloud:
    refresh:
      enabled: false

    config:
      server:
        composite:
          - type: git
            uri: https://dev.azure.com/xxxx/_git/repo1
            search-paths: '{application}'
            force-pull: true
            refresh-rate: 5
            try-master-branch: false
            default-label: main
            clone-on-start: true
          - type: git
            uri: https://dev.azure.com/xxxx/_git/repo2
            search-paths: '{application}'
            force-pull: true
            refresh-rate: 5
            try-master-branch: false
            default-label: main
            clone-on-start: true

Comment From: ryanjbaxter

Did you follow the instructions here? https://docs.spring.io/spring-cloud-config/reference/server/aot-and-native-image-support.html

cc: @OlgaMaciaszek

Comment From: dani-house

Config server compiles and it runs correctly with a simple git configuration, like this:

spring:
  cloud:
    config:
      server:
        git:
          uri: https://dev.azure.com/xxx/_git/repo1
          password: "xxxxx"
          username: "xxxxx"

Compilation error occurs when configuring "composite" profile.

Comment From: OlgaMaciaszek

This is, unfortunately, a known issue in Framework: https://github.com/spring-cloud/spring-cloud-function/issues/1074; we'll probably need to rewrite it to avoid using the supplier or manually create the AotContribution. Will look further into it.