Create 3 simple cross-platform run configurations

1. Pet Shop Application - Run Spring Boot (main run config)
2. Database - Start database containers
3. Reset Database - Clean volumes and restart (Maven-based, auto-stops)

All use IntelliJ Docker/Spring Boot/Maven integration (Windows/Mac/Linux).
Reset Database uses exec-maven-plugin to run docker compose down -v.
Stops automatically when complete.
This commit is contained in:
2026-03-09 21:47:52 -06:00
parent 015bb574b8
commit 7db2e63b79
2 changed files with 26 additions and 3 deletions

23
pom.xml
View File

@@ -102,6 +102,29 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>docker-down</id>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>docker</executable>
<arguments>
<argument>compose</argument>
<argument>-f</argument>
<argument>docker-compose.dev.yml</argument>
<argument>down</argument>
<argument>-v</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -53,14 +53,14 @@ class RunConfigValidationTest {
// Expected module name in run configs should match artifactId
assertEquals("backend", artifactId,
"pom.xml artifactId has changed. Update .idea/runConfigurations/PetshopBackendApplication.xml module name to match.");
"pom.xml artifactId has changed. Update run configuration files if needed.");
}
@Test
void runConfigurationFileExists() {
File runConfigFile = new File(".idea/runConfigurations/PetshopBackendApplication.xml");
File runConfigFile = new File(".idea/runConfigurations/Pet_Shop_Application.xml");
assertTrue(runConfigFile.exists(),
"Run configuration file missing. Ensure .idea/runConfigurations/ directory is committed to Git.");
"Main run configuration file missing. Ensure .idea/runConfigurations/ directory is committed to Git.");
}
@Test