Skip to content

Process AOT - Error with "composite" profile in Spring Cloud Config Server generating Native Image  #2395

Closed
@dani-house

Description

@dani-house

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions