spring-cloud-function icon indicating copy to clipboard operation
spring-cloud-function copied to clipboard

Error when compiling native for AWS Lambda: org.springframework.cloud.function.serverless.web.ServerlessAutoConfiguration.ServerlessServletWebServerFactory has private access in org.springframework.cloud.function.serverless.web.ServerlessAutoConfiguration

Open eugeniace opened this issue 1 year ago • 0 comments

Describe the bug

We are trying to build native a spring boot with rest controllers for AWS Lambda. On build, we are receiving the following error:

[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:3.3.0-SNAPSHOT:process-aot (process-aot) on project sample-app: Unable to compile generated source [ERROR] org.springframework.cloud.function.serverless.web.ServerlessAutoConfiguration.ServerlessServletWebServerFactory has private access in org.springframework.cloud.function.serverless.web.ServerlessAutoConfiguration c:\sample-app\target\spring-aot\main\sources\org\springframework\cloud\function\serverless\web\ServerlessAutoConfiguration__ManagementBeanDefinitions.java 21:68

The problem seems also to be related to actuator. If I remove dependency to actuator, I am not receiving this error anymore.

	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-actuator</artifactId>
	</dependency>

eugeniace avatar Mar 07 '24 09:03 eugeniace