diff --git a/.gitignore b/.gitignore index 82eca33..f9627f2 100644 --- a/.gitignore +++ b/.gitignore @@ -22,4 +22,7 @@ /nbbuild/ /dist/ /nbdist/ -/.nb-gradle/ \ No newline at end of file +/.nb-gradle/ +/bin/ +/bin/ +/bin/ diff --git a/pom.xml b/pom.xml index ff160fd..37062c2 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ org.springframework.boot spring-boot-starter-parent - 2.0.1.RELEASE + 2.1.0.RELEASE diff --git a/src/main/java/com/example/postgresdemo/PostgresDemoApplication.java b/src/main/java/com/example/postgresdemo/PostgresDemoApplication.java index 29cf2e1..5727225 100644 --- a/src/main/java/com/example/postgresdemo/PostgresDemoApplication.java +++ b/src/main/java/com/example/postgresdemo/PostgresDemoApplication.java @@ -10,4 +10,4 @@ public class PostgresDemoApplication { public static void main(String[] args) { SpringApplication.run(PostgresDemoApplication.class, args); } -} +} \ No newline at end of file diff --git a/src/main/java/com/example/postgresdemo/repository/package.bluej b/src/main/java/com/example/postgresdemo/repository/package.bluej new file mode 100644 index 0000000..e3c61f1 --- /dev/null +++ b/src/main/java/com/example/postgresdemo/repository/package.bluej @@ -0,0 +1,34 @@ +#BlueJ package file +objectbench.height=93 +objectbench.width=760 +package.divider.horizontal=0.6 +package.divider.vertical=0.8003992015968064 +package.editor.height=394 +package.editor.width=651 +package.editor.x=100 +package.editor.y=100 +package.frame.height=600 +package.frame.width=800 +package.numDependencies=0 +package.numTargets=2 +package.showExtends=true +package.showUses=true +readme.height=58 +readme.name=@README +readme.width=47 +readme.x=10 +readme.y=10 +target1.height=50 +target1.name=AnswerRepository +target1.showInterface=false +target1.type=InterfaceTarget +target1.width=140 +target1.x=10 +target1.y=80 +target2.height=50 +target2.name=QuestionRepository +target2.showInterface=false +target2.type=InterfaceTarget +target2.width=150 +target2.x=140 +target2.y=90 diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties new file mode 100644 index 0000000..9b80c1f --- /dev/null +++ b/src/main/resources/application-dev.properties @@ -0,0 +1,17 @@ +## Spring DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties) +## Local Dev connection to DB in a Dev Profile: +## mvn spring-boot:run -Dspring.profiles.active=dev +spring.datasource.url=jdbc:postgresql://localhost:5432/postgres_demo +spring.datasource.username= postgres +spring.datasource.password= password + +## Connection to Heroku PostgreSQL Databae +#spring.datasource.url=${JDBC_DATABASE_URL} +#spring.datasource.username=${JDBC_DATABASE_USERNAME} +#spring.datasource.password=${JDBC_DATABASE_PASSWORD} + +# The SQL dialect makes Hibernate generate better SQL for the chosen database +spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect + +# Hibernate ddl auto (create, create-drop, validate, update) +spring.jpa.hibernate.ddl-auto = update diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index ff398ee..111fcd6 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,7 +1,14 @@ ## Spring DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties) -spring.datasource.url=jdbc:postgresql://localhost:5432/postgres_demo -spring.datasource.username= rajeevkumarsingh -spring.datasource.password= +## Local Dev connection to DB in a Dev Profile: +## mvn spring-boot:run -Dspring.profiles.active=dev +#spring.datasource.url=jdbc:postgresql://localhost:5432/postgres_demo +#spring.datasource.username= postgres +#spring.datasource.password= password + +## Connection to Heroku PostgreSQL Databae +spring.datasource.url=${JDBC_DATABASE_URL} +spring.datasource.username=${JDBC_DATABASE_USERNAME} +spring.datasource.password=${JDBC_DATABASE_PASSWORD} # The SQL dialect makes Hibernate generate better SQL for the chosen database spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect