File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
code/spring-boot-telemetry/src/main/java/com/azure/examples/springboot/controller Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 11package com .azure .examples .springboot .controller ;
22
3+ import com .azure .examples .springboot .model .Veggie ;
34import org .slf4j .Logger ;
45import org .slf4j .LoggerFactory ;
56import org .springframework .beans .factory .annotation .Value ;
@@ -31,8 +32,10 @@ public class VeggieController {
3132
3233 @ PostMapping ("/init" )
3334 public ResponseEntity <String > initializeDatabase () {
34- veggieService .initializeDatabase ();
35- return ResponseEntity .ok ("Database initialized with 3 veggie items" );
35+ this .addVeggie (VeggieItem .builder ().name ("Carrot" ).description ("Orange" ).build ());
36+ this .addVeggie (VeggieItem .builder ().name ("Broccoli" ).description ("Green" ).build ());
37+ this .addVeggie (VeggieItem .builder ().name ("Cauliflower" ).description ("White" ).build ());
38+ return ResponseEntity .ok ("Database initialized with 3 veggie items" );
3639 }
3740
3841 @ PostMapping
You can’t perform that action at this time.
0 commit comments