Replace `application.properties` with `config.properties`:
- Renamed configuration file to `config.properties` for consistency. - Updated `MediaManagerApplication` to load the new configuration file. - Adjusted references in `README.md` and `.gitignore`.
This commit is contained in:
parent
86da601ad6
commit
885d5c95a4
|
|
@ -39,7 +39,7 @@ build/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
### Application Specific ###
|
### Application Specific ###
|
||||||
application-local.properties
|
config-local.properties
|
||||||
*.db
|
*.db
|
||||||
pipes/
|
pipes/
|
||||||
*.log
|
*.log
|
||||||
|
|
|
||||||
10
README.md
10
README.md
|
|
@ -34,7 +34,7 @@ MediaManager-Core/
|
||||||
│ │ ├── util/ # Utility classes
|
│ │ ├── util/ # Utility classes
|
||||||
│ │ └── MediaManagerApplication.java
|
│ │ └── MediaManagerApplication.java
|
||||||
│ └── resources/
|
│ └── resources/
|
||||||
│ ├── application.properties # App configuration
|
│ ├── config.properties # App configuration
|
||||||
│ ├── log4j2.xml # Logging configuration
|
│ ├── log4j2.xml # Logging configuration
|
||||||
│ └── META-INF/
|
│ └── META-INF/
|
||||||
│ └── persistence.xml # JPA configuration
|
│ └── persistence.xml # JPA configuration
|
||||||
|
|
@ -55,7 +55,7 @@ GRANT ALL PRIVILEGES ON DATABASE mediamanager TO mediamanager;
|
||||||
|
|
||||||
### 2. Configuration
|
### 2. Configuration
|
||||||
|
|
||||||
Edit `src/main/resources/application.properties` and update the database credentials:
|
Edit `src/main/resources/config.properties` and update the database credentials:
|
||||||
|
|
||||||
```properties
|
```properties
|
||||||
db.url=jdbc:postgresql://localhost:5432/mediamanager
|
db.url=jdbc:postgresql://localhost:5432/mediamanager
|
||||||
|
|
@ -90,7 +90,7 @@ The application creates named pipes for inter-process communication. Default con
|
||||||
- Pipe name: `mediamanager-pipe`
|
- Pipe name: `mediamanager-pipe`
|
||||||
- Buffer size: 8192 bytes
|
- Buffer size: 8192 bytes
|
||||||
|
|
||||||
You can modify these settings in `application.properties`.
|
You can modify these settings in `config.properties`.
|
||||||
|
|
||||||
## Logging
|
## Logging
|
||||||
|
|
||||||
|
|
@ -116,8 +116,8 @@ mvn test
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
- PostgreSQL Driver: 42.7.3
|
- PostgreSQL Driver: 42.7.5
|
||||||
- Hibernate ORM: 6.4.4.Final
|
- Hibernate ORM: 7.1.7.Final
|
||||||
- HikariCP: 5.1.0
|
- HikariCP: 5.1.0
|
||||||
- Log4j 2: 2.23.1
|
- Log4j 2: 2.23.1
|
||||||
- Jackson: 2.16.1
|
- Jackson: 2.16.1
|
||||||
|
|
|
||||||
|
|
@ -40,9 +40,9 @@ public class MediaManagerApplication {
|
||||||
private static void loadConfiguration() throws IOException {
|
private static void loadConfiguration() throws IOException {
|
||||||
config = new Properties();
|
config = new Properties();
|
||||||
try (InputStream input = MediaManagerApplication.class.getClassLoader()
|
try (InputStream input = MediaManagerApplication.class.getClassLoader()
|
||||||
.getResourceAsStream("application.properties")) {
|
.getResourceAsStream("config.properties")) {
|
||||||
if (input == null) {
|
if (input == null) {
|
||||||
throw new IOException("Unable to find application.properties");
|
throw new IOException("Unable to find config.properties");
|
||||||
}
|
}
|
||||||
config.load(input);
|
config.load(input);
|
||||||
logger.info("Configuration loaded successfully");
|
logger.info("Configuration loaded successfully");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue