diff --git a/build.gradle b/build.gradle index e53f89c3..69614360 100755 --- a/build.gradle +++ b/build.gradle @@ -32,18 +32,22 @@ dependencies { compile('org.springframework.boot:spring-boot-starter-data-mongodb') compile('org.springframework.boot:spring-boot-starter-thymeleaf') compile('org.springframework.boot:spring-boot-starter-web') + compile('org.springframework.boot:spring-boot-starter-webflux') runtime('org.springframework.boot:spring-boot-devtools') - compile('de.flapdoodle.embed:de.flapdoodle.embed.mongo') - compile group: 'cz.jirutka.spring', name: 'embedmongo-spring', version: '1.3.1' + compile('de.flapdoodle.embed:de.flapdoodle.embed.mongo') + compile('org.springframework.boot:spring-boot-starter-data-mongodb-reactive') + compile group: 'cz.jirutka.spring', name: 'embedmongo-spring', version: '1.3.1' compile 'org.webjars:bootstrap:3.3.7-1' compileOnly('org.projectlombok:lombok') testCompile('org.springframework.boot:spring-boot-starter-test') + testCompile('io.projectreactor:reactor-test') + } //export test coverage jacocoTestReport { - reports { - xml.enabled true - html.enabled false - } + reports { + xml.enabled true + html.enabled false + } } \ No newline at end of file diff --git a/out/production/resources/application.properties b/out/production/resources/application.properties new file mode 100644 index 00000000..87a7f361 --- /dev/null +++ b/out/production/resources/application.properties @@ -0,0 +1,2 @@ +spring.data.mongodb.port=0 +spring.data.mongodb.host=localhost \ No newline at end of file diff --git a/out/production/resources/messages.properties b/out/production/resources/messages.properties new file mode 100644 index 00000000..28000e1e --- /dev/null +++ b/out/production/resources/messages.properties @@ -0,0 +1,13 @@ +# Set names of properties +recipe.description=Description + +#Validaiton Messages +#Order of precedence +# 1 code.objectName.fieldName +# 2 code.fieldName +# 3 code.fieldType (Java data type) +# 4 code +NotBlank.recipe.description=Description Cannot Be Blank +Size.recipe.description={0} must be between {2} and {1} characters long. +Max.recipe.cookTime={0} must be less than {1} +URL.recipe.url=Please provide a valid URL diff --git a/out/production/resources/messages_en_GB.properties b/out/production/resources/messages_en_GB.properties new file mode 100644 index 00000000..d12d5c61 --- /dev/null +++ b/out/production/resources/messages_en_GB.properties @@ -0,0 +1 @@ +recipe.description=Description (GB) \ No newline at end of file diff --git a/out/production/resources/messages_en_US.properties b/out/production/resources/messages_en_US.properties new file mode 100644 index 00000000..52e42e16 --- /dev/null +++ b/out/production/resources/messages_en_US.properties @@ -0,0 +1 @@ +recipe.description=Description (US) \ No newline at end of file diff --git a/out/production/resources/static/images/guacamole400x400.jpg b/out/production/resources/static/images/guacamole400x400.jpg new file mode 100644 index 00000000..2362c157 Binary files /dev/null and b/out/production/resources/static/images/guacamole400x400.jpg differ diff --git a/out/production/resources/static/images/guacamole400x400WithX.jpg b/out/production/resources/static/images/guacamole400x400WithX.jpg new file mode 100644 index 00000000..20ffe805 Binary files /dev/null and b/out/production/resources/static/images/guacamole400x400WithX.jpg differ diff --git a/out/production/resources/static/images/tacos400x400.jpg b/out/production/resources/static/images/tacos400x400.jpg new file mode 100644 index 00000000..8004ff07 Binary files /dev/null and b/out/production/resources/static/images/tacos400x400.jpg differ diff --git a/out/production/resources/templates/400error.html b/out/production/resources/templates/400error.html new file mode 100644 index 00000000..cd51097b --- /dev/null +++ b/out/production/resources/templates/400error.html @@ -0,0 +1,30 @@ + + + + + 404 Not Found Error + + + + + + + + + + +
+
+
+

400 Bad Request

+

+
+
+
+ + + \ No newline at end of file diff --git a/out/production/resources/templates/404error.html b/out/production/resources/templates/404error.html new file mode 100644 index 00000000..c3a52099 --- /dev/null +++ b/out/production/resources/templates/404error.html @@ -0,0 +1,30 @@ + + + + + 404 Not Found Error + + + + + + + + + + +
+
+
+

404 Not Found

+

+
+
+
+ + + \ No newline at end of file diff --git a/out/production/resources/templates/index.html b/out/production/resources/templates/index.html new file mode 100644 index 00000000..527d379a --- /dev/null +++ b/out/production/resources/templates/index.html @@ -0,0 +1,68 @@ + + + + + Recipe Home + + + + + + + + + + + + +
+
+
+
+ +
+

My Recipes!

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
IDDescriptionViewUpdateDelete
123Tasty Goodnees 1View
12333Tasty Goodnees 2View
334Tasty Goodnees 3ViewUpdateDelete
+
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/out/production/resources/templates/recipe/imageuploadform.html b/out/production/resources/templates/recipe/imageuploadform.html new file mode 100644 index 00000000..2f8b2fcc --- /dev/null +++ b/out/production/resources/templates/recipe/imageuploadform.html @@ -0,0 +1,47 @@ + + + + + Image Upload Form + + + + + + + + + + + +
+
+
+
+
+
+

Upload a new recipe image

+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+ + \ No newline at end of file diff --git a/out/production/resources/templates/recipe/ingredient/ingredientform.html b/out/production/resources/templates/recipe/ingredient/ingredientform.html new file mode 100644 index 00000000..4e36df1e --- /dev/null +++ b/out/production/resources/templates/recipe/ingredient/ingredientform.html @@ -0,0 +1,64 @@ + + + + + Edit Ingredient + + + + + + + + + + +
+
+
+ +
+ +
+
+
+

Edit Ingredient Information

+
+
+ + +
+
+ + +
+ +
+ + +
+ +
+ + +
+
+
+
+ +
+
+
+
+
+ + \ No newline at end of file diff --git a/out/production/resources/templates/recipe/ingredient/list.html b/out/production/resources/templates/recipe/ingredient/list.html new file mode 100644 index 00000000..0fd2c95e --- /dev/null +++ b/out/production/resources/templates/recipe/ingredient/list.html @@ -0,0 +1,80 @@ + + + + + List Ingredients + + + + + + + + + + + + +
+
+
+
+ +
+
+
+

Ingredients

+
+
+ New +
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IDDescriptionViewUpdateDelete
123Tasty Goodnees 1ViewUpdateDelete
12333Tasty Goodnees 2ViewUpdateDelete
334Tasty Goodnees 3ViewUpdateDelete
+
+
+
+
+
+
+ + \ No newline at end of file diff --git a/out/production/resources/templates/recipe/ingredient/show.html b/out/production/resources/templates/recipe/ingredient/show.html new file mode 100644 index 00000000..2c2dd0ce --- /dev/null +++ b/out/production/resources/templates/recipe/ingredient/show.html @@ -0,0 +1,59 @@ + + + + + View Ingredient + + + + + + + + + + + +
+
+
+
+ +
+

Ingredient

+
+
+ +
+ + + + + + + + + + + + + + + + + + +
IDDescription
12333Tasty Goodnees 2ViewUpdateDelete
334Tasty Goodnees 3
+
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/out/production/resources/templates/recipe/recipeform.html b/out/production/resources/templates/recipe/recipeform.html new file mode 100644 index 00000000..ba84b953 --- /dev/null +++ b/out/production/resources/templates/recipe/recipeform.html @@ -0,0 +1,201 @@ + + + + + Recipe Form + + + + + + + + + + + +
+
+
+
+ +
+

Please Correct Errors Below

+
+ + +
+
+
+

Edit Recipe Information

+
+
+
+
+ + + +
    +
  • +
+
+
+
+
+
+ +
+
+
+ +
+
+ +
+
+
+
+
+ + + +
    +
  • +
+
+
+
+ + + +
    +
  • +
+
+
+
+ + + +
+
+
+
+ + + +
    +
  • +
+
+
+
+ + +
+
+ + + +
    +
  • +
+
+
+
+
+
+
+
+
+
+

Ingredients

+
+
+ View +
+
+
+
+
+
+
    +
  • 1 Cup of milk
  • +
  • 1 Teaspoon of chocolate
  • +
  • asdf
  • +
  • 1 Teaspoon of Sugar +
  • +
+
+ + + + +
+
+ +
+
+
+
+
+
+
+

Directions

+
+
+
+
+
+
+
+
+
+
+

Notes

+
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+ + \ No newline at end of file diff --git a/out/production/resources/templates/recipe/show.html b/out/production/resources/templates/recipe/show.html new file mode 100644 index 00000000..a82f3f55 --- /dev/null +++ b/out/production/resources/templates/recipe/show.html @@ -0,0 +1,183 @@ + + + + + Show Recipe + + + + + + + + + + + +
+
+
+
+
+
+
+
+

Recipe Description Here!

+
+ + +
+
+
+
+
+
Categories:
+
+
+
    +
  • cat one
  • +
  • cat two
  • +
  • cat three +
  • +
+
+
+ +
+
+
+
+
Prep Time:
+
+
+

30 min

+
+
+
Difficulty:
+
+
+

Easy

+
+
+
+
+
Cooktime:
+
+
+

30 min

+
+
+
Servings:
+
+
+

4

+
+
+
+
+
Source:
+
+
+

30 min

+
+
+
URL:
+
+ +
+
+
+
+
+
+
+

Ingredients

+
+
+ View +
+
+
+
+
+
+
    +
  • 1 Cup of milk
  • +
  • 1 Teaspoon of chocolate
  • +
  • 1 Teaspoon of Sugar +
  • +
+
+
+
+
+
+
+

Directions

+
+
+
+
+

Lorem ipsum dolor sit amet, consectetuer adipiscing + elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus + et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies + nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede + justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, + imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. + Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate + eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, + enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus + viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam + ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam + rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, + sit amet adipiscing sem neque sed ipsum.

+
+
+
+
+
+
+

Notes

+
+
+
+
+

Lorem ipsum dolor sit amet, consectetuer + adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque + penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, + ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. + Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, + rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis + pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean + vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, + eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. + Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. + Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. + Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper + libero, sit amet adipiscing sem neque sed ipsum.

+
+
+
+
+
+
+
+
+ + \ No newline at end of file diff --git a/src/main/java/guru/springframework/bootstrap/RecipeBootstrap.java b/src/main/java/guru/springframework/bootstrap/RecipeBootstrap.java index b691ad64..691211ef 100755 --- a/src/main/java/guru/springframework/bootstrap/RecipeBootstrap.java +++ b/src/main/java/guru/springframework/bootstrap/RecipeBootstrap.java @@ -4,7 +4,9 @@ import guru.springframework.repositories.CategoryRepository; import guru.springframework.repositories.RecipeRepository; import guru.springframework.repositories.UnitOfMeasureRepository; +import guru.springframework.repositories.reactive.UnitOfMeasureReactiveRepository; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationListener; import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.stereotype.Component; @@ -26,6 +28,9 @@ public class RecipeBootstrap implements ApplicationListener