You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update project configuration for environment variables and dependencies
- Added .env file support for database configuration in README and .gitignore.
- Updated Spring Boot version from 3.4.3 to 3.5.5 in pom.xml.
- Introduced dotenv-java dependency for loading environment variables.
- Refactored CouchbaseConfig to use new property names for connection settings.
- Increased timeout settings for Couchbase connections in application.properties.
- Changed GitHub Actions Java distribution from "adopt" to "temurin".
- Updated test logging to provide clearer messages during cleanup operations.
- Fixed a typo in the expected airline type in AirlineIntegrationTest.
These changes enhance the application's configuration management and improve the clarity of test outputs.
Instead of the DB_CONN_STR, DB_USERNAME and DB_PASSWORD, you need to add the values for the Couchbase connection.
71
+
The application uses environment variables for database configuration. You can set these in your system environment or create a `.env` file in the project root:
72
72
73
-
> Note: The connection string expects the `couchbases://` or `couchbase://` part.
You can also use your system environment variables to set the properties. The properties are read from the environment variables if they are set. The properties are read from the `application.properties` file if the environment variables are not set.
79
+
> Note: The connection string expects the `couchbases://` or `couchbase://` part.
76
80
77
81
## Running The Application
78
82
79
-
You can add environment variables DB_CONN_STR, DB_USERNAME and DB_PASSWORD to your system environment variables or you can update the `application.properties` file in the `src/main/resources` folder.
83
+
The application will automatically load environment variables from a `.env` file if present, or use system environment variables.
Note: The `application.properties` file has the connection information to connect to your Capella cluster. You can also pass the connection information as environment variables to the Docker container.
104
-
If you choose not to pass the environment variables, you can update the `application.properties` file in the `src/main/resources` folder.
107
+
Note: You can pass the connection information as environment variables to the Docker container or include a `.env` file in your Docker build context.
105
108
106
109
### Verifying the Application
107
110
@@ -168,7 +171,7 @@ If you would like to add another entity to the APIs, these are the steps to foll
168
171
169
172
If you are running this quickstart with a self-managed Couchbase cluster, you need to [load](https://docs.couchbase.com/server/current/manage/manage-settings/install-sample-buckets.html) the travel-sample data bucket in your cluster and generate the credentials for the bucket.
170
173
171
-
You need to update the connection string and the credentials in the `application.properties` file in the `src/main/resources` folder.
174
+
You need to set the connection string and credentials using environment variables or a `.env` file as described above.
172
175
173
176
Note: Couchbase Server version 7 or higher must be installed and running before running the Spring Boot Java app.
0 commit comments