Closed schlumpfling42 closed 1 year ago
OK ... figured it it (sometimes you have to spell it all out :-| ). The shared library I had different kinds of configuration classes and its dependencies are the issue, even so my code is not using any security configuration (excluded by a conditional) the added imports are doing some auto configuration that will switch the app to a regular MVC app.
If I exclude these to dependencies, everything is working fine.
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'
Closing the issue.
I'm trying to write 2 apps, one as a standard Spring Boot App and a Spring Cloud Function. I'm trying to avoid duplicate code, so I created a shared jar that contains some configuration (that is also used by other apps). I'm having trouble with running the Spring Cloud Function app. I can deploy it in a container with the AWS adapter (I understand that it will run another app in the container), but I cannot run it locally as Cloud Function App, it starts up as a regular Spring Boot app. I think it has to do with some AutoConfiguration, but I'm not certain. I also tried to run some tests, but they don't work either.
I'm using Spring Boot 3.0.5 and Cloud Function 4.0.2.
Here is the app:
I have only some configuration entries for postgres in my properties field.
Here are the dependencies in the gradle build file:
!!!UPDATE: The shared code has the following dependencies that cause the issue:
Just the presence of these imports will trigger it to not start up the Function handler.
Here is the console output when I start up:
Here is the test I wrote:
Any insight on how to get it running locally would be great.