Extra. Discuss a key learning or journey you experienced as a result of student lessons. Describe something from lessons that you plan to user or apply in future project.
One key learning journey I experienced through the student lessons was the creation and application of an admin panel in spring. In trimester 1, I did not use spring that much, if at all, as we switched part way through to a different framework. This meant I was actually less knowledgable about the basics of spring going into the lessons. Thus, throughout these lessons I made it a point to pay attention throughout the spring lessons. I had vague ideas of what Thymeleaf was, and same with JWT, but I didn't know how I could complete them. Throughout the two lessons, one I learned from and one I taught, I gained knowledge about how useful an admin panel that displays all data related to the system can be, and how it can be created by sending JWT tokens and/or storing these JWT tokens in cookies in order to ensure their access throughout the system. The reason I taught a lot during my section about login redirection is because as I was researching that alongside the rest of the JWT research, I found myself growing really interested in the concepts. Similarly with Thymeleaf, I noticed the huge advantage server-side requests had, and that these requests could make management of the system easier than making many different postman requests to the server. So much so I'd like to think I went above and beyond, with the thymeleaf section in particular allowing the display of jokes, but also an easy-to-parse UI that changes color depending on whether the jokes are funny or not.
Controller (Thymeleaf)
package com.nighthawk.spring_portfolio.controllers;
import java.util.List;
import java.util.ArrayList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import com.nighthawk.spring_portfolio.mvc.jokes.JokesJpaRepository;
import com.nighthawk.spring_portfolio.mvc.jokes.Jokes;
@Controller
public class HelloController {
@Autowired
private JokesJpaRepository repository;
@GetMapping("/hello")
public String hello(Model model) {
List<Jokes> jokes = repository.findAll();
model.addAttribute("jokes", jokes);
return "thyme"; // This corresponds to the Thymeleaf template name (src/main/resources/templates/hello.html)
}
}
Extra. Discuss a key learning or journey you experienced as a result of student lessons. Describe something from lessons that you plan to user or apply in future project.
One key learning journey I experienced through the student lessons was the creation and application of an admin panel in spring. In trimester 1, I did not use spring that much, if at all, as we switched part way through to a different framework. This meant I was actually less knowledgable about the basics of spring going into the lessons. Thus, throughout these lessons I made it a point to pay attention throughout the spring lessons. I had vague ideas of what Thymeleaf was, and same with JWT, but I didn't know how I could complete them. Throughout the two lessons, one I learned from and one I taught, I gained knowledge about how useful an admin panel that displays all data related to the system can be, and how it can be created by sending JWT tokens and/or storing these JWT tokens in cookies in order to ensure their access throughout the system. The reason I taught a lot during my section about login redirection is because as I was researching that alongside the rest of the JWT research, I found myself growing really interested in the concepts. Similarly with Thymeleaf, I noticed the huge advantage server-side requests had, and that these requests could make management of the system easier than making many different postman requests to the server. So much so I'd like to think I went above and beyond, with the thymeleaf section in particular allowing the display of jokes, but also an easy-to-parse UI that changes color depending on whether the jokes are funny or not.
Controller (Thymeleaf)
Page
Final Product