aman-1998 / Full_Stack_Development_Part_III

This is a tutorial to learn Spring, Spring-boot, Restful web-services and one of the most popular logging framework i.e., Logback. The IDE used is Spring Tool Suite 4 (STS4)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


Note:-

The folders are named as conceptName_NserialNo, for example Dependency_Injection_N13, Spring_Bean_N21, etc. It is recommended to follow the order while learning. This tutorial will be extremely beneficial for those who want to learn advanced back-end and front-end in Java.

About:-

  • Spring5_Dependency_Injection_N38

    - This is an app to understand bean creation by Spring in runtime using @Component annotation. Here, Spring will create the object in runtime and inject it. @ComponentScan is used along with @Configuration to specify the packages that are to be scanned by spring. The configuration will be applicable only for those packages.
  • Spring5_Autowire_N39

    - This is an app to understand dependency injection using @Autowired annotation. Here, Spring will try to create object for classes with @Component annotation. During creation of object if some properties needed to be injected with their object (i.e., if there are some dependencies) then spring will take care of that in runtime. @ComponentScan is used along with @Configuration to specify the packages that are to be scanned by spring. The configuration will be applicable only for those packages.
  • Spring5_Aitowire_Qualifier_N40

    - This is an app to understand the use of @Qualifier annotation. Here, Spring will try to create object for the class with @Component annotation during object creation if there is any dependency which is ambiguous then that ambiguity can be resolved using @Qualifier annotation. @ComponentScan is used along with @Configuration to specify the packages that are to be scanned by spring. The configuration will be applicable only for those packages.
  • Spring5_Spring_Bean_and_Constructor_Injection_N41

    - This is an app to understand bean declaration using @Bean annotation and also the example of constructor-injection is covered. @ComponentScan is used along with @Configuration to specify the packages that are to be scanned by spring. The configuration will be applicable only for those packages.
  • Spring5_Spring_MVC_minimal_setup_N42

    - This is an app with minimal setup and dependencies in pom.xml to start Spring MVC. Here, @RequestMapping annotation is used inside controller class (with @Controller annotation) to map the request url. SpringSample-servlet.xml file in WEB-INF folder has the Bean configuration to tell Spring about the location of view (.jsp) files.
  • Spring5_Spring_MVC_basic_form_N43

    - This is an app with basic form. Form is submitted to an url which is mapped with an API in controller class. In that API all the field value are extracted using HttpServletRequest object and then these values are passed to JSP view using the same HttpServletRequest object (eg., request.setAttribute("gender", gender)). In JSP file values are displayed using JSP Scripting Elements (eg., <%= request.getAttribute("gender") %>). SpringSample-servlet.xml file in WEB-INF folder has the Bean configuration to tell Spring about the location of view (.jsp) files.
  • Spring5_SpringMVC_form_requestParam_model_N44

    - In this app, when form is being submitted to an url which is mapped to displayInfo API in controller, the field values are extracted using @RequestParam in the API and then these values are passed to the JSP view using Model object (eg., model.addAttribute("languages", languages)). In JSP page, field values are displayed using expression language and JSTL tags. SpringSample-servlet.xml file in WEB-INF folder has the Bean configuration to tell Spring about the location of view (.jsp) files.
  • Spring5_SpringMVC_form_modelAndView_N45

    - In this app, when form is being submitted to an url which is mapped to displayInfo API in controller, the field values are extracted using @RequestParam in the API and then these values are passed to the JSP view using ModelAndView object (eg., modelAndView.addObject("languages", languages)). In JSP pages, field values are displayed using expression language and JSTL tags. SpringSample-servlet.xml file in WEB-INF folder has the Bean configuration to tell Spring about the location of view (.jsp) files.
  • Spring5_SpringMVC_form_using_css_js_validation_N46

    - In this app, when form is being submitted, there will be client-side validations. If validation passes then the form will be submitted to an url which is mapped to displayInfo API in controller. The field values are extracted using @RequestParam in the API. Then there will be a validation in the server-side (even when javaScript is disabled for the browser, server-side validation will work). If there is no server-side validation then these values are passed to the 'displayInformation' JSP view using ModelAndView object (eg., modelAndView.addObject("languages", languages)). In JSP pages, field values are displayed using expression language and JSTL tags. SpringSample-servlet.xml file in WEB-INF folder has the Bean configuration to tell Spring about the location of view (.jsp) files.
  • Spring5_SpringMVC_form_customized_error_message_N47

    - In this app, when form is being submitted, there will be client-side validations. If validation passes then the form will be submitted to an url which is mapped to displayInfo API in controller. The field values are extracted using @RequestParam in the API. Then there will be a validation in the server-side (even when javaScript is disabled for the browser, server-side validation will work). If there is no server-side validation then these values are passed to the 'displayInformation' JSP view using ModelAndView object (eg., modelAndView.addObject("languages", languages)). In JSP pages, field values are displayed using expression language and JSTL tags and are beautified with CSS. SpringSample-servlet.xml file in WEB-INF folder has the Bean configuration to tell Spring about the location of view (.jsp) files.
  • Spring5_SpringMVC_form_element_N48

    - In this app, customer-form is made using JSTL form elements. When customer-form is being submitted, there will be client-side validations. If validation passes then the form will be submitted to an url which is mapped to displayInformation API in controller. The field values are extracted from Customer entity using @ModelAttribute in the API. Then there will be a validation in the server-side (even when javaScript is disabled for the browser, server-side validation will work). If there is no server-side validation then the entity is passed to the 'displayInformation' JSP view using ModelAndView object (eg., modelAndView.addObject("customer", customer)). In JSP pages, field values are displayed using expression language and JSTL tags and are beautified with CSS. SpringSample-servlet.xml file in WEB-INF folder has the Bean configuration to tell Spring about the location of view (.jsp) files.
  • Spring5_SpringMVC_form_elements_N49

    - In this app, customer-form is made using JSTL form elements and radio, dropdown and checkboxes are populated dynamically using Map. When customer-form is being submitted, there will be client-side validations. If validation passes then the form will be submitted to an url which is mapped to displayInformation API in controller. The field values are extracted from Customer entity using @ModelAttribute in the API. Then there will be a validation in the server-side (even when javaScript is disabled for the browser, server-side validation will work). If there is no server-side validations then the entity is passed to the 'displayInformation' JSP view using ModelAndView object (eg., modelAndView.addObject("customer", customer)). In JSP pages, field values are displayed using expression language and JSTL tags and are beautified with CSS. SpringSample-servlet.xml file in WEB-INF folder has the Bean configuration to tell Spring about the location of view (.jsp) files.
  • Spring5_SpringMVC_form_repopulation_validation_N50

    - In this app, customer-form is made using JSTL form elements and radio, dropdown and checkboxes are populated dynamically using Map. When customer-form is being submitted, there will be client-side validations. If validation passes then the form will be submitted to an url which is mapped to displayInformation API in controller. The field values are extracted from Customer entity using @ModelAttribute in the API. Then there will be a validation in the server-side. To display these server-side validation error messages in the customer-form, the form is repopulated with submitted values and error messages are shown using object of BindingResult (even when javaScript is disabled for the browser, server-side validation will work). If there is no server-side validation then the entity is passed to the 'displayInformation' JSP view using ModelAndView object (eg., modelAndView.addObject("customer", customer)). In JSP pages, field values are displayed using expression language and JSTL tags and are beautified with CSS. SpringSample-servlet.xml file in WEB-INF folder has the Bean configuration to tell Spring about the location of view (.jsp) files.
  • Spring5_SpringMVC_form_hibernate_validator_N51

    - In this app, customer-form is made using JSTL form elements and radio, dropdown and checkboxes are populated dynamically using Map. When customer-form is being submitted, there will be client-side validations. If validation passes then the form will be submitted to an url which is mapped to displayInformation API in controller. The field values are extracted from Customer entity using @ModelAttribute in the API. Then there will be a validation in the server-side. Server-side validation is achieved using custom validate method as well as by using annotations on property of Customer entity (Hibernate-Validator). To make hibernate-validator work we need to use @Valid annotation. To display these server-side validation error messages in the customer-form, the form is repopulated with submitted values and error messages are shown using object of BindingResult (even when javaScript is disabled for the browser, server-side validation will work). If there is no server-side validation then the entity is passed to the 'displayInformation' JSP view using ModelAndView object (eg., modelAndView.addObject("customer", customer)). In JSP pages, field values are displayed using expression language and JSTL tags and are beautified with CSS. SpringSample-servlet.xml file in WEB-INF folder has the Bean configuration to tell Spring about the location of view (.jsp) and template files.
  • Spring5_SpringMVC_DB_connectivity_usingXMLconfig_N52

    - In this app, there is customer-form. One can create a customer by submitting the form. Both cliet-side and server-side validations are added in the app. If javaScript for the browser is disabled then, also server-side validation will work. Both server and client side validation messages are shown on Customer-Form UI. To connect with database xml based configuration is used. User can update and delete from UI.
  • Spring5_SpringMVC_DB_connectivity_Annotation_CRUD_N53

    - In this app, there is customer-form. One can create a customer by submitting the form. Both cliet-side and server-side validations are added in the app. If javaScript for the browser is disabled then, also server-side validation will work. Both server and client side validation messages are shown on Customer-Form UI. To connect with database Annotation based configuration is used. User can update and delete from UI.


    Client Side validation


    Server Side validation when JavaScript is off for the browser


    List of registered users

  • RestApp_using_JERSEY_N54

    - This is a very simple rest-app to show the use of diffrent JERSEY based annotations like @GET, @POST, @PUT, @DELETE, @Path, @PathParam and @Produces. JERSEY is an implementation of JAX-RS 2.0 by Oracle. JAX-RS stands for JAVA API for RESTFUL Web Services. It provides us a java based API which supports in creation of REST(Representational State Transfer) APIs. A collection REST APIs is called RESTful Webservices.
  • RestApp_JERSEY_CRUD_simulation_N55

    - This a rest-app to simulate CRUD operations using List instead of actual database.
  • RestApp_JERSEY_CRUD_db_connectivity_using_hibernate_N56

    - This is a rest-app in which supports CRUD operation on Brand table in database. There is a POJO class Brand which represents database table with name Brand. Hiibernate is connected to the database using hibernate.cfg.xml file. Since, Brand is the entity class, so, different annotations(like @Entity, @Table, @Id, @Column, etc) are used to tell hibernate about the specifications of the entity. @GeneratedValue and @SequenceGenerator is used to auto-increment Brand_Id (pk) using the BRAND_SEQUENCE which is a sequence in the oracle database to generate Brand_Id by incrementing one. The the REST APIs in this app will produce and consume XML data.
  • RestApp_JERSEY_CRUD_with_JSON_N57

    - This is a rest-app in which supports CRUD operation on Brand table in database. There is a POJO class Brand which represents database table with name Brand. Hiibernate is connected to the database using hibernate.cfg.xml file. Since, Brand is the entity class, so, different annotations(like @Entity, @Table, @Id, @Column, etc) are used to tell hibernate about the specifications of the entity. @GeneratedValue and @SequenceGenerator is used to auto-increment Brand_Id (pk) using the BRAND_SEQUENCE which is a sequence in the oracle database to generate Brand_Id by incrementing one. The the REST APIs in this app will produce and consume JSON data.
  • RestApp_JERSEY_adding_subResource_N58

    - This is a rest-app in which there are two POJO classes Brand and Product. APIs are called based on endpoints and type of request. The type of data consumed during POST and PUT request is JSON and PLAIN_TEXT is returned in response. The type of data produced during GET request is JSON and during DELETE is PLAIN_TEXT.


    Brand Table


    Product Table

  • RestApp_JERSEY_add_subResource_many_to_one_N59

    - In this rest-app, the JSON response that is received for Product contains Brand information. This is achieved by using referential integrity i.e., @ManyToOne and @JoinColumn annotations in the Product POJO class.
  • RestApp_JERSEY_seperate_resource_for_subResource_N60

    - In this rest-app, there is a seperate resource for both Brand and Product. All APIs for product information will be inside Product resource and the same is applicable for Brand. This approach better and easy to maintain and scale.
  • RestApp_JERSEY_delegation_of_url_to_subResource_N61

    - In this rest-app, there is a seperate resource for both Brand and Product. All APIs for product information will be inside Product resource but the call to those APIs is delegated from APIs present in brand resource. This approach not recommended as it is difficult to maintain and scale.
  • RestApp_JERSEY_filter_using_QueryParam_N62

    - In this rest-app, @QueryParam is used to read query parameters.
  • RestApp_JERSEY_pagination_using_QueryParam_N63

    - In this rest-app, getProductsByBrand API in ProductResource has to return based on category and size whose values are read using @QueryParam.
  • RestApp_JERSEY_HeaderParam_CookieParam_N64

    - In this rest-app header and cookie values are read by using @HeaderParam and @CookieParam.
  • RestApp_JERSEY_ContextParam_N65

    - In this rest-app, @Context annotation is used. The JAX-RS API from the Java EE ecosystem of technologies provides the annotation @Context, to inject 12 object instances related to the context of HTTP requests. It behaves just like the @Autowired annotation in Java EE and Spring respectively.
    • SecurityContext – Security context instance for the current HTTP request
    • Request – Used for setting precondition request processing
    • Application, Configuration, and Providers -> Provide access to the JAX-RS application, configuration, and providers instances
    • ResourceContext – Resource context class instances
    • ServletConfig – The ServletConfig instance instance
    • ServletContext – The ServletContext instance
    • HttpServletRequest – The HttpServletRequest instance for the current request
    • HttpServletResponse – The HttpServletResponse instance for the current request
    • HttpHeaders – Maintains the HTTP header keys and values
    • UriInfo – Query parameters and path variables from the URI called
  • RestApp_JERSEY_send_status_code_N66

    - In this rest-app, Response object is usted to return payload along with status code.
  • RestApp_JERSEY_location_headers_N67

    - In this rest-app, Response object is used to return payload, status code and absolute location of created Brand.
  • RestApp_JERSEY_rectified_location_header_N68

    - In this rest-app, Response object is used to return payload, status code and exact location of created Brand.
  • RestApp_JERSEY_URI_builder_N69

    - In this rest-app, Response object is used to return payload, status code and exact location of created Brand. Here, the location is build using UriBuilder.
  • RestApp_JERSEY_WebApplicationException_N70

    - In this rest-app, the use of WebApplicationException is shown. If there is no header with the name 'headerAttribute' then a WebApplicationException is thrown.
  • RestApp_JERSEY_exception_handling_with_JSON_response_N71

    - In this rest-app, error is handled manually if operation is unsuccessful.
  • RestApp_JERSEY_exception_mapper_N72

    - In this rest-app, error is handled in a genric way using ExceptionMapper interface.
  • RestApp_JERSEY_custom_exception_mapper_N73

    - In this rest-app, custom error handling is done using ExceptionMapper interface.
  • RestApp_JERSEY_HATEOAS_part_1_N74, RestApp_JERSEY_HATEOAS_part_2_N75, RestApp_JERSEY_HATEOAS_part_3_N76, RestApp_JERSEY_HATEOAS_part_4_N77

    - These are the rest-apps in which JSON response has list of links. These links are used to navigate across the app easily. Brand POJO class has one property 'listOfLinks' which is not a column in database fron Brand table. Such properties are annotated with @Transient annotation.
  • RestApp_JERSEY_MessageBodyWriter_N78

    - In this app MessageBodyWriter is used to convert the type from Name to String.
  • RestApp_JERSEY_singleton_resource_N79

    This is a rest-app which shows the use of @Singleton. The class with @Singleton annotation instantiates only once. Everytime the browser is refreshed with url "http://localhost:8080/RestApp_JERSEY_singleton_resource_N79/testSingleton/test", the value of x increases by one.
  • RestApp_JERSEY_param_at_class_level_N80

    - This is a rest-app in which @PathParam and @QueryParam annotation is used on instance variables at class level.
  • RestApp_JERSEY_param_converter_N81, RestApp_JERSEY_param_converter_using_inner_class_N82

    - These rest-apps shows the use of ParamConverter and ParamConverterProider interface to convert parameters
  • RestApp_JERSEY_Building_Client_part_1_N83

    - This is a rest-app to build custom REST client.
  • RestApp_JERSEY_Building_Client_part_2_N84

    - In this rest-app, a custom client is build and @PathParam annotation is used to read brandId and return JSON response as string.
  • RestApp_JERSEY_Building_Client_post_part_3_N85

    - In this rest-app, a custom client is build and a post request is fired from the client. And the payload Brand has only one property 'brandName'. Here, brandId is not required as it is fetched from BRAND_SEQUENCE and is auto incremented.
  • RestApp_JERSEY_Building_Client_post_part_4_N86

    - In this rest-app, a custom client is build and a post request is fired from the client. And the payload Brand has only two properties 'brandName' and 'brandId'. However, brandId is not required as it is fetched from BRAND_SEQUENCE and is auto incremented. So, adding brandId is optional but good to have.
  • RestApp_JERSEY_Building_Client_part_5_N87

    - In this rest-app, a custom REST client is build and array of all the brands as response is returned.
  • RestApp_JERSEY_Building_Client_HATEOS_part_5_N88

    - In this rest-app , a custom REST client is build and Brand with a particular brandId is returned as response. Here, the Brand objects contains all the information of the brand along with 'self' and 'productsLink' for easy navigation.
  • RestApp_JERSEY_Building_Client_PUT_part_5_N89

    - In this rest-app, a custom REST client is build and PUT request is fired.
  • RestApp_JERSEY_Building_Client_DELETE_part_5_N90

    - In this rest-app, a custom REST client is build and DELETE request is fired.
  • SpringBoot_minimal_setup_91

    - This a spring-boot app with minimal setup.
  • SpringBoot_basic_webApp_92

    - This is simple webapplication using spring-boot.
  • SpringBoot_webApp_adding_support_for_JSP_93

    - By defult spring-boot doesn't support JSP files. We need to add properties in application.properties to get the support JSP files in spring-boot application.
  • SpringBoot_REST_CRUD_hibernate_custom_sessionfactory_94

    - This is a rest-app made using spring-boot. Hibernate is used as ORM and sessionFactory is customly configured to connect with oracle database. Database connections are externalized in properties file. The concept of HATEOAS is properly implemented for easy navigation across the app.
  • SpringBoot_REST_CRUD_logback_for_logging_95

    - This is a rest-app made using spring-boot. Hibernate is used as ORM and sessionFactory is customly configured to connect with oracle database. Database connections are externalized in properties file. The concept of HATEOAS is properly implemented for easy navigation across the app. The logback is used as logging framework to log warnings, errors and important informations. Logback is intended as a successor to the popular log4j project, picking up where log4j 1.x leaves off.
  • SpringBoot_REST_app_checkStatus_96

    - This a Rest app that return different responses based on different the values of Query-parameter. If Query-parameter is null or any value other than {big, small} then a BAD_REQUEST is sent as a response.
  • Spring5_SpringMVC_no_XML_Only_Java_N97

    - This is the spring mvc web application with complete Java based configuration. There is no xml configuration involved here.
  • Spring5_SpringSecurity_part1_N98

    - In this project we integrated Spring 5 and SpringSecurity 5.0 and made a basic web application where login-page is provided by SpringSecurity itself.


    Spring-Security overview


    Spring-Security Internal Flow

  • Spring5_SpringSecurity_part2_custom_login_form_N99

    - In this project I integrated Spring 5 and SpringSecurity 5.0 and made a web app with custom login page.


    Spring-Security in action

  • Spring5_SpringSecurity_part3_beautify_loginPage_N100

    - In this project I integrated Spring 5 and SpringSecurity 5.0 and made a web app with custom login page.Additionally I beautified the login page using css and bootstrap.
  • Spring5_SpringSecurity_part4_logout_N101

    - In this project I integrated Spring 5 and SpringSecurity 5.0 and made a web app with a beautiful custom login page. I also added the logout functionality into the app.


    Custom Login Page


    Custom Login Page when wrong password given


    Custom Login Page after logout

  • Spring5_SpringSecurity_part5_CSRF_N102

    - In this project I integrated Spring 5 and SpringSecurity 5.0 and made a web app with login logout functionality. For demonstration purpose I used tag instead of tag and manually included CSRF token in the request.

    Cross-site request forgery (also known as CSRF) is a web security vulnerability that allows an attacker to induce users to perform actions that they do not intend to perform. It allows an attacker to partly circumvent the same origin policy, which is designed to prevent different websites from interfering with each other.

  • Spring5_SpringSecurity_part6_User_Roles_N103

    - In this project I integrated Spring 5 and SpringSecurity 5.0 and made a web app with login logout functionality. Along with that I also showed username and all the roles for him using SpringSecurity JSTL taglib.
  • Spring5_SpringSecurity_part7_role_based_access_N104

    - In this project I integrated Spring 5 and SpringSecurity 5.0 and made a web app with login logout functionality. Along with that I also showed username and all the roles for him using SpringSecurity JSTL taglib. One more functionality added to the web-app is role based access to different web resources.
  • /Spring5_SpringSecurity_part8_role_access_denied_N105

    - In this project I integrated Spring 5 and SpringSecurity 5.0 and made a web app with login logout functionality. Along with that I also showed username and all the roles for him using SpringSecurity JSTL taglib. One more functionality added to the web-app is role based access to different web resources. I have also added functionality of custom Access-Denied page for any unauthorized access.

    Some of the highlighted features are as follows:-

    • Resources from css, js and images folder are allowed and we don't need to authentication for that.
    • Any url with pattern "/notice/**" and "/holiday/**" can be accessed by users with role "STUDENT", "TEACHER", "ADMIN". But without authentication these urls won't be accessible. And if we click on that url without being authenticated, we will be redirected to the login-page.
    • Any url with pattern "/performance" can be accessed by users with role "TEACHER"
    • Any url with pattern "/pendingFees" can be accessed by users with role "ADMIN"
    • Any url for which there is some role assigned, if we try to access that url without logging in then we will be redirected to the login page. After logging in successfully we will either be directly redirected to the page that we tried to access earlier or to the Access-Denied Page depending on the role of the logged in user. But if we click on "Login" button from any page, we will be redirected to login page and after logging in successfully we will be redirected to "/" url or the url specified in MySpringMvcDispatcherServletInitializer class under method getServletMappings().
    • After logout we will be redirected to login page (This is the default behavior). In the login page here we have a Home button.
    • As a logged in user if we try to access any url which is meant to be used by a user with different role then we will be redirected to the Access-Denied page.

    • Home page showing Login button when user is not logged in


      Home page showing username, roles and Logout button for a logged in used


      Simple access-denied page

Some important links:-

1. https://docs.spring.io/spring-framework/docs/2.0.8/reference/spring-form.tld.html#spring-form.tld.input
2. https://docs.spring.io/spring-framework/docs/4.2.x/spring-framework-reference/html/spring-form-tld.html
3. https://docs.spring.io/spring-framework/docs/3.2.x/spring-framework-reference/html/view.html
4. https://www.denisbouquet.com/css-forbid-selection-user-select-dragging-ghost-image/
5. https://pixabay.com/vectors/search/error/
6. https://studyeasy.org/spring/spring-mvc-minimal/
7. https://studyeasy.org/jstl/jstl-taglibs/
8. https://studyeasy.org/general/implicit-objects/
9. https://studyeasy.org/general/locale/
10. https://studyeasy.org/jsp/setting-up-jndi/
11. https://studyeasy.org/hibernate/hibernate-configuration-xml/
12. https://studyeasy.org/maven/java-11-on-maven/
13. https://www.codejava.net/frameworks/hibernate/how-to-make-hibernate-work-with-oracle-database
14. https://mvnrepository.com/artifact/org.springframework
15. https://mvnrepository.com
16. https://stackoverflow.com/questions/12745751/hibernate-sequencegenerator-and-allocationsize
17. https://newbedev.com/hibernate-sequencegenerator-and-allocationsize
18. https://discourse.hibernate.org/t/sequencegenerator-allocationsize-versus-increment-by/5070
19. https://discourse.hibernate.org
20. https://marketplace.eclipse.org
21. https://www.eclipse.org
22. https://shields.io
23. https://spring.io/tools
24. https://codepen.io/ankithingarajiya/pen/jjOxMo
25. https://support.oracle.com/knowledge/Oracle%20Database%20Products/2287819_1.html#CAUSE
26. https://docs.spring.io/spring-framework/docs/4.2.x/spring-framework-reference/html/spring-form-tld.html
27. https://docs.spring.io/spring-framework/docs/3.2.x/spring-framework-reference/html/view.html
28. https://docs.spring.io/spring-framework/docs/2.0.8/reference/spring-form.tld.html#spring-form.tld.input
29. https://www.tutorialspoint.com/jsp/jsp_expression_language.htm
30. https://howtodoinjava.com/spring-mvc/spring-mvc-display-validate-and-submit-form-example/
31. https://howtodoinjava.com/spring-mvc/spring-mvc-resourcebundleviewresolver-configuration-example/
32. https://mkyong.com/spring-mvc/spring-mvc-form-check-if-a-field-has-an-error/
33. https://docs.oracle.com/cd/E17802_01/j2ee/j2ee/1.4/docs/tutorial-update2/doc/JSPIntro7.html
34. https://www.flaticon.com/search?word=cross&type=icon
35. https://pixabay.com/vectors/search/error/
36. https://freepngimg.com/png/15560-red-cross-mark-png-file
37. https://www.pngwing.com/en/free-png-bhnfk
38. https://www.youtube.com/watch?v=lYI9w7I4N0I
39. https://mvnrepository.com/artifact/org.hibernate.validator/hibernate-validator/7.0.2.Final
40. https://docs.jboss.org/hibernate/validator/3.1/reference/en/html_single/
41. https://docs.jboss.org/hibernate/stable/validator/reference/en-US/html_single/#validator-gettingstarted
42. https://www.baeldung.com/spring-validation-message-interpolation
43. https://stackoverflow.com/questions/15498724/tomcat-server-not-starting-with-in-45-seconds
44. https://stackoverflow.com/questions/39632667/how-do-i-kill-the-process-currently-using-a-port-on-localhost-in-windows
45. https://www.youtube.com/watch?v=4IjsEgNNl88
46. https://mvnrepository.com/artifact/org.hibernate/hibernate-core/5.6.5.Final
47. https://stackoverflow.com/questions/13388045/oracle-data-source-configuration-for-spring
48. https://howtodoinjava.com/java/regex/java-regex-validate-email-address/
49. https://www.w3schools.com/java/java_regex.asp
50. https://mvnrepository.com/artifact/com.oracle.database.jdbc/ojdbc8/21.4.0.0.1
51. https://www.javatpoint.com/spring-mvc-requestparam-annotation
52. https://initialcommit.com/blog/pass-data-from-jsp-to-spring-controller
53. https://stackoverflow.com/questions/6989711/spring-mvc-pre-populate-checkboxes
54. https://stackoverflow.com/questions/1900843/how-to-compare-two-object-variables-in-el-expression-language
55. https://stackoverflow.com/questions/15875301/how-to-make-spring-form-as-read-only
56. https://stackoverflow.com/questions/1271641/in-sql-is-update-always-faster-than-deleteinsert
57. https://stackoverflow.com/questions/29075047/spring-validation-exception-bindexception
58. https://www.youtube.com/playlist?list=PLsyeobzWxl7ps4Z1C4VMtvZEx5-PgyoYI
59. https://restfulapi.net/http-status-codes/
60. https://www.restapitutorial.com/httpstatuscodes.html
61. https://stackoverflow.com/questions/4738817/error-in-hibernate-cfg-xml
62. https://stackoverflow.com/questions/42065877/entitymanagerfactory-is-closed-hibernate
63. https://www.ques10.com/p/29518/what-do-you-mean-by-json-why-use-json-over-xml/
64. https://spring.io/projects/spring-hateoas
65. https://spring.io/guides/gs/rest-hateoas/
66. https://www.baeldung.com/hibernate-one-to-many
67. https://mkyong.com/hibernate/hibernate-parameter-binding-examples/
68. https://docs.spring.io/spring-boot/docs/current/reference/html/getting-started.html#getting-started.first-application
69. https://docs.spring.io/spring-boot/docs/1.4.x/reference/html/common-application-properties.html
70. https://www.codejava.net/frameworks/spring-boot/connect-to-oracle-database-examples
71. https://www.bezkoder.com/spring-boot-hibernate-oracle/
72. https://spring.io/guides/gs/accessing-data-mysql/
73. https://www.baeldung.com/sql-logging-spring-boot
74. https://www.baeldung.com/spring-open-session-in-view
75. https://stackoverflow.com/questions/44839753/returning-json-object-as-response-in-spring-boot
76. https://docs.spring.io/spring-framework/docs/current/reference/html/web.html#mvc
77. https://www.baeldung.com/spring-request-response-body
78. https://www.springboottutorial.com/spring-boot-hateoas-for-rest-services
79. https://www.baeldung.com/hibernate-5-spring
80. https://www.onlinetutorialspoint.com/spring-boot/spring-boot-hibernate-integration-example.html
81. https://www.baeldung.com/spring-data-jpa-query
82. https://stackoverflow.com/questions/30528255/how-to-access-a-value-defined-in-the-application-properties-file-in-spring-boot
83. https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.external-config
84. https://howtodoinjava.com/hibernate/hibarnate-build-sessionfactory/
85. https://howtodoinjava.com/spring-boot2/logging/multiple-log-files/
86. https://logback.qos.ch/manual/layouts.html#conversionWord
87. https://logback.qos.ch/manual/filters.html
88. https://logback.qos.ch
89. https://www.baeldung.com/spring-controller-vs-restcontroller
90. https://www.baeldung.com/logback
91. https://tedblob.com/logback-multiple-log-files/?amp=1
92. https://examples.javacodegeeks.com/enterprise-java/logback/logback-additivity-example/
93. https://stackoverflow.com/questions/24180772/logback-logger-logging-twice
94. https://howtodoinjava.com/spring-boot2/rest/rest-with-spring-hateoas-example/
95. https://www.baeldung.com/spring-resttemplate-json-list
96. https://www.nginx.com/blog/service-discovery-in-a-microservices-architecture/
97. https://www.baeldung.com/spring-webclient-resttemplate
98. https://spring.io/guides/gs/service-registration-and-discovery/
99. https://start.spring.io
100. https://stackoverflow.com/questions/41230164/eureka-unknownhostexception-in-service-discovery
101. https://www.youtube.com/watch?v=xruvRk1Uf5I
102. https://www.youtube.com/watch?v=TxjIlNYRZ5M
103. https://www.youtube.com/watch?v=y8IQb4ofjDo&list=PLqq-6Pq4lTTZSKAFG6aCDVDP86Qx4lNas
104. https://www.youtube.com/watch?v=PdxPp-cn7bI
105. https://spring.io/projects/spring-cloud
106. https://www.freepnglogos.com
107. https://www.baeldung.com/web-mvc-configurer-adapter-deprecated
108. https://docs.spring.io/spring-security/reference/servlet/authentication/passwords/form.html
109. https://www.javadevjournal.com/spring-security/spring-security-login/
110. https://o7planning.org/10353/configure-static-resources-in-spring-mvc
111. https://stackoverflow.com/questions/29396281/what-does-configuredefaultservlethandling-means
112. https://stackoverflow.com/questions/47552835/the-type-webmvcconfigureradapter-is-deprecated
113. https://mkyong.com/spring-mvc/spring-mvc-webmvcconfigureradapter-is-deprecated/
114. https://bbbootstrap.com/snippets/bootstrap-5-login-form-using-neomorphism-89456141
115. https://bbbootstrap.com
116. https://stackoverflow.com/questions/25368535/spring-security-does-not-allow-css-or-js-resources-to-be-loaded
117. spring-projects/spring-security#4857
118. https://docs.spring.io/spring-security/site/docs/4.1.3.RELEASE/guides/html5/helloworld-boot.html
119. https://codepen.io - Templates with code (No need to download)
120. https://www.tutorialspoint.com/spring_security/spring_security_with_taglib.htm
121. https://www.javaguides.net/2019/06/spring-security-how-to-get-current-logged-in-username-in-jsp.html
122. https://bushansirgur.in/how-to-include-one-jsp-in-another-jsp-example/#:~:text=To%20include%20JSP%20in%20another,name%20of%20the%20JSP%20file.
123. https://www.baeldung.com/java-config-spring-security
124. https://www.baeldung.com/spring-security-login
125. https://www.youtube.com/watch?v=U-NQlwbgZLo - Common User (user in CDB) and Local User (user in PDB) in Oracle database
126. https://www.baeldung.com/spring-security-jdbc-authentication
127. https://docs.spring.io/spring-security/site/docs/4.2.x/reference/html/appendix-schema.html
128. https://mkyong.com/spring-security/spring-security-form-login-using-database/
129. https://www.baeldung.com/hibernate-c3p0
130. https://mvnrepository.com/artifact/com.mchange/c3p0/0.9.5.5
131. https://www.mchange.com/projects/c3p0/ - c3p0 connection pooling
132. https://danboterhoven.medium.com/why-you-should-use-bcrypt-to-hash-passwords-af330100b861
133. https://en.wikipedia.org/wiki/Bcrypt
134. https://crackstation.net/hashing-security.htm - Salted Password Hashing
135. https://www.bcryptcalculator.com - Generate Bcrypt passwords
136. https://www.aegissofttech.com/articles/bcrypt-password-encoding-spring-security.html - Encrypt password using Bcrypt algorithm
137. https://www.youtube.com/watch?v=3xSeynG0-zM - Signin and Login with Bcrypt password
138. https://www.digitalocean.com/community/tutorials/spring-hibernate-integration-example-tutorial
139. https://stackoverflow.com/questions/1099025/spring-transactional-what-happens-in-background
140. https://www.baeldung.com/transaction-configuration-with-jpa-and-spring
141. https://www.baeldung.com/hibernate-c3p0 - Hibernate with c3p0 connection pool
142. https://stackoverflow.com/questions/475893/what-are-the-required-c3p0-settings-for-hibernate-in-order-to-avoid-deadlocks
143. https://mkyong.com/hibernate/how-to-configure-the-c3p0-connection-pool-in-hibernate/
144. https://howtodoinjava.com/hibernate/hibernate-c3p0-connection-pool-configuration-tutorial/#1-maven-dependencies
145. https://howtodoinjava.com/hibernate/hibernate-c3p0-connection-pool-configuration-tutorial/#1-maven-dependencies
146. https://thorben-janssen.com/jpa-native-queries/#resultHandling
147. https://docs.jboss.org/hibernate/stable/validator/api/org/hibernate/validator/constraints/package-summary.html - Hibernate validator constraints
148. https://docs.jboss.org/hibernate/validator/3.1/reference/en/html_single/ - Javax validation constraints
149. https://stackoverflow.com/questions/11244569/what-is-referencedcolumnname-used-for-in-jpa
150. https://mkyong.com/hibernate/hibernate-parameter-binding-examples/#:~:text=It%27s%20use%20question%20mark%20(%3F),stockCode%20%3D%20%3F%20and%20s.
151. https://www.digitalocean.com/community/tutorials/java-clone-object-cloning-java - Cloning
152. https://turreta.com/2017/07/13/clone-objects-java-generics-using-apache-commons-lang-objectutils/ Cloning genrics using ObjectUtils
153. https://www.tutorialspoint.com/hibernate/hibernate_native_sql.htm - Native Query in Hibernate
154. https://www.digitalocean.com/community/tutorials/hibernate-native-sql-query-example
155. https://thorben-janssen.com/jpa-native-queries/#resultHandling
156. https://stackoverflow.com/questions/9908082/does-a-hibernate-transaction-rollback-delete-session-flushed-entities
157. http://wiki.openbravo.com/wiki/Hibernate_5.3_Migration_Guide#Typed_Queries - ResultTransformer in Hibernate
158. https://www.baeldung.com/jpa-sql-resultset-mapping
159. https://stackoverflow.com/questions/1780896/java-getting-the-properties-of-a-class-to-construct-a-string-representation - getting list of fields in a class
160. https://www.geeksforgeeks.org/clone-method-in-java-2/
161. https://mvnrepository.com/artifact/org.apache.commons/commons-lang3/3.12.0 - Apache Commons
162. https://www.geeksforgeeks.org/hibernate-native-sql/
163. https://howtodoinjava.com/hibernate/hibernate-many-to-many-mapping/ - ManyToMany
164. https://stackoverflow.com/questions/21985308/how-is-the-owning-side-of-this-many-to-many-relationship-determined - Owning entity
165. https://stackoverflow.com/questions/36803306/should-jointable-be-specified-in-both-sides-of-a-manytomany-relationship - Two owning entities
166. https://levelup.gitconnected.com/how-to-deal-with-the-remote-host-identification-has-changed-message-with-github-1dea015dae8d - WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
167. https://www.javatpoint.com/java-date-to-string - Date to String
168. https://www.javatpoint.com/java-string-to-date - String to Date
169. https://www.techiedelight.com/print-all-keys-values-from-properties-file-java/ - Access value in properties file in Java
170. https://stackabuse.com/how-to-access-property-file-values-in-spring-boot/ - Access value in properties file in Spring / Spring Boot
171. https://javabeat.net/spring-mvc-component-scan-annotations/ - component-scan Vs annotation-config Vs annotation-driven
172. https://www.baeldung.com/spring-contextannotation-contextcomponentscan - component-scan Vs annotation-config
173. https://stackoverflow.com/questions/14212527/how-to-set-default-value-to-the-inputtype-date - Default population of input type date
174. https://www.aegissofttech.com/articles/bcrypt-password-encoding-spring-security.html - Setup Bcrypt in Spring Boot
175. https://www.geeksforgeeks.org/understanding-rainbow-table-attack/
176. https://www.baeldung.com/spring-security-registration-password-encoding-bcrypt - Registration with Spring Security (Bcrypt)
177. https://bcrypt-generator.com - Bcrypt Generator with various strength
178. https://www.youtube.com/watch?v=z6o3YyYTiiI - Change Password of a User in Oracle database
179. https://www.springcloud.io/post/2022-02/jwt-cookie/#gsc.tab=0 - Storage of JWT
180. https://stackabuse.com/spring-security-in-memory-invalidation-of-jwt-token-during-user-logout/
181. https://stackoverflow.com/questions/63834132/how-to-pass-jwt-token-to-localstorage-using-javascript-script-for-html
182. https://medium.com/kanlanc/heres-why-storing-jwt-in-local-storage-is-a-great-mistake-df01dad90f9e
183. https://crackstation.net/hashing-security.htm - Password hashing - Best Practices
184. https://danboterhoven.medium.com/why-you-should-use-bcrypt-to-hash-passwords-af330100b861 - Why you should use BCrypt to hash passwords
185. https://en.wikipedia.org/wiki/Bcrypt - Bcrypt in Detail
186. https://docs.spring.io/spring-security/reference/5.8/migration/servlet/config.html - In Spring Security 5.8, the antMatchers, mvcMatchers, and regexMatchers methods were deprecated in favor of new requestMatchers methods.
187. https://itecnote.com/tecnote/spring-security-invalid-property-principal-of-bean-class-org-springframework-security-authentication-usernamepasswordauthenticationtoken/ - org.springframework.beans.NotReadablePropertyException: Invalid property 'principal' of bean class [org.springframework.security.authentication.UsernamePasswordAuthenticationToken]: Bean property 'principal' is not readable...
188. https://docs.spring.io/spring-security/reference/servlet/authentication/architecture.html - Servlet Authentication Architecture
189. https://www.w3schools.com/git/git_ignore.asp?remote=github - gitignore
190. https://www.devglan.com/online-tools/hmac-sha256-online - HMAC-SHA256 Online Generator Tool
191. https://www.youtube.com/watch?v=preCXrKFISg - Servlet Filter Practical
192. https://docs.spring.io/spring-framework/docs/2.5.3/reference/aop.html - Spring AOP Concepts
193. https://www.geeksforgeeks.org/usage-of-before-after-around-afterreturning-and-afterthrowing-in-a-single-spring-aop-project/ - Spring AOP advices and their precedence

Precedence:-
@Around (Before invocation - Begining portion)
@Before
--- Actual Method ---
@Around (After invocation - End portion)
@After
@AfterReturning (This will be called only after successful execution)
@AfterThrowing


About

This is a tutorial to learn Spring, Spring-boot, Restful web-services and one of the most popular logging framework i.e., Logback. The IDE used is Spring Tool Suite 4 (STS4)


Languages

Language:Java 87.5%Language:CSS 10.3%Language:JavaScript 2.3%Language:HTML 0.0%