From 5aa2f1a215b12406a54de29251c499bf03ece4ed Mon Sep 17 00:00:00 2001 From: Andrew Lalis Date: Tue, 16 Apr 2019 09:22:14 +0200 Subject: [PATCH] Refactored sample data generation into its own package. --- .../TeachingAssistantAssistantApplication.java | 2 +- .../util/{ => sample_data}/CourseGenerator.java | 2 +- .../util/{ => sample_data}/PersonGenerator.java | 2 +- .../util/{ => sample_data}/StudentGenerator.java | 2 +- .../util/{ => sample_data}/StudentTeamGenerator.java | 2 +- .../util/{ => sample_data}/TeachingAssistantGenerator.java | 2 +- .../util/{ => sample_data}/TeachingAssistantTeamGenerator.java | 2 +- .../util/{ => sample_data}/TeamGenerator.java | 2 +- .../util/{ => sample_data}/TestDataGenerator.java | 2 +- src/main/resources/application.properties | 3 +++ 10 files changed, 12 insertions(+), 9 deletions(-) rename src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/{ => sample_data}/CourseGenerator.java (98%) rename src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/{ => sample_data}/PersonGenerator.java (95%) rename src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/{ => sample_data}/StudentGenerator.java (86%) rename src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/{ => sample_data}/StudentTeamGenerator.java (89%) rename src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/{ => sample_data}/TeachingAssistantGenerator.java (88%) rename src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/{ => sample_data}/TeachingAssistantTeamGenerator.java (91%) rename src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/{ => sample_data}/TeamGenerator.java (94%) rename src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/{ => sample_data}/TestDataGenerator.java (94%) diff --git a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/TeachingAssistantAssistantApplication.java b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/TeachingAssistantAssistantApplication.java index 92ffa70..2a105f5 100644 --- a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/TeachingAssistantAssistantApplication.java +++ b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/TeachingAssistantAssistantApplication.java @@ -4,7 +4,7 @@ import nl.andrewlalis.teaching_assistant_assistant.model.Course; import nl.andrewlalis.teaching_assistant_assistant.model.repositories.CourseRepository; import nl.andrewlalis.teaching_assistant_assistant.model.repositories.PersonRepository; import nl.andrewlalis.teaching_assistant_assistant.model.repositories.TeamRepository; -import nl.andrewlalis.teaching_assistant_assistant.util.CourseGenerator; +import nl.andrewlalis.teaching_assistant_assistant.util.sample_data.CourseGenerator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.SpringApplication; diff --git a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/CourseGenerator.java b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/sample_data/CourseGenerator.java similarity index 98% rename from src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/CourseGenerator.java rename to src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/sample_data/CourseGenerator.java index d9b16cf..eecf759 100644 --- a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/CourseGenerator.java +++ b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/sample_data/CourseGenerator.java @@ -1,4 +1,4 @@ -package nl.andrewlalis.teaching_assistant_assistant.util; +package nl.andrewlalis.teaching_assistant_assistant.util.sample_data; import nl.andrewlalis.teaching_assistant_assistant.model.Course; import nl.andrewlalis.teaching_assistant_assistant.model.people.Student; diff --git a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/PersonGenerator.java b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/sample_data/PersonGenerator.java similarity index 95% rename from src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/PersonGenerator.java rename to src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/sample_data/PersonGenerator.java index c4750a5..f849afb 100644 --- a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/PersonGenerator.java +++ b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/sample_data/PersonGenerator.java @@ -1,4 +1,4 @@ -package nl.andrewlalis.teaching_assistant_assistant.util; +package nl.andrewlalis.teaching_assistant_assistant.util.sample_data; import nl.andrewlalis.teaching_assistant_assistant.model.people.Person; diff --git a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/StudentGenerator.java b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/sample_data/StudentGenerator.java similarity index 86% rename from src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/StudentGenerator.java rename to src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/sample_data/StudentGenerator.java index 6d1df25..23240c4 100644 --- a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/StudentGenerator.java +++ b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/sample_data/StudentGenerator.java @@ -1,4 +1,4 @@ -package nl.andrewlalis.teaching_assistant_assistant.util; +package nl.andrewlalis.teaching_assistant_assistant.util.sample_data; import nl.andrewlalis.teaching_assistant_assistant.model.people.Student; diff --git a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/StudentTeamGenerator.java b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/sample_data/StudentTeamGenerator.java similarity index 89% rename from src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/StudentTeamGenerator.java rename to src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/sample_data/StudentTeamGenerator.java index 855fa29..80c5385 100644 --- a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/StudentTeamGenerator.java +++ b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/sample_data/StudentTeamGenerator.java @@ -1,4 +1,4 @@ -package nl.andrewlalis.teaching_assistant_assistant.util; +package nl.andrewlalis.teaching_assistant_assistant.util.sample_data; import nl.andrewlalis.teaching_assistant_assistant.model.people.Student; import nl.andrewlalis.teaching_assistant_assistant.model.people.teams.StudentTeam; diff --git a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/TeachingAssistantGenerator.java b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/sample_data/TeachingAssistantGenerator.java similarity index 88% rename from src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/TeachingAssistantGenerator.java rename to src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/sample_data/TeachingAssistantGenerator.java index 9e1507d..e4c9a89 100644 --- a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/TeachingAssistantGenerator.java +++ b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/sample_data/TeachingAssistantGenerator.java @@ -1,4 +1,4 @@ -package nl.andrewlalis.teaching_assistant_assistant.util; +package nl.andrewlalis.teaching_assistant_assistant.util.sample_data; import nl.andrewlalis.teaching_assistant_assistant.model.people.TeachingAssistant; diff --git a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/TeachingAssistantTeamGenerator.java b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/sample_data/TeachingAssistantTeamGenerator.java similarity index 91% rename from src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/TeachingAssistantTeamGenerator.java rename to src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/sample_data/TeachingAssistantTeamGenerator.java index abc2557..1b2e8f3 100644 --- a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/TeachingAssistantTeamGenerator.java +++ b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/sample_data/TeachingAssistantTeamGenerator.java @@ -1,4 +1,4 @@ -package nl.andrewlalis.teaching_assistant_assistant.util; +package nl.andrewlalis.teaching_assistant_assistant.util.sample_data; import nl.andrewlalis.teaching_assistant_assistant.model.people.TeachingAssistant; import nl.andrewlalis.teaching_assistant_assistant.model.people.teams.TeachingAssistantTeam; diff --git a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/TeamGenerator.java b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/sample_data/TeamGenerator.java similarity index 94% rename from src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/TeamGenerator.java rename to src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/sample_data/TeamGenerator.java index 5353b37..da35817 100644 --- a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/TeamGenerator.java +++ b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/sample_data/TeamGenerator.java @@ -1,4 +1,4 @@ -package nl.andrewlalis.teaching_assistant_assistant.util; +package nl.andrewlalis.teaching_assistant_assistant.util.sample_data; import nl.andrewlalis.teaching_assistant_assistant.model.people.Person; import nl.andrewlalis.teaching_assistant_assistant.model.people.teams.Team; diff --git a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/TestDataGenerator.java b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/sample_data/TestDataGenerator.java similarity index 94% rename from src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/TestDataGenerator.java rename to src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/sample_data/TestDataGenerator.java index 45224c7..c11de52 100644 --- a/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/TestDataGenerator.java +++ b/src/main/java/nl/andrewlalis/teaching_assistant_assistant/util/sample_data/TestDataGenerator.java @@ -1,4 +1,4 @@ -package nl.andrewlalis.teaching_assistant_assistant.util; +package nl.andrewlalis.teaching_assistant_assistant.util.sample_data; import java.util.ArrayList; import java.util.List; diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index bb2d8eb..e12669e 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -5,3 +5,6 @@ spring.jpa.hibernate.ddl-auto=create #spring.jpa.properties.hibernate.use_sql_comments=true #spring.jpa.properties.hibernate.format_sql=true #spring.jpa.properties.hibernate.type=trace + +spring.security.user.name=tester +spring.security.user.password=tester