JetBrains / JetBrains/kotless

`application.properties` file is missing after deploying Spring Boot application to AWS

Open
#74 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Kotlin
Stars
1.2k
Forks
54
PR merge metrics
No merged PRs in 30d

Description

I'm currently trying to migrate my Spring Boot project to Kotless and I'm having a series of issues.
My application was unable to connect to the database because credentials from `application.properties` file were missing.
Everything was working fine with `gradle local` task, all ports in lambda were open.

After declaring explictly `@PropertySource` in the `MainApplication` class everything is working 🙂
```
@PropertySource(value = ["classpath:application.properties"])
class MainApplication : Kotless() {
override val bootKlass: KClass<*> = this::class
}
```

I'm trying to figure out what's wrong, maybe Kotless is removing `.properties` file while deploying?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the MainApplication entry point and the application.properties resource used by the Spring Boot deployment. Compare the gradle local task with the AWS deployment path to determine why the properties file is unavailable unless @PropertySource is declared explicitly. Done means the deployed application can load application.properties without that workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, kotlin, spring-boot
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.