├── .gitignore ├── SECURITY.md ├── adding-spring-security-database-backed ├── docker-compose.yml ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── spring5 │ │ └── practice │ │ ├── AppInitializer.java │ │ ├── GlobalExceptionHandler.java │ │ ├── RootConfig.java │ │ ├── ServletConfig.java │ │ ├── config │ │ ├── persistence │ │ │ └── HibernateConfig.java │ │ └── security │ │ │ ├── SecurityConfig.java │ │ │ └── SecurityInitializer.java │ │ ├── controllers │ │ ├── CountryController.java │ │ ├── CourseController.java │ │ ├── RootController.java │ │ └── StudnetController.java │ │ ├── dtos │ │ └── StudentDto.java │ │ ├── enums │ │ └── Role.java │ │ ├── exceptions │ │ ├── ResourceAlreadyExistsException.java │ │ └── ResourceNotFoundException.java │ │ ├── model │ │ ├── Country.java │ │ ├── Course.java │ │ ├── Student.java │ │ └── User.java │ │ ├── repositories │ │ ├── CourseRepository.java │ │ └── UserRepository.java │ │ ├── request │ │ └── Student.java │ │ └── service │ │ ├── CountryService.java │ │ ├── CourseService.java │ │ ├── StudentService.java │ │ └── UserService.java │ ├── resources │ └── hibernate.properties │ └── webapp │ └── WEB-INF │ ├── resources │ ├── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ ├── bootstrap.min.css.map │ │ └── login.css │ ├── images │ │ └── course_cover.jpg │ └── js │ │ ├── bootstrap.bundle.js │ │ ├── bootstrap.bundle.js.map │ │ ├── bootstrap.bundle.min.js │ │ ├── bootstrap.bundle.min.js.map │ │ ├── bootstrap.js │ │ ├── bootstrap.js.map │ │ ├── bootstrap.min.js │ │ ├── bootstrap.min.js.map │ │ └── jquery.js │ └── views │ ├── auth │ └── login.jsp │ ├── common │ ├── footer.jsp │ └── header.jsp │ ├── country │ ├── add.jsp │ ├── show-all.jsp │ └── show-by-code.jsp │ ├── course │ ├── add.jsp │ ├── edit.jsp │ ├── header.jsp │ └── show-all.jsp │ ├── error.jsp │ ├── index.jsp │ └── student │ ├── add.jsp │ ├── edit.jsp │ └── show-all.jsp ├── adding-spring-security-in-memory ├── docker-compose.yml ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── spring5 │ │ └── practice │ │ ├── AppInitializer.java │ │ ├── GlobalExceptionHandler.java │ │ ├── RootConfig.java │ │ ├── ServletConfig.java │ │ ├── config │ │ ├── persistence │ │ │ └── HibernateConfig.java │ │ └── security │ │ │ ├── SecurityConfig.java │ │ │ └── SecurityInitializer.java │ │ ├── controllers │ │ ├── CountryController.java │ │ ├── CourseController.java │ │ ├── RootController.java │ │ └── StudnetController.java │ │ ├── dtos │ │ └── StudentDto.java │ │ ├── exceptions │ │ ├── ResourceAlreadyExistsException.java │ │ └── ResourceNotFoundException.java │ │ ├── model │ │ ├── Country.java │ │ ├── Course.java │ │ └── Student.java │ │ ├── repositories │ │ └── CourseRepository.java │ │ ├── request │ │ └── Student.java │ │ └── service │ │ ├── CountryService.java │ │ ├── CourseService.java │ │ └── StudentService.java │ ├── resources │ ├── hibernate.properties │ └── logback.xml │ └── webapp │ └── WEB-INF │ ├── resources │ ├── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ ├── bootstrap.min.css.map │ │ └── login.css │ ├── images │ │ └── course_cover.jpg │ └── js │ │ ├── bootstrap.bundle.js │ │ ├── bootstrap.bundle.js.map │ │ ├── bootstrap.bundle.min.js │ │ ├── bootstrap.bundle.min.js.map │ │ ├── bootstrap.js │ │ ├── bootstrap.js.map │ │ ├── bootstrap.min.js │ │ ├── bootstrap.min.js.map │ │ └── jquery.js │ └── views │ ├── auth │ └── login.jsp │ ├── common │ ├── footer.jsp │ └── header.jsp │ ├── country │ ├── add.jsp │ ├── show-all.jsp │ └── show-by-code.jsp │ ├── course │ ├── add.jsp │ ├── edit.jsp │ ├── header.jsp │ └── show-all.jsp │ ├── error.jsp │ ├── index.jsp │ └── student │ ├── add.jsp │ ├── edit.jsp │ └── show-all.jsp ├── batch-2 └── spring-boot-class-practice │ ├── .gitignore │ ├── pom.xml │ └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── example │ │ │ ├── MainulbhaiApplication.java │ │ │ ├── controller │ │ │ ├── DesignationController.java │ │ │ ├── EmployeeController.java │ │ │ └── IndexController.java │ │ │ ├── dto │ │ │ ├── DesignationDto.java │ │ │ └── EmployeeDto.java │ │ │ ├── entity │ │ │ ├── Designation.java │ │ │ └── Employee.java │ │ │ ├── exception │ │ │ ├── GlobalExceptionHandler.java │ │ │ └── ResourceNotFoundException.java │ │ │ ├── init │ │ │ └── InitializeData.java │ │ │ ├── repository │ │ │ ├── DesignationRepository.java │ │ │ └── EmployeeRepository.java │ │ │ └── service │ │ │ ├── DesignationService.java │ │ │ └── EmployeeService.java │ └── resources │ │ ├── application-mainul.properties │ │ ├── application-mysql.properties │ │ ├── application.properties │ │ ├── static │ │ └── css │ │ │ └── bootstrap.min.css │ │ └── templates │ │ ├── designation │ │ ├── add-designation.html │ │ └── designation.html │ │ ├── employee │ │ ├── add-employee.html │ │ └── index.html │ │ └── errors │ │ └── 404.html │ └── test │ └── java │ └── com │ └── example │ └── mainulbhai │ └── MainulbhaiApplicationTests.java ├── class-7 ├── class-7-with-hibernate-criteria-api │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── spring5 │ │ │ └── practice │ │ │ ├── AppInitializer.java │ │ │ ├── RootConfig.java │ │ │ ├── ServletConfig.java │ │ │ ├── config │ │ │ └── HibernateConfig.java │ │ │ ├── controllers │ │ │ ├── CountryController.java │ │ │ ├── CourseController.java │ │ │ ├── RootController.java │ │ │ └── StudnetController.java │ │ │ ├── dtos │ │ │ └── StudentDto.java │ │ │ ├── exceptions │ │ │ ├── ResourceAlreadyExistsException.java │ │ │ ├── ResourceNotFoundException.java │ │ │ ├── handler │ │ │ │ └── GlobalExceptionHandler.java │ │ │ └── model │ │ │ │ ├── ErrorResponse.java │ │ │ │ └── ItemValidationError.java │ │ │ ├── model │ │ │ ├── Country.java │ │ │ ├── Course.java │ │ │ └── Student.java │ │ │ ├── request │ │ │ └── StudentRequest.java │ │ │ └── service │ │ │ ├── BaseService.java │ │ │ ├── CountryService.java │ │ │ ├── CourseService.java │ │ │ └── StudentService.java │ │ ├── resources │ │ ├── hibernate.properties │ │ └── logback.xml │ │ └── webapp │ │ └── WEB-INF │ │ ├── resources │ │ ├── css │ │ │ ├── bootstrap-grid.css │ │ │ ├── bootstrap-grid.css.map │ │ │ ├── bootstrap-grid.min.css │ │ │ ├── bootstrap-grid.min.css.map │ │ │ ├── bootstrap-reboot.css │ │ │ ├── bootstrap-reboot.css.map │ │ │ ├── bootstrap-reboot.min.css │ │ │ ├── bootstrap-reboot.min.css.map │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.css.map │ │ │ ├── bootstrap.min.css │ │ │ └── bootstrap.min.css.map │ │ ├── images │ │ │ └── course_cover.jpg │ │ └── js │ │ │ ├── bootstrap.bundle.js │ │ │ ├── bootstrap.bundle.js.map │ │ │ ├── bootstrap.bundle.min.js │ │ │ ├── bootstrap.bundle.min.js.map │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.js.map │ │ │ ├── bootstrap.min.js │ │ │ └── bootstrap.min.js.map │ │ └── views │ │ ├── common │ │ ├── footer.jsp │ │ └── header.jsp │ │ ├── country │ │ ├── add.jsp │ │ ├── show-all.jsp │ │ └── show-by-code.jsp │ │ ├── course │ │ ├── add.jsp │ │ ├── edit.jsp │ │ └── show-all.jsp │ │ ├── error.jsp │ │ ├── index.jsp │ │ └── student │ │ ├── add.jsp │ │ ├── edit.jsp │ │ └── show-all.jsp └── class-7-with-spring-jdbc-template │ ├── .idea │ ├── .gitignore │ ├── .name │ ├── artifacts │ │ ├── integrating_spring_jdbc_war.xml │ │ └── integrating_spring_jdbc_war_exploded.xml │ ├── compiler.xml │ ├── jarRepositories.xml │ ├── libraries │ │ ├── Maven__com_google_protobuf_protobuf_java_3_6_1.xml │ │ ├── Maven__javax_servlet_javax_servlet_api_4_0_1.xml │ │ ├── Maven__javax_servlet_jsp_javax_servlet_jsp_api_2_3_3.xml │ │ ├── Maven__javax_servlet_jstl_1_2.xml │ │ ├── Maven__mysql_mysql_connector_java_8_0_18.xml │ │ ├── Maven__org_springframework_spring_aop_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_beans_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_context_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_core_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_expression_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_jcl_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_jdbc_5_2_3_RELEASE.xml │ │ ├── Maven__org_springframework_spring_tx_5_2_3_RELEASE.xml │ │ ├── Maven__org_springframework_spring_web_5_2_2_RELEASE.xml │ │ └── Maven__org_springframework_spring_webmvc_5_2_2_RELEASE.xml │ ├── misc.xml │ ├── modules.xml │ └── vcs.xml │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── com │ │ └── spring5 │ │ └── practice │ │ ├── AppInitializer.java │ │ ├── GlobalExceptionHandler.java │ │ ├── RootConfig.java │ │ ├── ServletConfig.java │ │ ├── config │ │ └── JdbcConfig.java │ │ ├── controllers │ │ ├── CountryController.java │ │ ├── CourseController.java │ │ ├── RootController.java │ │ └── StudnetController.java │ │ ├── exceptions │ │ ├── ResourceAlreadyExistsException.java │ │ └── ResourceNotFoundException.java │ │ ├── model │ │ ├── Country.java │ │ ├── Course.java │ │ └── Student.java │ │ └── service │ │ ├── CountryService.java │ │ ├── CourseSercvice.java │ │ └── StudentService.java │ ├── resources │ └── application.properties │ └── webapp │ └── WEB-INF │ ├── resources │ ├── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ ├── images │ │ └── course_cover.jpg │ └── js │ │ ├── bootstrap.bundle.js │ │ ├── bootstrap.bundle.js.map │ │ ├── bootstrap.bundle.min.js │ │ ├── bootstrap.bundle.min.js.map │ │ ├── bootstrap.js │ │ ├── bootstrap.js.map │ │ ├── bootstrap.min.js │ │ └── bootstrap.min.js.map │ └── views │ ├── common │ ├── footer.jsp │ └── header.jsp │ ├── country │ ├── add.jsp │ ├── show-all.jsp │ └── show-by-code.jsp │ ├── course │ ├── add.jsp │ ├── edit.jsp │ └── show-all.jsp │ ├── error.jsp │ └── index.jsp ├── class-9-one-to-many-relationship ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── spring5 │ │ └── practice │ │ ├── AppInitializer.java │ │ ├── GlobalExceptionHandler.java │ │ ├── RootConfig.java │ │ ├── ServletConfig.java │ │ ├── config │ │ └── HibernateConfig.java │ │ ├── controllers │ │ ├── CountryController.java │ │ ├── CourseController.java │ │ ├── RootController.java │ │ └── StudnetController.java │ │ ├── dtos │ │ └── StudentDto.java │ │ ├── exceptions │ │ ├── ResourceAlreadyExistsException.java │ │ └── ResourceNotFoundException.java │ │ ├── model │ │ ├── Country.java │ │ ├── Course.java │ │ └── Student.java │ │ ├── request │ │ └── Student.java │ │ └── service │ │ ├── CountryService.java │ │ ├── CourseService.java │ │ └── StudentService.java │ ├── resources │ └── hibernate.properties │ └── webapp │ └── WEB-INF │ ├── resources │ ├── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ ├── images │ │ └── course_cover.jpg │ └── js │ │ ├── bootstrap.bundle.js │ │ ├── bootstrap.bundle.js.map │ │ ├── bootstrap.bundle.min.js │ │ ├── bootstrap.bundle.min.js.map │ │ ├── bootstrap.js │ │ ├── bootstrap.js.map │ │ ├── bootstrap.min.js │ │ └── bootstrap.min.js.map │ └── views │ ├── common │ ├── footer.jsp │ └── header.jsp │ ├── country │ ├── add.jsp │ ├── show-all.jsp │ └── show-by-code.jsp │ ├── course │ ├── add.jsp │ ├── edit.jsp │ └── show-all.jsp │ ├── error.jsp │ ├── index.jsp │ └── student │ ├── add.jsp │ ├── edit.jsp │ └── show-all.jsp ├── configuring-access-denied-page ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── spring5 │ │ └── practice │ │ ├── AppInitializer.java │ │ ├── GlobalExceptionHandler.java │ │ ├── RootConfig.java │ │ ├── ServletConfig.java │ │ ├── config │ │ ├── persistence │ │ │ └── HibernateConfig.java │ │ └── security │ │ │ ├── CustomAccessDeniedHandler.java │ │ │ ├── SpringSecurityInitializer.java │ │ │ └── WebSecurityConfiguration.java │ │ ├── controllers │ │ ├── CountryController.java │ │ ├── CourseController.java │ │ ├── RootController.java │ │ └── StudnetController.java │ │ ├── dtos │ │ └── StudentDto.java │ │ ├── enums │ │ └── Role.java │ │ ├── exceptions │ │ ├── ResourceAlreadyExistsException.java │ │ └── ResourceNotFoundException.java │ │ ├── model │ │ ├── Country.java │ │ ├── Course.java │ │ ├── Student.java │ │ └── User.java │ │ ├── repositories │ │ ├── CourseRepository.java │ │ └── UserRepository.java │ │ ├── request │ │ └── Student.java │ │ └── service │ │ ├── CountryService.java │ │ ├── CourseService.java │ │ ├── StudentService.java │ │ └── UserService.java │ ├── resources │ └── hibernate.properties │ └── webapp │ └── WEB-INF │ ├── resources │ ├── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ ├── bootstrap.min.css.map │ │ └── login.css │ ├── images │ │ └── course_cover.jpg │ └── js │ │ ├── bootstrap.bundle.js │ │ ├── bootstrap.bundle.js.map │ │ ├── bootstrap.bundle.min.js │ │ ├── bootstrap.bundle.min.js.map │ │ ├── bootstrap.js │ │ ├── bootstrap.js.map │ │ ├── bootstrap.min.js │ │ ├── bootstrap.min.js.map │ │ └── jquery.js │ └── views │ ├── 403.jsp │ ├── auth │ └── login.jsp │ ├── common │ ├── footer.jsp │ └── header.jsp │ ├── country │ ├── add.jsp │ ├── show-all.jsp │ └── show-by-code.jsp │ ├── course │ ├── add.jsp │ ├── edit.jsp │ ├── header.jsp │ └── show-all.jsp │ ├── error.jsp │ ├── index.jsp │ └── student │ ├── add.jsp │ ├── edit.jsp │ └── show-all.jsp ├── exposing-json-data-spring ├── .idea │ ├── artifacts │ │ ├── exposing_json_data_spring_war.xml │ │ └── exposing_json_data_spring_war_exploded.xml │ ├── compiler.xml │ ├── exposing-json-data-spring.iml │ ├── libraries │ │ ├── Maven__antlr_antlr_2_7_7.xml │ │ ├── Maven__com_fasterxml_classmate_1_3_4.xml │ │ ├── Maven__com_fasterxml_jackson_core_jackson_annotations_2_10_2.xml │ │ ├── Maven__com_google_code_gson_gson_2_8_6.xml │ │ ├── Maven__javax_activation_javax_activation_api_1_2_0.xml │ │ ├── Maven__javax_persistence_javax_persistence_api_2_2.xml │ │ ├── Maven__javax_servlet_javax_servlet_api_4_0_1.xml │ │ ├── Maven__javax_servlet_jsp_javax_servlet_jsp_api_2_3_3.xml │ │ ├── Maven__javax_servlet_jstl_1_2.xml │ │ ├── Maven__javax_xml_bind_jaxb_api_2_3_1.xml │ │ ├── Maven__mysql_mysql_connector_java_6_0_5.xml │ │ ├── Maven__net_bytebuddy_byte_buddy_1_9_5.xml │ │ ├── Maven__org_aspectj_aspectjrt_1_9_5.xml │ │ ├── Maven__org_dom4j_dom4j_2_1_1.xml │ │ ├── Maven__org_hibernate_common_hibernate_commons_annotations_5_0_4_Final.xml │ │ ├── Maven__org_hibernate_hibernate_core_5_3_11_Final.xml │ │ ├── Maven__org_javassist_javassist_3_23_2_GA.xml │ │ ├── Maven__org_jboss_jandex_2_0_5_Final.xml │ │ ├── Maven__org_jboss_logging_jboss_logging_3_3_2_Final.xml │ │ ├── Maven__org_jboss_spec_javax_transaction_jboss_transaction_api_1_2_spec_1_1_1_Final.xml │ │ ├── Maven__org_reflections_reflections_0_9_12.xml │ │ ├── Maven__org_slf4j_slf4j_api_1_7_26.xml │ │ ├── Maven__org_springframework_data_spring_data_commons_2_2_4_RELEASE.xml │ │ ├── Maven__org_springframework_data_spring_data_jpa_2_2_4_RELEASE.xml │ │ ├── Maven__org_springframework_security_spring_security_acl_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_security_spring_security_config_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_security_spring_security_core_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_security_spring_security_taglibs_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_security_spring_security_web_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_aop_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_beans_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_context_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_core_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_expression_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_jcl_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_jdbc_5_2_3_RELEASE.xml │ │ ├── Maven__org_springframework_spring_orm_5_2_3_RELEASE.xml │ │ ├── Maven__org_springframework_spring_tx_5_2_3_RELEASE.xml │ │ ├── Maven__org_springframework_spring_web_5_2_2_RELEASE.xml │ │ └── Maven__org_springframework_spring_webmvc_5_2_2_RELEASE.xml │ ├── misc.xml │ ├── modules.xml │ ├── vcs.xml │ └── workspace.xml ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── spring5 │ │ └── practice │ │ ├── AppInitializer.java │ │ ├── GlobalExceptionHandler.java │ │ ├── RootConfig.java │ │ ├── ServletConfig.java │ │ ├── config │ │ ├── persistence │ │ │ └── HibernateConfig.java │ │ └── security │ │ │ ├── SpringSecurityInitializer.java │ │ │ └── WebSecurityConfiguration.java │ │ ├── controllers │ │ ├── CountryController.java │ │ ├── CourseController.java │ │ ├── CourseRestController.java │ │ ├── RootController.java │ │ └── StudentController.java │ │ ├── dtos │ │ ├── CourseDto.java │ │ └── StudentDto.java │ │ ├── enums │ │ └── Role.java │ │ ├── exceptions │ │ ├── ResourceAlreadyExistsException.java │ │ └── ResourceNotFoundException.java │ │ ├── model │ │ ├── Country.java │ │ ├── Course.java │ │ ├── Student.java │ │ └── User.java │ │ ├── repositories │ │ ├── CourseRepository.java │ │ └── UserRepository.java │ │ ├── request │ │ └── Student.java │ │ └── service │ │ ├── CountryService.java │ │ ├── CourseService.java │ │ ├── StudentService.java │ │ └── UserService.java │ ├── resources │ └── hibernate.properties │ └── webapp │ └── WEB-INF │ ├── resources │ ├── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ ├── bootstrap.min.css.map │ │ └── login.css │ ├── images │ │ └── course_cover.jpg │ └── js │ │ ├── bootstrap.bundle.js │ │ ├── bootstrap.bundle.js.map │ │ ├── bootstrap.bundle.min.js │ │ ├── bootstrap.bundle.min.js.map │ │ ├── bootstrap.js │ │ ├── bootstrap.js.map │ │ ├── bootstrap.min.js │ │ ├── bootstrap.min.js.map │ │ └── jquery.js │ └── views │ ├── 403.jsp │ ├── auth │ └── login.jsp │ ├── common │ ├── footer.jsp │ └── header.jsp │ ├── country │ ├── add.jsp │ ├── show-all.jsp │ └── show-by-code.jsp │ ├── course │ ├── add.jsp │ ├── edit.jsp │ ├── header.jsp │ ├── search.jsp │ └── show-all.jsp │ ├── error.jsp │ ├── index.jsp │ └── student │ ├── add.jsp │ ├── edit.jsp │ └── show-all.jsp ├── hello-world-springboot ├── .gitignore ├── .mvn │ └── wrapper │ │ ├── MavenWrapperDownloader.java │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── springboot │ │ │ └── practice │ │ │ └── HelloWorldApplication.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── springboot │ └── practice │ └── HelloWorldApplicationTests.java ├── portfolio-template.zip ├── spring-aop ├── spring-aop-java │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── mainul35 │ │ │ ├── AppInitializer.java │ │ │ ├── Audit.java │ │ │ ├── EmployeeCRUDAspect.java │ │ │ ├── EmployeeDTO.java │ │ │ ├── RootConfig.java │ │ │ ├── ServletConfig.java │ │ │ ├── TestAOP.java │ │ │ ├── controller │ │ │ └── RootController.java │ │ │ └── service │ │ │ └── EmployeeManager.java │ │ └── resources │ │ └── applicationContext.xml └── spring-aop-xml │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── com │ │ └── mainul35 │ │ ├── EmployeeCRUDAspect.java │ │ ├── EmployeeDTO.java │ │ ├── EmployeeManager.java │ │ └── TestAOP.java │ └── resources │ └── applicationContext.xml ├── spring-boot-demo ├── .gitignore ├── .mvn │ └── wrapper │ │ ├── MavenWrapperDownloader.java │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── springboot │ │ │ └── demo │ │ │ ├── DemoApplication.java │ │ │ ├── config │ │ │ └── MvcCacheControlConfig.java │ │ │ └── controller │ │ │ └── RootController.java │ └── resources │ │ ├── application-dev.properties │ │ ├── application.properties │ │ ├── static │ │ ├── css │ │ │ ├── bootstrap-grid.css │ │ │ ├── bootstrap-grid.css.map │ │ │ ├── bootstrap-grid.min.css │ │ │ ├── bootstrap-grid.min.css.map │ │ │ ├── bootstrap-reboot.css │ │ │ ├── bootstrap-reboot.css.map │ │ │ ├── bootstrap-reboot.min.css │ │ │ ├── bootstrap-reboot.min.css.map │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.css.map │ │ │ ├── bootstrap.min.css │ │ │ ├── bootstrap.min.css.map │ │ │ ├── login.css │ │ │ └── style.css │ │ └── js │ │ │ ├── bootstrap.bundle.js │ │ │ ├── bootstrap.bundle.js.map │ │ │ ├── bootstrap.bundle.min.js │ │ │ ├── bootstrap.bundle.min.js.map │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.js.map │ │ │ ├── bootstrap.min.js │ │ │ ├── bootstrap.min.js.map │ │ │ └── jquery.js │ │ └── templates │ │ └── index.html │ └── test │ └── java │ └── com │ └── springboot │ └── demo │ └── DemoApplicationTests.java ├── spring-data-jpa-demo ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── spring5 │ │ └── practice │ │ ├── AppInitializer.java │ │ ├── GlobalExceptionHandler.java │ │ ├── RootConfig.java │ │ ├── ServletConfig.java │ │ ├── config │ │ └── persistence │ │ │ └── HibernateConfig.java │ │ ├── controllers │ │ ├── CountryController.java │ │ ├── CourseController.java │ │ ├── RootController.java │ │ └── StudnetController.java │ │ ├── dtos │ │ └── StudentDto.java │ │ ├── exceptions │ │ ├── ResourceAlreadyExistsException.java │ │ └── ResourceNotFoundException.java │ │ ├── model │ │ ├── Country.java │ │ ├── Course.java │ │ └── Student.java │ │ ├── repositories │ │ └── CourseRepository.java │ │ ├── request │ │ └── Student.java │ │ └── service │ │ ├── CountryService.java │ │ ├── CourseService.java │ │ └── StudentService.java │ ├── resources │ └── hibernate.properties │ └── webapp │ └── WEB-INF │ ├── resources │ ├── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ ├── bootstrap.min.css.map │ │ └── login.css │ ├── images │ │ └── course_cover.jpg │ └── js │ │ ├── bootstrap.bundle.js │ │ ├── bootstrap.bundle.js.map │ │ ├── bootstrap.bundle.min.js │ │ ├── bootstrap.bundle.min.js.map │ │ ├── bootstrap.js │ │ ├── bootstrap.js.map │ │ ├── bootstrap.min.js │ │ ├── bootstrap.min.js.map │ │ └── jquery.js │ └── views │ ├── common │ ├── footer.jsp │ └── header.jsp │ ├── country │ ├── add.jsp │ ├── show-all.jsp │ └── show-by-code.jsp │ ├── course │ ├── add.jsp │ ├── edit.jsp │ └── show-all.jsp │ ├── error.jsp │ ├── index.jsp │ └── student │ ├── add.jsp │ ├── edit.jsp │ └── show-all.jsp ├── spring-profiles-example ├── .gitignore ├── .idea │ ├── misc.xml │ ├── modules.xml │ ├── spring-profiles-example.iml │ ├── vcs.xml │ └── workspace.xml ├── spring-profiles-with-spring-boot │ ├── .gitignore │ ├── .idea │ │ ├── compiler.xml │ │ ├── encodings.xml │ │ ├── jarRepositories.xml │ │ ├── libraries │ │ │ ├── Maven__antlr_antlr_2_7_7.xml │ │ │ ├── Maven__ch_qos_logback_logback_classic_1_2_3.xml │ │ │ ├── Maven__ch_qos_logback_logback_core_1_2_3.xml │ │ │ ├── Maven__com_fasterxml_classmate_1_5_1.xml │ │ │ ├── Maven__com_fasterxml_jackson_core_jackson_annotations_2_10_2.xml │ │ │ ├── Maven__com_fasterxml_jackson_core_jackson_core_2_10_2.xml │ │ │ ├── Maven__com_fasterxml_jackson_core_jackson_databind_2_10_2.xml │ │ │ ├── Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_10_2.xml │ │ │ ├── Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_10_2.xml │ │ │ ├── Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_10_2.xml │ │ │ ├── Maven__com_google_android_annotations_4_1_1_4.xml │ │ │ ├── Maven__com_google_api_api_common_1_8_1.xml │ │ │ ├── Maven__com_google_api_client_google_api_client_1_30_1.xml │ │ │ ├── Maven__com_google_api_client_google_api_client_gson_1_30_1.xml │ │ │ ├── Maven__com_google_api_gax_1_49_1.xml │ │ │ ├── Maven__com_google_api_gax_grpc_1_49_1.xml │ │ │ ├── Maven__com_google_api_gax_httpjson_0_65_1.xml │ │ │ ├── Maven__com_google_api_grpc_proto_google_cloud_firestore_admin_v1_1_31_0.xml │ │ │ ├── Maven__com_google_api_grpc_proto_google_cloud_firestore_v1_1_31_0.xml │ │ │ ├── Maven__com_google_api_grpc_proto_google_cloud_firestore_v1beta1_0_84_0.xml │ │ │ ├── Maven__com_google_api_grpc_proto_google_common_protos_1_17_0.xml │ │ │ ├── Maven__com_google_api_grpc_proto_google_iam_v1_0_12_0.xml │ │ │ ├── Maven__com_google_apis_google_api_services_storage_v1_rev20190624_1_30_1.xml │ │ │ ├── Maven__com_google_auth_google_auth_library_credentials_0_17_1.xml │ │ │ ├── Maven__com_google_auth_google_auth_library_oauth2_http_0_17_1.xml │ │ │ ├── Maven__com_google_auto_value_auto_value_annotations_1_6_6.xml │ │ │ ├── Maven__com_google_cloud_google_cloud_core_1_90_0.xml │ │ │ ├── Maven__com_google_cloud_google_cloud_core_grpc_1_91_3.xml │ │ │ ├── Maven__com_google_cloud_google_cloud_core_http_1_90_0.xml │ │ │ ├── Maven__com_google_cloud_google_cloud_firestore_1_31_0.xml │ │ │ ├── Maven__com_google_cloud_google_cloud_storage_1_91_0.xml │ │ │ ├── Maven__com_google_code_findbugs_jsr305_3_0_2.xml │ │ │ ├── Maven__com_google_code_gson_gson_2_8_6.xml │ │ │ ├── Maven__com_google_errorprone_error_prone_annotations_2_3_2.xml │ │ │ ├── Maven__com_google_firebase_firebase_admin_6_12_2.xml │ │ │ ├── Maven__com_google_guava_guava_26_0_android.xml │ │ │ ├── Maven__com_google_http_client_google_http_client_1_30_1.xml │ │ │ ├── Maven__com_google_http_client_google_http_client_appengine_1_31_0.xml │ │ │ ├── Maven__com_google_http_client_google_http_client_gson_1_30_1.xml │ │ │ ├── Maven__com_google_http_client_google_http_client_jackson2_1_30_1.xml │ │ │ ├── Maven__com_google_j2objc_j2objc_annotations_1_3.xml │ │ │ ├── Maven__com_google_oauth_client_google_oauth_client_1_30_1.xml │ │ │ ├── Maven__com_google_protobuf_protobuf_java_3_10_0.xml │ │ │ ├── Maven__com_google_protobuf_protobuf_java_util_3_9_1.xml │ │ │ ├── Maven__com_sun_istack_istack_commons_runtime_3_0_8.xml │ │ │ ├── Maven__com_sun_xml_fastinfoset_FastInfoset_1_2_16.xml │ │ │ ├── Maven__com_zaxxer_HikariCP_3_4_2.xml │ │ │ ├── Maven__commons_codec_commons_codec_1_13.xml │ │ │ ├── Maven__io_grpc_grpc_alts_1_23_0.xml │ │ │ ├── Maven__io_grpc_grpc_api_1_23_0.xml │ │ │ ├── Maven__io_grpc_grpc_auth_1_23_0.xml │ │ │ ├── Maven__io_grpc_grpc_context_1_19_0.xml │ │ │ ├── Maven__io_grpc_grpc_core_1_23_0.xml │ │ │ ├── Maven__io_grpc_grpc_grpclb_1_23_0.xml │ │ │ ├── Maven__io_grpc_grpc_netty_shaded_1_23_0.xml │ │ │ ├── Maven__io_grpc_grpc_protobuf_1_23_0.xml │ │ │ ├── Maven__io_grpc_grpc_protobuf_lite_1_23_0.xml │ │ │ ├── Maven__io_grpc_grpc_stub_1_23_0.xml │ │ │ ├── Maven__io_netty_netty_buffer_4_1_45_Final.xml │ │ │ ├── Maven__io_netty_netty_codec_4_1_45_Final.xml │ │ │ ├── Maven__io_netty_netty_codec_http_4_1_45_Final.xml │ │ │ ├── Maven__io_netty_netty_common_4_1_45_Final.xml │ │ │ ├── Maven__io_netty_netty_handler_4_1_45_Final.xml │ │ │ ├── Maven__io_netty_netty_resolver_4_1_45_Final.xml │ │ │ ├── Maven__io_netty_netty_transport_4_1_45_Final.xml │ │ │ ├── Maven__io_opencensus_opencensus_api_0_21_0.xml │ │ │ ├── Maven__io_opencensus_opencensus_contrib_grpc_metrics_0_21_0.xml │ │ │ ├── Maven__io_opencensus_opencensus_contrib_grpc_util_0_24_0.xml │ │ │ ├── Maven__io_opencensus_opencensus_contrib_http_util_0_21_0.xml │ │ │ ├── Maven__io_perfmark_perfmark_api_0_17_0.xml │ │ │ ├── Maven__jakarta_activation_jakarta_activation_api_1_2_2.xml │ │ │ ├── Maven__jakarta_annotation_jakarta_annotation_api_1_3_5.xml │ │ │ ├── Maven__jakarta_persistence_jakarta_persistence_api_2_2_3.xml │ │ │ ├── Maven__jakarta_transaction_jakarta_transaction_api_1_3_3.xml │ │ │ ├── Maven__jakarta_validation_jakarta_validation_api_2_0_2.xml │ │ │ ├── Maven__jakarta_xml_bind_jakarta_xml_bind_api_2_3_2.xml │ │ │ ├── Maven__javax_annotation_javax_annotation_api_1_3_2.xml │ │ │ ├── Maven__mysql_mysql_connector_java_8_0_19.xml │ │ │ ├── Maven__net_bytebuddy_byte_buddy_1_10_8.xml │ │ │ ├── Maven__org_apache_commons_commons_lang3_3_9.xml │ │ │ ├── Maven__org_apache_httpcomponents_httpclient_4_5_11.xml │ │ │ ├── Maven__org_apache_httpcomponents_httpcore_4_4_13.xml │ │ │ ├── Maven__org_apache_logging_log4j_log4j_api_2_12_1.xml │ │ │ ├── Maven__org_apache_logging_log4j_log4j_to_slf4j_2_12_1.xml │ │ │ ├── Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_31.xml │ │ │ ├── Maven__org_apache_tomcat_embed_tomcat_embed_el_9_0_31.xml │ │ │ ├── Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_31.xml │ │ │ ├── Maven__org_aspectj_aspectjweaver_1_9_5.xml │ │ │ ├── Maven__org_checkerframework_checker_compat_qual_2_5_2.xml │ │ │ ├── Maven__org_codehaus_mojo_animal_sniffer_annotations_1_14.xml │ │ │ ├── Maven__org_dom4j_dom4j_2_1_1.xml │ │ │ ├── Maven__org_glassfish_jaxb_jaxb_runtime_2_3_2.xml │ │ │ ├── Maven__org_glassfish_jaxb_txw2_2_3_2.xml │ │ │ ├── Maven__org_hibernate_common_hibernate_commons_annotations_5_1_0_Final.xml │ │ │ ├── Maven__org_hibernate_hibernate_core_5_4_12_Final.xml │ │ │ ├── Maven__org_hibernate_validator_hibernate_validator_6_0_18_Final.xml │ │ │ ├── Maven__org_javassist_javassist_3_24_0_GA.xml │ │ │ ├── Maven__org_jboss_jandex_2_1_1_Final.xml │ │ │ ├── Maven__org_jboss_logging_jboss_logging_3_4_1_Final.xml │ │ │ ├── Maven__org_jvnet_staxex_stax_ex_1_8_1.xml │ │ │ ├── Maven__org_postgresql_postgresql_42_2_11.xml │ │ │ ├── Maven__org_projectlombok_lombok_1_18_12.xml │ │ │ ├── Maven__org_slf4j_jul_to_slf4j_1_7_30.xml │ │ │ ├── Maven__org_slf4j_slf4j_api_1_7_30.xml │ │ │ ├── Maven__org_springframework_boot_spring_boot_2_2_5_RELEASE.xml │ │ │ ├── Maven__org_springframework_boot_spring_boot_autoconfigure_2_2_5_RELEASE.xml │ │ │ ├── Maven__org_springframework_boot_spring_boot_starter_2_2_5_RELEASE.xml │ │ │ ├── Maven__org_springframework_boot_spring_boot_starter_aop_2_2_5_RELEASE.xml │ │ │ ├── Maven__org_springframework_boot_spring_boot_starter_data_jpa_2_2_5_RELEASE.xml │ │ │ ├── Maven__org_springframework_boot_spring_boot_starter_jdbc_2_2_5_RELEASE.xml │ │ │ ├── Maven__org_springframework_boot_spring_boot_starter_json_2_2_5_RELEASE.xml │ │ │ ├── Maven__org_springframework_boot_spring_boot_starter_logging_2_2_5_RELEASE.xml │ │ │ ├── Maven__org_springframework_boot_spring_boot_starter_tomcat_2_2_5_RELEASE.xml │ │ │ ├── Maven__org_springframework_boot_spring_boot_starter_validation_2_2_5_RELEASE.xml │ │ │ ├── Maven__org_springframework_boot_spring_boot_starter_web_2_2_5_RELEASE.xml │ │ │ ├── Maven__org_springframework_data_spring_data_commons_2_2_5_RELEASE.xml │ │ │ ├── Maven__org_springframework_data_spring_data_jpa_2_2_5_RELEASE.xml │ │ │ ├── Maven__org_springframework_spring_aop_5_2_4_RELEASE.xml │ │ │ ├── Maven__org_springframework_spring_aspects_5_2_4_RELEASE.xml │ │ │ ├── Maven__org_springframework_spring_beans_5_2_4_RELEASE.xml │ │ │ ├── Maven__org_springframework_spring_context_5_2_4_RELEASE.xml │ │ │ ├── Maven__org_springframework_spring_core_5_2_4_RELEASE.xml │ │ │ ├── Maven__org_springframework_spring_expression_5_2_4_RELEASE.xml │ │ │ ├── Maven__org_springframework_spring_jcl_5_2_4_RELEASE.xml │ │ │ ├── Maven__org_springframework_spring_jdbc_5_2_4_RELEASE.xml │ │ │ ├── Maven__org_springframework_spring_orm_5_2_4_RELEASE.xml │ │ │ ├── Maven__org_springframework_spring_tx_5_2_4_RELEASE.xml │ │ │ ├── Maven__org_springframework_spring_web_5_2_4_RELEASE.xml │ │ │ ├── Maven__org_springframework_spring_webmvc_5_2_4_RELEASE.xml │ │ │ ├── Maven__org_threeten_threetenbp_1_3_3.xml │ │ │ └── Maven__org_yaml_snakeyaml_1_25.xml │ │ ├── misc.xml │ │ ├── modules.xml │ │ ├── spring-profiles-with-spring-boot.iml │ │ ├── vcs.xml │ │ └── workspace.xml │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── mainul35 │ │ │ ├── Main.java │ │ │ └── RootRestController.java │ │ └── resources │ │ ├── application-dev.properties │ │ ├── application-prod.properties │ │ └── application.properties └── spring-profiles-with-spring-mvc-java-config │ ├── .idea │ ├── .gitignore │ ├── artifacts │ │ ├── spring_profiles_with_spring_mvc_java_config_war.xml │ │ └── spring_profiles_with_spring_mvc_java_config_war_exploded.xml │ ├── compiler.xml │ ├── libraries │ │ ├── Maven__antlr_antlr_2_7_7.xml │ │ ├── Maven__com_fasterxml_classmate_1_3_4.xml │ │ ├── Maven__com_fasterxml_jackson_core_jackson_annotations_2_10_2.xml │ │ ├── Maven__com_google_protobuf_protobuf_java_3_6_1.xml │ │ ├── Maven__javax_activation_javax_activation_api_1_2_0.xml │ │ ├── Maven__javax_persistence_javax_persistence_api_2_2.xml │ │ ├── Maven__javax_servlet_javax_servlet_api_4_0_1.xml │ │ ├── Maven__javax_servlet_jsp_javax_servlet_jsp_api_2_3_3.xml │ │ ├── Maven__javax_servlet_jstl_1_2.xml │ │ ├── Maven__javax_xml_bind_jaxb_api_2_3_1.xml │ │ ├── Maven__mysql_mysql_connector_java_8_0_19.xml │ │ ├── Maven__net_bytebuddy_byte_buddy_1_9_5.xml │ │ ├── Maven__org_aspectj_aspectjrt_1_9_5.xml │ │ ├── Maven__org_dom4j_dom4j_2_1_1.xml │ │ ├── Maven__org_hibernate_common_hibernate_commons_annotations_5_0_4_Final.xml │ │ ├── Maven__org_hibernate_hibernate_core_5_3_11_Final.xml │ │ ├── Maven__org_javassist_javassist_3_23_2_GA.xml │ │ ├── Maven__org_jboss_jandex_2_0_5_Final.xml │ │ ├── Maven__org_jboss_logging_jboss_logging_3_3_2_Final.xml │ │ ├── Maven__org_jboss_spec_javax_transaction_jboss_transaction_api_1_2_spec_1_1_1_Final.xml │ │ ├── Maven__org_postgresql_postgresql_42_2_5.xml │ │ ├── Maven__org_reflections_reflections_0_9_12.xml │ │ ├── Maven__org_slf4j_slf4j_api_1_7_26.xml │ │ ├── Maven__org_springframework_data_spring_data_commons_2_2_4_RELEASE.xml │ │ ├── Maven__org_springframework_data_spring_data_jpa_2_2_4_RELEASE.xml │ │ ├── Maven__org_springframework_security_spring_security_acl_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_security_spring_security_config_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_security_spring_security_core_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_security_spring_security_taglibs_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_security_spring_security_web_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_aop_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_beans_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_context_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_core_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_expression_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_jcl_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_jdbc_5_2_3_RELEASE.xml │ │ ├── Maven__org_springframework_spring_orm_5_2_3_RELEASE.xml │ │ ├── Maven__org_springframework_spring_tx_5_2_3_RELEASE.xml │ │ ├── Maven__org_springframework_spring_web_5_2_2_RELEASE.xml │ │ └── Maven__org_springframework_spring_webmvc_5_2_2_RELEASE.xml │ ├── misc.xml │ ├── modules.xml │ └── vcs.xml │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── com │ │ └── spring5 │ │ └── practice │ │ ├── AppInitializer.java │ │ ├── GlobalExceptionHandler.java │ │ ├── RootConfig.java │ │ ├── ServletConfig.java │ │ ├── config │ │ ├── persistence │ │ │ └── HibernateConfig.java │ │ └── security │ │ │ ├── SpringSecurityInitializer.java │ │ │ └── WebSecurityConfiguration.java │ │ ├── controllers │ │ ├── CountryController.java │ │ ├── CourseController.java │ │ ├── RootController.java │ │ └── StudnetController.java │ │ ├── dtos │ │ └── StudentDto.java │ │ ├── enums │ │ └── Role.java │ │ ├── exceptions │ │ ├── ResourceAlreadyExistsException.java │ │ └── ResourceNotFoundException.java │ │ ├── model │ │ ├── Country.java │ │ ├── Course.java │ │ ├── Student.java │ │ └── User.java │ │ ├── repositories │ │ ├── CourseRepository.java │ │ └── UserRepository.java │ │ ├── request │ │ └── Student.java │ │ └── service │ │ ├── CountryService.java │ │ ├── CourseService.java │ │ ├── StudentService.java │ │ └── UserService.java │ ├── resources │ ├── hibernate-dev.properties │ └── hibernate-prod.properties │ └── webapp │ └── WEB-INF │ ├── resources │ ├── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ ├── bootstrap.min.css.map │ │ └── login.css │ ├── images │ │ └── course_cover.jpg │ └── js │ │ ├── bootstrap.bundle.js │ │ ├── bootstrap.bundle.js.map │ │ ├── bootstrap.bundle.min.js │ │ ├── bootstrap.bundle.min.js.map │ │ ├── bootstrap.js │ │ ├── bootstrap.js.map │ │ ├── bootstrap.min.js │ │ ├── bootstrap.min.js.map │ │ └── jquery.js │ └── views │ ├── 403.jsp │ ├── auth │ └── login.jsp │ ├── common │ ├── footer.jsp │ └── header.jsp │ ├── country │ ├── add.jsp │ ├── show-all.jsp │ └── show-by-code.jsp │ ├── course │ ├── add.jsp │ ├── edit.jsp │ ├── header.jsp │ └── show-all.jsp │ ├── error.jsp │ ├── index.jsp │ └── student │ ├── add.jsp │ ├── edit.jsp │ └── show-all.jsp ├── spring-security-custom-auth-success-handler ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── spring5 │ │ └── practice │ │ ├── AppInitializer.java │ │ ├── GlobalExceptionHandler.java │ │ ├── RootConfig.java │ │ ├── ServletConfig.java │ │ ├── config │ │ ├── persistence │ │ │ └── HibernateConfig.java │ │ └── security │ │ │ ├── AuthSuccessHandler.java │ │ │ ├── SpringSecurityInitializer.java │ │ │ └── WebSecurityConfiguration.java │ │ ├── controllers │ │ ├── CountryController.java │ │ ├── CourseController.java │ │ ├── RootController.java │ │ └── StudnetController.java │ │ ├── dtos │ │ └── StudentDto.java │ │ ├── exceptions │ │ ├── ResourceAlreadyExistsException.java │ │ └── ResourceNotFoundException.java │ │ ├── model │ │ ├── Country.java │ │ ├── Course.java │ │ └── Student.java │ │ ├── repositories │ │ └── CourseRepository.java │ │ ├── request │ │ └── Student.java │ │ └── service │ │ ├── CountryService.java │ │ ├── CourseService.java │ │ └── StudentService.java │ ├── resources │ └── hibernate.properties │ └── webapp │ └── WEB-INF │ ├── resources │ ├── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ ├── bootstrap.min.css.map │ │ └── login.css │ ├── images │ │ └── course_cover.jpg │ └── js │ │ ├── bootstrap.bundle.js │ │ ├── bootstrap.bundle.js.map │ │ ├── bootstrap.bundle.min.js │ │ ├── bootstrap.bundle.min.js.map │ │ ├── bootstrap.js │ │ ├── bootstrap.js.map │ │ ├── bootstrap.min.js │ │ ├── bootstrap.min.js.map │ │ └── jquery.js │ └── views │ ├── auth │ └── login.jsp │ ├── common │ ├── footer.jsp │ └── header.jsp │ ├── country │ ├── add.jsp │ ├── show-all.jsp │ └── show-by-code.jsp │ ├── course │ ├── add.jsp │ ├── edit.jsp │ ├── header.jsp │ └── show-all.jsp │ ├── error.jsp │ ├── index.jsp │ └── student │ ├── add.jsp │ ├── edit.jsp │ └── show-all.jsp ├── spring5-hello-world ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── spring5 │ │ └── practice │ │ ├── config │ │ ├── AppInitializer.java │ │ ├── RootConfig.java │ │ └── ServletConfig.java │ │ └── controllers │ │ └── RootController.java │ └── webapp │ └── WEB-INF │ └── views │ └── hello.jsp ├── spring5-oauth2-inmemory ├── .idea │ ├── .gitignore │ ├── .name │ ├── artifacts │ │ ├── spring5_hello_world_war.xml │ │ └── spring5_hello_world_war_exploded.xml │ ├── compiler.xml │ ├── libraries │ │ ├── Maven__antlr_antlr_2_7_7.xml │ │ ├── Maven__aopalliance_aopalliance_1_0.xml │ │ ├── Maven__com_fasterxml_classmate_1_3_4.xml │ │ ├── Maven__com_fasterxml_jackson_core_jackson_annotations_2_10_2.xml │ │ ├── Maven__commons_codec_commons_codec_1_9.xml │ │ ├── Maven__javax_activation_javax_activation_api_1_2_0.xml │ │ ├── Maven__javax_persistence_javax_persistence_api_2_2.xml │ │ ├── Maven__javax_servlet_javax_servlet_api_4_0_1.xml │ │ ├── Maven__javax_servlet_jsp_javax_servlet_jsp_api_2_3_3.xml │ │ ├── Maven__javax_servlet_jstl_1_2.xml │ │ ├── Maven__javax_xml_bind_jaxb_api_2_3_1.xml │ │ ├── Maven__net_bytebuddy_byte_buddy_1_9_5.xml │ │ ├── Maven__org_aspectj_aspectjrt_1_9_5.xml │ │ ├── Maven__org_codehaus_jackson_jackson_core_asl_1_9_13.xml │ │ ├── Maven__org_codehaus_jackson_jackson_mapper_asl_1_9_13.xml │ │ ├── Maven__org_dom4j_dom4j_2_1_1.xml │ │ ├── Maven__org_hibernate_common_hibernate_commons_annotations_5_0_4_Final.xml │ │ ├── Maven__org_hibernate_hibernate_core_5_3_11_Final.xml │ │ ├── Maven__org_javassist_javassist_3_23_2_GA.xml │ │ ├── Maven__org_jboss_jandex_2_0_5_Final.xml │ │ ├── Maven__org_jboss_logging_jboss_logging_3_3_2_Final.xml │ │ ├── Maven__org_jboss_spec_javax_transaction_jboss_transaction_api_1_2_spec_1_1_1_Final.xml │ │ ├── Maven__org_postgresql_postgresql_42_2_5.xml │ │ ├── Maven__org_reflections_reflections_0_9_12.xml │ │ ├── Maven__org_slf4j_slf4j_api_1_7_26.xml │ │ ├── Maven__org_springframework_data_spring_data_commons_2_2_4_RELEASE.xml │ │ ├── Maven__org_springframework_data_spring_data_jpa_2_2_4_RELEASE.xml │ │ ├── Maven__org_springframework_security_oauth_spring_security_oauth2_2_3_4_RELEASE.xml │ │ ├── Maven__org_springframework_security_spring_security_config_3_2_10_RELEASE.xml │ │ ├── Maven__org_springframework_security_spring_security_core_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_security_spring_security_web_3_2_10_RELEASE.xml │ │ ├── Maven__org_springframework_spring_aop_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_beans_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_context_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_core_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_expression_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_jcl_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_jdbc_5_2_3_RELEASE.xml │ │ ├── Maven__org_springframework_spring_orm_5_2_3_RELEASE.xml │ │ ├── Maven__org_springframework_spring_tx_5_2_3_RELEASE.xml │ │ ├── Maven__org_springframework_spring_web_5_2_2_RELEASE.xml │ │ └── Maven__org_springframework_spring_webmvc_5_2_2_RELEASE.xml │ ├── misc.xml │ ├── modules.xml │ └── vcs.xml ├── pom.xml ├── spring5-hello-world.iml └── src │ └── main │ ├── java │ └── com │ │ └── spring5 │ │ └── practice │ │ ├── AppInitializer.java │ │ ├── GlobalExceptionHandler.java │ │ ├── RootConfig.java │ │ ├── ServletConfig.java │ │ └── config │ │ ├── AppInitializer.java │ │ ├── RootConfig.java │ │ ├── ServletConfig.java │ │ └── persistence │ │ └── HibernateConfig.java │ ├── resources │ └── hibernate.properties │ └── webapp │ └── WEB-INF │ ├── resources │ ├── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ ├── bootstrap.min.css.map │ │ └── login.css │ ├── images │ │ └── course_cover.jpg │ └── js │ │ ├── bootstrap.bundle.js │ │ ├── bootstrap.bundle.js.map │ │ ├── bootstrap.bundle.min.js │ │ ├── bootstrap.bundle.min.js.map │ │ ├── bootstrap.js │ │ ├── bootstrap.js.map │ │ ├── bootstrap.min.js │ │ ├── bootstrap.min.js.map │ │ └── jquery.js │ └── views │ ├── common │ ├── footer.jsp │ └── header.jsp │ ├── country │ ├── add.jsp │ ├── show-all.jsp │ └── show-by-code.jsp │ ├── course │ ├── add.jsp │ ├── edit.jsp │ └── show-all.jsp │ ├── error.jsp │ ├── hello.jsp │ ├── index.jsp │ └── student │ ├── add.jsp │ ├── edit.jsp │ └── show-all.jsp ├── spring5-rendering-static-resources ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── spring5 │ │ └── practice │ │ ├── config │ │ ├── AppInitializer.java │ │ ├── RootConfig.java │ │ └── ServletConfig.java │ │ └── controllers │ │ └── RootController.java │ └── webapp │ └── WEB-INF │ ├── resources │ ├── css │ │ ├── resume.css │ │ └── resume.min.css │ ├── images │ │ └── profile.jpg │ ├── js │ │ ├── resume.js │ │ └── resume.min.js │ └── vendor │ │ ├── bootstrap │ │ ├── css │ │ │ ├── bootstrap-grid.css │ │ │ ├── bootstrap-grid.css.map │ │ │ ├── bootstrap-grid.min.css │ │ │ ├── bootstrap-grid.min.css.map │ │ │ ├── bootstrap-reboot.css │ │ │ ├── bootstrap-reboot.css.map │ │ │ ├── bootstrap-reboot.min.css │ │ │ ├── bootstrap-reboot.min.css.map │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.css.map │ │ │ ├── bootstrap.min.css │ │ │ └── bootstrap.min.css.map │ │ └── js │ │ │ ├── bootstrap.bundle.js │ │ │ ├── bootstrap.bundle.js.map │ │ │ ├── bootstrap.bundle.min.js │ │ │ ├── bootstrap.bundle.min.js.map │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.js.map │ │ │ ├── bootstrap.min.js │ │ │ └── bootstrap.min.js.map │ │ ├── fontawesome-free │ │ ├── css │ │ │ ├── all.css │ │ │ ├── all.min.css │ │ │ ├── brands.css │ │ │ ├── brands.min.css │ │ │ ├── fontawesome.css │ │ │ ├── fontawesome.min.css │ │ │ ├── regular.css │ │ │ ├── regular.min.css │ │ │ ├── solid.css │ │ │ ├── solid.min.css │ │ │ ├── svg-with-js.css │ │ │ ├── svg-with-js.min.css │ │ │ ├── v4-shims.css │ │ │ └── v4-shims.min.css │ │ └── webfonts │ │ │ ├── fa-brands-400.eot │ │ │ ├── fa-brands-400.svg │ │ │ ├── fa-brands-400.ttf │ │ │ ├── fa-brands-400.woff │ │ │ ├── fa-brands-400.woff2 │ │ │ ├── fa-regular-400.eot │ │ │ ├── fa-regular-400.svg │ │ │ ├── fa-regular-400.ttf │ │ │ ├── fa-regular-400.woff │ │ │ ├── fa-regular-400.woff2 │ │ │ ├── fa-solid-900.eot │ │ │ ├── fa-solid-900.svg │ │ │ ├── fa-solid-900.ttf │ │ │ ├── fa-solid-900.woff │ │ │ └── fa-solid-900.woff2 │ │ ├── jquery-easing │ │ ├── jquery.easing.compatibility.js │ │ ├── jquery.easing.js │ │ └── jquery.easing.min.js │ │ └── jquery │ │ ├── jquery.js │ │ ├── jquery.min.js │ │ ├── jquery.min.map │ │ ├── jquery.slim.js │ │ ├── jquery.slim.min.js │ │ └── jquery.slim.min.map │ └── views │ ├── hello.jsp │ └── index.jsp ├── using-firebase-realtime-db-with-spring ├── .idea │ ├── .gitignore │ ├── artifacts │ │ ├── using_firebase_realtime_db_with_spring_war.xml │ │ └── using_firebase_realtime_db_with_spring_war_exploded.xml │ ├── compiler.xml │ ├── libraries │ │ ├── Maven__javax_servlet_javax_servlet_api_4_0_1.xml │ │ ├── Maven__javax_servlet_jsp_javax_servlet_jsp_api_2_3_3.xml │ │ ├── Maven__javax_servlet_jstl_1_2.xml │ │ ├── Maven__org_springframework_spring_aop_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_beans_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_context_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_core_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_expression_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_jcl_5_2_2_RELEASE.xml │ │ ├── Maven__org_springframework_spring_web_5_2_2_RELEASE.xml │ │ └── Maven__org_springframework_spring_webmvc_5_2_2_RELEASE.xml │ ├── misc.xml │ ├── modules.xml │ └── vcs.xml ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── spring5 │ │ └── practice │ │ ├── config │ │ ├── AppInitializer.java │ │ ├── RootConfig.java │ │ └── ServletConfig.java │ │ └── controllers │ │ └── RootController.java │ └── webapp │ └── WEB-INF │ └── views │ └── hello.jsp └── using-spring-security-taglib ├── pom.xml └── src └── main ├── java └── com │ └── spring5 │ └── practice │ ├── AppInitializer.java │ ├── GlobalExceptionHandler.java │ ├── RootConfig.java │ ├── ServletConfig.java │ ├── config │ ├── persistence │ │ └── HibernateConfig.java │ └── security │ │ ├── SpringSecurityInitializer.java │ │ └── WebSecurityConfiguration.java │ ├── controllers │ ├── CountryController.java │ ├── CourseController.java │ ├── RootController.java │ └── StudnetController.java │ ├── dtos │ └── StudentDto.java │ ├── enums │ └── Role.java │ ├── exceptions │ ├── ResourceAlreadyExistsException.java │ └── ResourceNotFoundException.java │ ├── model │ ├── Country.java │ ├── Course.java │ ├── Student.java │ └── User.java │ ├── repositories │ ├── CourseRepository.java │ └── UserRepository.java │ ├── request │ └── Student.java │ └── service │ ├── CountryService.java │ ├── CourseService.java │ ├── StudentService.java │ └── UserService.java ├── resources └── hibernate.properties └── webapp └── WEB-INF ├── resources ├── css │ ├── bootstrap-grid.css │ ├── bootstrap-grid.css.map │ ├── bootstrap-grid.min.css │ ├── bootstrap-grid.min.css.map │ ├── bootstrap-reboot.css │ ├── bootstrap-reboot.css.map │ ├── bootstrap-reboot.min.css │ ├── bootstrap-reboot.min.css.map │ ├── bootstrap.css │ ├── bootstrap.css.map │ ├── bootstrap.min.css │ ├── bootstrap.min.css.map │ └── login.css ├── images │ └── course_cover.jpg └── js │ ├── bootstrap.bundle.js │ ├── bootstrap.bundle.js.map │ ├── bootstrap.bundle.min.js │ ├── bootstrap.bundle.min.js.map │ ├── bootstrap.js │ ├── bootstrap.js.map │ ├── bootstrap.min.js │ ├── bootstrap.min.js.map │ └── jquery.js └── views ├── 403.jsp ├── auth └── login.jsp ├── common ├── footer.jsp └── header.jsp ├── country ├── add.jsp ├── show-all.jsp └── show-by-code.jsp ├── course ├── add.jsp ├── edit.jsp ├── header.jsp └── show-all.jsp ├── error.jsp ├── index.jsp └── student ├── add.jsp ├── edit.jsp └── show-all.jsp /.gitignore: -------------------------------------------------------------------------------- 1 | **/.classpath 2 | **/.project 3 | **/.settings/ 4 | **/target/ 5 | **/bin/ 6 | *.iml 7 | .idea 8 | **/.idea 9 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | Use this section to tell people about which versions of your project are 6 | currently being supported with security updates. 7 | 8 | | Version | Supported | 9 | | ------- | ------------------ | 10 | | 5.1.x | :white_check_mark: | 11 | | 5.0.x | :x: | 12 | | 4.0.x | :white_check_mark: | 13 | | < 4.0 | :x: | 14 | 15 | ## Reporting a Vulnerability 16 | 17 | Use this section to tell people how to report a vulnerability. 18 | 19 | Tell them where to go, how often they can expect to get an update on a 20 | reported vulnerability, what to expect if the vulnerability is accepted or 21 | declined, etc. 22 | -------------------------------------------------------------------------------- /adding-spring-security-database-backed/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.9' 2 | services: 3 | student_course_module_jpa: 4 | image: mysql 5 | container_name: student_course_module_jpa 6 | volumes: 7 | - ./data:/data 8 | ports: 9 | - '3307:3306' 10 | command: --default-authentication-plugin=mysql_native_password 11 | environment: 12 | - 'MYSQL_ROOT_PASSWORD=@root#' 13 | - 'MYSQL_DATABASE=student_course_module_jpa' 14 | extra_hosts: 15 | - 'spring_mvc_hibernate:192.168.238.2' -------------------------------------------------------------------------------- /adding-spring-security-database-backed/src/main/java/com/spring5/practice/RootConfig.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.ComponentScan; 5 | 6 | @ComponentScan(basePackages = { 7 | "com.spring5.practice.service", 8 | "com.spring5.practice.config.persistence", 9 | }) 10 | //@ComponentScan(basePackageClasses = {StudentService.class}) 11 | public class RootConfig { 12 | @Bean 13 | GlobalExceptionHandler globalExceptionHandler() { 14 | return new GlobalExceptionHandler(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /adding-spring-security-database-backed/src/main/java/com/spring5/practice/config/security/SecurityInitializer.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.config.security; 2 | 3 | import org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer; 4 | 5 | public class SecurityInitializer extends AbstractSecurityWebApplicationInitializer { 6 | } 7 | 8 | -------------------------------------------------------------------------------- /adding-spring-security-database-backed/src/main/java/com/spring5/practice/enums/Role.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.enums; 2 | 3 | public enum Role { 4 | ROLE_USER, ROLE_ADMIN 5 | } 6 | -------------------------------------------------------------------------------- /adding-spring-security-database-backed/src/main/java/com/spring5/practice/exceptions/ResourceAlreadyExistsException.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.exceptions; 2 | 3 | public class ResourceAlreadyExistsException extends RuntimeException { 4 | public ResourceAlreadyExistsException() { 5 | super(); 6 | // TODO Auto-generated constructor stub 7 | } 8 | 9 | public ResourceAlreadyExistsException(String message, Throwable cause) { 10 | super(message, cause); 11 | // TODO Auto-generated constructor stub 12 | } 13 | 14 | public ResourceAlreadyExistsException(String message) { 15 | super(message); 16 | // TODO Auto-generated constructor stub 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /adding-spring-security-database-backed/src/main/java/com/spring5/practice/exceptions/ResourceNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.exceptions; 2 | 3 | public class ResourceNotFoundException extends RuntimeException { 4 | public ResourceNotFoundException() { 5 | super(); 6 | // TODO Auto-generated constructor stub 7 | } 8 | 9 | public ResourceNotFoundException(String message, Throwable cause) { 10 | super(message, cause); 11 | // TODO Auto-generated constructor stub 12 | } 13 | 14 | public ResourceNotFoundException(String message) { 15 | super(message); 16 | // TODO Auto-generated constructor stub 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /adding-spring-security-database-backed/src/main/java/com/spring5/practice/repositories/CourseRepository.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.repositories; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | import com.spring5.practice.model.Course; 8 | import org.springframework.stereotype.Repository; 9 | import org.springframework.transaction.annotation.Transactional; 10 | 11 | @Repository 12 | @Transactional 13 | public interface CourseRepository extends JpaRepository{ 14 | 15 | Course findByCourseId(Long id); 16 | 17 | Course findByCourseCode(String courseCode); 18 | 19 | // List findByCountry_CountryCode(String countryCode); 20 | } 21 | -------------------------------------------------------------------------------- /adding-spring-security-database-backed/src/main/java/com/spring5/practice/repositories/UserRepository.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.repositories; 2 | 3 | import com.spring5.practice.model.User; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.stereotype.Repository; 6 | import org.springframework.transaction.annotation.Transactional; 7 | 8 | import java.util.Optional; 9 | 10 | @Repository 11 | @Transactional 12 | public interface UserRepository extends JpaRepository { 13 | 14 | Optional findByUsername(String username); 15 | } 16 | -------------------------------------------------------------------------------- /adding-spring-security-database-backed/src/main/resources/hibernate.properties: -------------------------------------------------------------------------------- 1 | hibernate.hbm2ddl.auto=update 2 | hibernate.dialect=org.hibernate.dialect.MySQLDialect 3 | hibernate.show_sql=false 4 | #hibernate.current_session_context_class=thread 5 | jakarta.persistence.jdbc.url=jdbc:mysql://192.168.238.2:3307/student_course_module_jpa?createDatabaseIfNotExist=true&serverTimezone=UTC 6 | hibernate.connection.driver_class=com.mysql.cj.jdbc.Driver 7 | hibernate.connection.username=root 8 | hibernate.connection.password=@root# 9 | hibernate.connection.autocommit=false 10 | hibernate.enable_lazy_load_no_trans=true 11 | -------------------------------------------------------------------------------- /adding-spring-security-database-backed/src/main/webapp/WEB-INF/resources/images/course_cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/adding-spring-security-database-backed/src/main/webapp/WEB-INF/resources/images/course_cover.jpg -------------------------------------------------------------------------------- /adding-spring-security-database-backed/src/main/webapp/WEB-INF/views/common/footer.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /adding-spring-security-database-backed/src/main/webapp/WEB-INF/views/common/header.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1" 2 | pageEncoding="ISO-8859-1" %> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 4 | <%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %> 5 | 6 | 7 | 8 | 9 | Spring By Practical Examples 10 | 12 | 13 | -------------------------------------------------------------------------------- /adding-spring-security-database-backed/src/main/webapp/WEB-INF/views/course/header.jsp: -------------------------------------------------------------------------------- 1 | Logout -------------------------------------------------------------------------------- /adding-spring-security-database-backed/src/main/webapp/WEB-INF/views/error.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1" 2 | pageEncoding="ISO-8859-1" %> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 |

${message}

11 | 12 | -------------------------------------------------------------------------------- /adding-spring-security-in-memory/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.9' 2 | services: 3 | student_course_module_jpa: 4 | image: mysql 5 | container_name: student_course_module_jpa 6 | volumes: 7 | - ./data:/data 8 | ports: 9 | - '3307:3306' 10 | command: --default-authentication-plugin=mysql_native_password 11 | environment: 12 | - 'MYSQL_ROOT_PASSWORD=@root#' 13 | - 'MYSQL_DATABASE=student_course_module_jpa' 14 | extra_hosts: 15 | - 'spring_mvc_hibernate:192.168.238.2' -------------------------------------------------------------------------------- /adding-spring-security-in-memory/src/main/java/com/spring5/practice/RootConfig.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.ComponentScan; 5 | 6 | @ComponentScan(basePackages = { 7 | "com.spring5.practice.service", 8 | "com.spring5.practice.config.persistence", 9 | "com.spring5.practice.config.security", 10 | }) 11 | //@ComponentScan(basePackageClasses = {StudentService.class}) 12 | public class RootConfig { 13 | @Bean 14 | GlobalExceptionHandler globalExceptionHandler() { 15 | return new GlobalExceptionHandler(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /adding-spring-security-in-memory/src/main/java/com/spring5/practice/config/security/SecurityInitializer.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.config.security; 2 | 3 | import org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer; 4 | 5 | public class SecurityInitializer extends AbstractSecurityWebApplicationInitializer { 6 | } 7 | 8 | -------------------------------------------------------------------------------- /adding-spring-security-in-memory/src/main/java/com/spring5/practice/exceptions/ResourceAlreadyExistsException.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.exceptions; 2 | 3 | public class ResourceAlreadyExistsException extends RuntimeException { 4 | public ResourceAlreadyExistsException() { 5 | super(); 6 | // TODO Auto-generated constructor stub 7 | } 8 | 9 | public ResourceAlreadyExistsException(String message, Throwable cause) { 10 | super(message, cause); 11 | // TODO Auto-generated constructor stub 12 | } 13 | 14 | public ResourceAlreadyExistsException(String message) { 15 | super(message); 16 | // TODO Auto-generated constructor stub 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /adding-spring-security-in-memory/src/main/java/com/spring5/practice/exceptions/ResourceNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.exceptions; 2 | 3 | public class ResourceNotFoundException extends RuntimeException { 4 | public ResourceNotFoundException() { 5 | super(); 6 | // TODO Auto-generated constructor stub 7 | } 8 | 9 | public ResourceNotFoundException(String message, Throwable cause) { 10 | super(message, cause); 11 | // TODO Auto-generated constructor stub 12 | } 13 | 14 | public ResourceNotFoundException(String message) { 15 | super(message); 16 | // TODO Auto-generated constructor stub 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /adding-spring-security-in-memory/src/main/java/com/spring5/practice/repositories/CourseRepository.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.repositories; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | import com.spring5.practice.model.Course; 8 | import org.springframework.stereotype.Repository; 9 | import org.springframework.transaction.annotation.Transactional; 10 | 11 | @Repository 12 | @Transactional 13 | public interface CourseRepository extends JpaRepository{ 14 | 15 | Course findByCourseId(Long id); 16 | 17 | Course findByCourseCode(String courseCode); 18 | 19 | // List findByCountry_CountryCode(String countryCode); 20 | } 21 | -------------------------------------------------------------------------------- /adding-spring-security-in-memory/src/main/resources/hibernate.properties: -------------------------------------------------------------------------------- 1 | hibernate.hbm2ddl.auto=update 2 | hibernate.dialect=org.hibernate.dialect.MySQLDialect 3 | hibernate.show_sql=true 4 | #hibernate.current_session_context_class=thread 5 | jakarta.persistence.jdbc.url=jdbc:mysql://192.168.238.2:3307/student_course_module_jpa?createDatabaseIfNotExist=true&serverTimezone=UTC 6 | hibernate.connection.driver_class=com.mysql.cj.jdbc.Driver 7 | hibernate.connection.username=root 8 | hibernate.connection.password=@root# 9 | hibernate.connection.autocommit=false 10 | hibernate.enable_lazy_load_no_trans=true 11 | -------------------------------------------------------------------------------- /adding-spring-security-in-memory/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /adding-spring-security-in-memory/src/main/webapp/WEB-INF/resources/images/course_cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/adding-spring-security-in-memory/src/main/webapp/WEB-INF/resources/images/course_cover.jpg -------------------------------------------------------------------------------- /adding-spring-security-in-memory/src/main/webapp/WEB-INF/views/common/footer.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /adding-spring-security-in-memory/src/main/webapp/WEB-INF/views/common/header.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1" 2 | pageEncoding="ISO-8859-1" %> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 4 | <%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %> 5 | 6 | 7 | 8 | 9 | Spring By Practical Examples 10 | 12 | 13 | -------------------------------------------------------------------------------- /adding-spring-security-in-memory/src/main/webapp/WEB-INF/views/course/header.jsp: -------------------------------------------------------------------------------- 1 | Logout -------------------------------------------------------------------------------- /adding-spring-security-in-memory/src/main/webapp/WEB-INF/views/error.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1" 2 | pageEncoding="ISO-8859-1" %> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 |

${message}

11 | 12 | -------------------------------------------------------------------------------- /batch-2/spring-boot-class-practice/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /batch-2/spring-boot-class-practice/src/main/java/com/example/MainulbhaiApplication.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.boot.autoconfigure.domain.EntityScan; 6 | import org.springframework.context.annotation.ComponentScan; 7 | import org.springframework.data.jpa.repository.config.EnableJpaRepositories; 8 | 9 | @SpringBootApplication 10 | public class MainulbhaiApplication { 11 | 12 | public static void main(String[] args) { 13 | SpringApplication.run(MainulbhaiApplication.class, args); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /batch-2/spring-boot-class-practice/src/main/java/com/example/controller/IndexController.java: -------------------------------------------------------------------------------- 1 | package com.example.controller; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | @Controller 7 | public class IndexController { 8 | 9 | @RequestMapping("/") 10 | public String root() { 11 | return "redirect:/employee/"; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /batch-2/spring-boot-class-practice/src/main/java/com/example/dto/DesignationDto.java: -------------------------------------------------------------------------------- 1 | package com.example.dto; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class DesignationDto { 7 | private long designationId; 8 | private String designationName; 9 | } 10 | -------------------------------------------------------------------------------- /batch-2/spring-boot-class-practice/src/main/java/com/example/dto/EmployeeDto.java: -------------------------------------------------------------------------------- 1 | package com.example.dto; 2 | 3 | import com.example.entity.Designation; 4 | import lombok.Data; 5 | 6 | @Data 7 | public class EmployeeDto { 8 | private long id; 9 | private String name; 10 | private int age; 11 | private String address; 12 | private double salary; 13 | private DesignationDto designationDto; 14 | private String workType; 15 | } 16 | -------------------------------------------------------------------------------- /batch-2/spring-boot-class-practice/src/main/java/com/example/entity/Designation.java: -------------------------------------------------------------------------------- 1 | package com.example.entity; 2 | 3 | import lombok.Data; 4 | import lombok.NoArgsConstructor; 5 | 6 | import javax.persistence.*; 7 | 8 | @Entity(name = "Designation") 9 | @Data 10 | @NoArgsConstructor 11 | public class Designation { 12 | @Id 13 | @GeneratedValue(strategy = GenerationType.AUTO) 14 | private long designationId; 15 | 16 | @Column 17 | private String designationName; 18 | } 19 | -------------------------------------------------------------------------------- /batch-2/spring-boot-class-practice/src/main/java/com/example/exception/ResourceNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.example.exception; 2 | 3 | public class ResourceNotFoundException extends RuntimeException { 4 | /** 5 | * Constructs a new runtime exception with the specified detail message. 6 | * The cause is not initialized, and may subsequently be initialized by a 7 | * call to {@link #initCause}. 8 | * 9 | * @param message the detail message. The detail message is saved for 10 | * later retrieval by the {@link #getMessage()} method. 11 | */ 12 | public ResourceNotFoundException(String message) { 13 | super(message); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /batch-2/spring-boot-class-practice/src/main/java/com/example/init/InitializeData.java: -------------------------------------------------------------------------------- 1 | package com.example.init; 2 | 3 | import com.example.entity.Employee; 4 | import com.example.repository.EmployeeRepository; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.boot.CommandLineRunner; 7 | import org.springframework.stereotype.Component; 8 | 9 | import java.util.ArrayList; 10 | import java.util.List; 11 | 12 | @Component 13 | public class InitializeData implements CommandLineRunner { 14 | 15 | @Autowired 16 | EmployeeRepository repository; 17 | 18 | @Override 19 | public void run(String... args) throws Exception { 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /batch-2/spring-boot-class-practice/src/main/java/com/example/repository/DesignationRepository.java: -------------------------------------------------------------------------------- 1 | package com.example.repository; 2 | 3 | import com.example.entity.Designation; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | public interface DesignationRepository extends JpaRepository { 7 | } 8 | -------------------------------------------------------------------------------- /batch-2/spring-boot-class-practice/src/main/resources/application-mainul.properties: -------------------------------------------------------------------------------- 1 | spring.datasource.driver-class-name=org.postgresql.Driver 2 | spring.datasource.url=jdbc:postgresql://localhost:5432/pondit 3 | spring.datasource.username=postgres 4 | spring.datasource.password=secret 5 | spring.jpa.show-sql=true 6 | spring.jpa.hibernate.ddl-auto=update 7 | spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect 8 | -------------------------------------------------------------------------------- /batch-2/spring-boot-class-practice/src/main/resources/application-mysql.properties: -------------------------------------------------------------------------------- 1 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver 2 | spring.datasource.url=jdbc:mysql://localhost:3306/pondit?allowPublicKeyRetrieval=true&useSSL=false 3 | spring.datasource.username=root 4 | spring.datasource.password=1234 5 | spring.jpa.show-sql=true 6 | spring.jpa.hibernate.ddl-auto=update 7 | spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect 8 | -------------------------------------------------------------------------------- /batch-2/spring-boot-class-practice/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.profiles.active=mainul 2 | server.port=8090 3 | -------------------------------------------------------------------------------- /batch-2/spring-boot-class-practice/src/main/resources/templates/errors/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Not Found 6 | 7 | 8 |

404

9 |

10 | 11 | 12 | -------------------------------------------------------------------------------- /batch-2/spring-boot-class-practice/src/test/java/com/example/mainulbhai/MainulbhaiApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.example.mainulbhai; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class MainulbhaiApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /class-7/class-7-with-hibernate-criteria-api/src/main/java/com/spring5/practice/RootConfig.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice; 2 | 3 | import com.spring5.practice.config.HibernateConfig; 4 | import com.spring5.practice.exceptions.handler.GlobalExceptionHandler; 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.context.annotation.ComponentScan; 7 | 8 | @ComponentScan(basePackages = {"com.spring5.practice.service"}) 9 | public class RootConfig { 10 | // @Bean 11 | public GlobalExceptionHandler globalExceptionHandler() { 12 | return new GlobalExceptionHandler(); 13 | } 14 | 15 | @Bean 16 | public HibernateConfig hibernateConfig() { 17 | return new HibernateConfig(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /class-7/class-7-with-hibernate-criteria-api/src/main/java/com/spring5/practice/controllers/RootController.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.controllers; 2 | 3 | import com.spring5.practice.exceptions.ResourceNotFoundException; 4 | import org.springframework.stereotype.Controller; 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | 7 | // For showing index.jsp instead of showing the "not found page" error 8 | @Controller 9 | public class RootController { 10 | @GetMapping("/") 11 | public String root() { 12 | throw new ResourceNotFoundException("Requested resource was not found"); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /class-7/class-7-with-hibernate-criteria-api/src/main/java/com/spring5/practice/exceptions/ResourceAlreadyExistsException.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.exceptions; 2 | 3 | public class ResourceAlreadyExistsException extends RuntimeException { 4 | public ResourceAlreadyExistsException() { 5 | super(); 6 | // TODO Auto-generated constructor stub 7 | } 8 | 9 | public ResourceAlreadyExistsException(String message, Throwable cause) { 10 | super(message, cause); 11 | // TODO Auto-generated constructor stub 12 | } 13 | 14 | public ResourceAlreadyExistsException(String message) { 15 | super(message); 16 | // TODO Auto-generated constructor stub 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /class-7/class-7-with-hibernate-criteria-api/src/main/java/com/spring5/practice/exceptions/ResourceNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.exceptions; 2 | 3 | public class ResourceNotFoundException extends RuntimeException { 4 | public ResourceNotFoundException() { 5 | super(); 6 | // TODO Auto-generated constructor stub 7 | } 8 | 9 | public ResourceNotFoundException(String message, Throwable cause) { 10 | super(message, cause); 11 | // TODO Auto-generated constructor stub 12 | } 13 | 14 | public ResourceNotFoundException(String message) { 15 | super(message); 16 | // TODO Auto-generated constructor stub 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /class-7/class-7-with-hibernate-criteria-api/src/main/java/com/spring5/practice/exceptions/model/ItemValidationError.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.exceptions.model; 2 | 3 | import lombok.*; 4 | 5 | @Data 6 | @EqualsAndHashCode 7 | @AllArgsConstructor 8 | @NoArgsConstructor 9 | @ToString 10 | public class ItemValidationError { 11 | private String itemName; 12 | private String field; 13 | private Object rejectedValue; 14 | private String message; 15 | } 16 | -------------------------------------------------------------------------------- /class-7/class-7-with-hibernate-criteria-api/src/main/resources/hibernate.properties: -------------------------------------------------------------------------------- 1 | hibernate.hbm2ddl.auto=update 2 | hibernate.dialect=org.hibernate.dialect.MySQL8Dialect 3 | hibernate.show_sql=true 4 | hibernate.current_session_context_class=thread 5 | hibernate.connection.url=jdbc:mysql://localhost:3306/student_course_module_2?createDatabaseIfNotExist=true&serverTimezone=UTC 6 | hibernate.connection.driver_class=com.mysql.cj.jdbc.Driver 7 | hibernate.connection.username=mainul35 8 | hibernate.connection.password= 9 | hibernate.connection.autocommit=true 10 | -------------------------------------------------------------------------------- /class-7/class-7-with-hibernate-criteria-api/src/main/webapp/WEB-INF/resources/images/course_cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/class-7/class-7-with-hibernate-criteria-api/src/main/webapp/WEB-INF/resources/images/course_cover.jpg -------------------------------------------------------------------------------- /class-7/class-7-with-hibernate-criteria-api/src/main/webapp/WEB-INF/views/common/footer.jsp: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /class-7/class-7-with-hibernate-criteria-api/src/main/webapp/WEB-INF/views/common/header.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 | Spring By Practical Examples 4 | 6 | 7 | -------------------------------------------------------------------------------- /class-7/class-7-with-hibernate-criteria-api/src/main/webapp/WEB-INF/views/error.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1" 2 | pageEncoding="ISO-8859-1"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 |

${message}

11 | 12 | -------------------------------------------------------------------------------- /class-7/class-7-with-spring-jdbc-template/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Datasource local storage ignored files 5 | /dataSources/ 6 | /dataSources.local.xml 7 | # Editor-based HTTP Client requests 8 | /httpRequests/ 9 | -------------------------------------------------------------------------------- /class-7/class-7-with-spring-jdbc-template/.idea/.name: -------------------------------------------------------------------------------- 1 | integrating-spring-jdbc -------------------------------------------------------------------------------- /class-7/class-7-with-spring-jdbc-template/.idea/artifacts/integrating_spring_jdbc_war.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | $PROJECT_DIR$/target 4 | 5 | 6 | integrating-spring-jdbc 7 | war 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /class-7/class-7-with-spring-jdbc-template/.idea/libraries/Maven__com_google_protobuf_protobuf_java_3_6_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /class-7/class-7-with-spring-jdbc-template/.idea/libraries/Maven__javax_servlet_javax_servlet_api_4_0_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /class-7/class-7-with-spring-jdbc-template/.idea/libraries/Maven__javax_servlet_jstl_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /class-7/class-7-with-spring-jdbc-template/.idea/libraries/Maven__mysql_mysql_connector_java_8_0_18.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /class-7/class-7-with-spring-jdbc-template/.idea/libraries/Maven__org_springframework_spring_tx_5_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /class-7/class-7-with-spring-jdbc-template/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /class-7/class-7-with-spring-jdbc-template/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /class-7/class-7-with-spring-jdbc-template/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /class-7/class-7-with-spring-jdbc-template/src/main/java/com/spring5/practice/RootConfig.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.ComponentScan; 5 | 6 | @ComponentScan(basePackages = { "com.spring5.practice.service", "com.spring5.practice.config" }) 7 | //@ComponentScan(basePackageClasses = {StudentService.class}) 8 | public class RootConfig { 9 | @Bean 10 | GlobalExceptionHandler globalExceptionHandler() { 11 | return new GlobalExceptionHandler(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /class-7/class-7-with-spring-jdbc-template/src/main/java/com/spring5/practice/controllers/RootController.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.controllers; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.GetMapping; 5 | 6 | // For showing index.jsp instead of showing the "not found page" error 7 | @Controller 8 | public class RootController { 9 | @GetMapping("/") 10 | public String root() { 11 | return "index"; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /class-7/class-7-with-spring-jdbc-template/src/main/java/com/spring5/practice/exceptions/ResourceAlreadyExistsException.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.exceptions; 2 | 3 | public class ResourceAlreadyExistsException extends RuntimeException { 4 | public ResourceAlreadyExistsException() { 5 | super(); 6 | // TODO Auto-generated constructor stub 7 | } 8 | 9 | public ResourceAlreadyExistsException(String message, Throwable cause) { 10 | super(message, cause); 11 | // TODO Auto-generated constructor stub 12 | } 13 | 14 | public ResourceAlreadyExistsException(String message) { 15 | super(message); 16 | // TODO Auto-generated constructor stub 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /class-7/class-7-with-spring-jdbc-template/src/main/java/com/spring5/practice/exceptions/ResourceNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.exceptions; 2 | 3 | public class ResourceNotFoundException extends RuntimeException { 4 | public ResourceNotFoundException() { 5 | super(); 6 | // TODO Auto-generated constructor stub 7 | } 8 | 9 | public ResourceNotFoundException(String message, Throwable cause) { 10 | super(message, cause); 11 | // TODO Auto-generated constructor stub 12 | } 13 | 14 | public ResourceNotFoundException(String message) { 15 | super(message); 16 | // TODO Auto-generated constructor stub 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /class-7/class-7-with-spring-jdbc-template/src/main/resources/application.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/class-7/class-7-with-spring-jdbc-template/src/main/resources/application.properties -------------------------------------------------------------------------------- /class-7/class-7-with-spring-jdbc-template/src/main/webapp/WEB-INF/resources/images/course_cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/class-7/class-7-with-spring-jdbc-template/src/main/webapp/WEB-INF/resources/images/course_cover.jpg -------------------------------------------------------------------------------- /class-7/class-7-with-spring-jdbc-template/src/main/webapp/WEB-INF/views/common/footer.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /class-7/class-7-with-spring-jdbc-template/src/main/webapp/WEB-INF/views/common/header.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1" 2 | pageEncoding="ISO-8859-1"%> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | <%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%> 5 | 6 | 7 | 8 | 9 | Spring By Practical Examples 10 | 12 | 13 | -------------------------------------------------------------------------------- /class-7/class-7-with-spring-jdbc-template/src/main/webapp/WEB-INF/views/error.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1" 2 | pageEncoding="ISO-8859-1"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 |

${message}

11 | 12 | -------------------------------------------------------------------------------- /class-9-one-to-many-relationship/src/main/java/com/spring5/practice/RootConfig.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice; 2 | 3 | import com.spring5.practice.config.HibernateConfig; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.ComponentScan; 6 | 7 | @ComponentScan(basePackages = {"com.spring5.practice.service"}) 8 | //@ComponentScan(basePackageClasses = {StudentService.class}) 9 | public class RootConfig { 10 | @Bean 11 | GlobalExceptionHandler globalExceptionHandler() { 12 | return new GlobalExceptionHandler(); 13 | } 14 | 15 | @Bean 16 | HibernateConfig hibernateConfig() { 17 | return new HibernateConfig(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /class-9-one-to-many-relationship/src/main/java/com/spring5/practice/controllers/RootController.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.controllers; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.GetMapping; 5 | 6 | // For showing index.jsp instead of showing the "not found page" error 7 | @Controller 8 | public class RootController { 9 | @GetMapping("/") 10 | public String root() { 11 | return "index"; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /class-9-one-to-many-relationship/src/main/java/com/spring5/practice/exceptions/ResourceAlreadyExistsException.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.exceptions; 2 | 3 | public class ResourceAlreadyExistsException extends RuntimeException { 4 | public ResourceAlreadyExistsException() { 5 | super(); 6 | // TODO Auto-generated constructor stub 7 | } 8 | 9 | public ResourceAlreadyExistsException(String message, Throwable cause) { 10 | super(message, cause); 11 | // TODO Auto-generated constructor stub 12 | } 13 | 14 | public ResourceAlreadyExistsException(String message) { 15 | super(message); 16 | // TODO Auto-generated constructor stub 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /class-9-one-to-many-relationship/src/main/java/com/spring5/practice/exceptions/ResourceNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.exceptions; 2 | 3 | public class ResourceNotFoundException extends RuntimeException { 4 | public ResourceNotFoundException() { 5 | super(); 6 | // TODO Auto-generated constructor stub 7 | } 8 | 9 | public ResourceNotFoundException(String message, Throwable cause) { 10 | super(message, cause); 11 | // TODO Auto-generated constructor stub 12 | } 13 | 14 | public ResourceNotFoundException(String message) { 15 | super(message); 16 | // TODO Auto-generated constructor stub 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /class-9-one-to-many-relationship/src/main/resources/hibernate.properties: -------------------------------------------------------------------------------- 1 | hibernate.hbm2ddl.auto=update 2 | hibernate.dialect=org.hibernate.dialect.MySQL5Dialect 3 | hibernate.show_sql=true 4 | hibernate.current_session_context_class=thread 5 | hibernate.connection.url=jdbc:mysql://localhost:3306/student_course_module?createDatabaseIfNotExist=true 6 | hibernate.connection.driver_class=com.mysql.cj.jdbc.Driver 7 | hibernate.connection.username=root 8 | hibernate.connection.password= 9 | hibernate.connection.autocommit=true 10 | -------------------------------------------------------------------------------- /class-9-one-to-many-relationship/src/main/webapp/WEB-INF/resources/images/course_cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/class-9-one-to-many-relationship/src/main/webapp/WEB-INF/resources/images/course_cover.jpg -------------------------------------------------------------------------------- /class-9-one-to-many-relationship/src/main/webapp/WEB-INF/views/common/footer.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /class-9-one-to-many-relationship/src/main/webapp/WEB-INF/views/common/header.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1" 2 | pageEncoding="ISO-8859-1"%> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | <%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%> 5 | 6 | 7 | 8 | 9 | Spring By Practical Examples 10 | 12 | 13 | -------------------------------------------------------------------------------- /class-9-one-to-many-relationship/src/main/webapp/WEB-INF/views/error.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1" 2 | pageEncoding="ISO-8859-1"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 |

${message}

11 | 12 | -------------------------------------------------------------------------------- /configuring-access-denied-page/src/main/java/com/spring5/practice/config/security/SpringSecurityInitializer.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.config.security; 2 | 3 | import org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer; 4 | 5 | public class SpringSecurityInitializer extends AbstractSecurityWebApplicationInitializer{ 6 | 7 | } 8 | -------------------------------------------------------------------------------- /configuring-access-denied-page/src/main/java/com/spring5/practice/enums/Role.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.enums; 2 | 3 | public enum Role { 4 | ROLE_USER, ROLE_ADMIN 5 | } 6 | -------------------------------------------------------------------------------- /configuring-access-denied-page/src/main/java/com/spring5/practice/exceptions/ResourceAlreadyExistsException.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.exceptions; 2 | 3 | public class ResourceAlreadyExistsException extends RuntimeException { 4 | public ResourceAlreadyExistsException() { 5 | super(); 6 | // TODO Auto-generated constructor stub 7 | } 8 | 9 | public ResourceAlreadyExistsException(String message, Throwable cause) { 10 | super(message, cause); 11 | // TODO Auto-generated constructor stub 12 | } 13 | 14 | public ResourceAlreadyExistsException(String message) { 15 | super(message); 16 | // TODO Auto-generated constructor stub 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /configuring-access-denied-page/src/main/java/com/spring5/practice/exceptions/ResourceNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.exceptions; 2 | 3 | public class ResourceNotFoundException extends RuntimeException { 4 | public ResourceNotFoundException() { 5 | super(); 6 | // TODO Auto-generated constructor stub 7 | } 8 | 9 | public ResourceNotFoundException(String message, Throwable cause) { 10 | super(message, cause); 11 | // TODO Auto-generated constructor stub 12 | } 13 | 14 | public ResourceNotFoundException(String message) { 15 | super(message); 16 | // TODO Auto-generated constructor stub 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /configuring-access-denied-page/src/main/java/com/spring5/practice/repositories/CourseRepository.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.repositories; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | import com.spring5.practice.model.Course; 8 | import org.springframework.stereotype.Repository; 9 | import org.springframework.transaction.annotation.Transactional; 10 | 11 | @Repository 12 | @Transactional 13 | public interface CourseRepository extends JpaRepository{ 14 | 15 | Course findByCourseId(Long id); 16 | 17 | Course findByCourseCode(String courseCode); 18 | 19 | // List findByCountry_CountryCode(String countryCode); 20 | } 21 | -------------------------------------------------------------------------------- /configuring-access-denied-page/src/main/java/com/spring5/practice/repositories/UserRepository.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.repositories; 2 | 3 | import com.spring5.practice.model.User; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.stereotype.Repository; 6 | import org.springframework.transaction.annotation.Transactional; 7 | 8 | import java.util.Optional; 9 | 10 | @Repository 11 | @Transactional 12 | public interface UserRepository extends JpaRepository { 13 | 14 | Optional findByUsername(String username); 15 | } 16 | -------------------------------------------------------------------------------- /configuring-access-denied-page/src/main/resources/hibernate.properties: -------------------------------------------------------------------------------- 1 | hibernate.hbm2ddl.auto=update 2 | hibernate.dialect=org.hibernate.dialect.MySQL5Dialect 3 | hibernate.show_sql=true 4 | #hibernate.current_session_context_class=thread 5 | hibernate.connection.url=jdbc:mysql://localhost:3306/student_course_module_jpa?createDatabaseIfNotExist=true&serverTimezone=UTC 6 | hibernate.connection.driver_class=com.mysql.cj.jdbc.Driver 7 | hibernate.connection.username=root 8 | hibernate.connection.password= 9 | hibernate.connection.autocommit=true 10 | -------------------------------------------------------------------------------- /configuring-access-denied-page/src/main/webapp/WEB-INF/resources/images/course_cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/configuring-access-denied-page/src/main/webapp/WEB-INF/resources/images/course_cover.jpg -------------------------------------------------------------------------------- /configuring-access-denied-page/src/main/webapp/WEB-INF/views/403.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: mainul35 4 | Date: ১২/২/২০ 5 | Time: ১১:৪৬ PM 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 403 12 | 13 | 14 |

Sorry, You don't have sufficient permission to visit this page.

15 | 16 | 17 | -------------------------------------------------------------------------------- /configuring-access-denied-page/src/main/webapp/WEB-INF/views/common/footer.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /configuring-access-denied-page/src/main/webapp/WEB-INF/views/common/header.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1" 2 | pageEncoding="ISO-8859-1" %> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 4 | <%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %> 5 | 6 | 7 | 8 | 9 | Spring By Practical Examples 10 | 12 | 13 | -------------------------------------------------------------------------------- /configuring-access-denied-page/src/main/webapp/WEB-INF/views/course/header.jsp: -------------------------------------------------------------------------------- 1 | Logout -------------------------------------------------------------------------------- /configuring-access-denied-page/src/main/webapp/WEB-INF/views/error.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1" 2 | pageEncoding="ISO-8859-1" %> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 |

${message}

11 | 12 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/artifacts/exposing_json_data_spring_war.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | $PROJECT_DIR$/target 4 | 5 | 6 | exposing-json-data-spring 7 | war 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/libraries/Maven__antlr_antlr_2_7_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/libraries/Maven__com_fasterxml_classmate_1_3_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/libraries/Maven__com_google_code_gson_gson_2_8_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/libraries/Maven__javax_activation_javax_activation_api_1_2_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/libraries/Maven__javax_persistence_javax_persistence_api_2_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/libraries/Maven__javax_servlet_javax_servlet_api_4_0_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/libraries/Maven__javax_servlet_jstl_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/libraries/Maven__javax_xml_bind_jaxb_api_2_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/libraries/Maven__mysql_mysql_connector_java_6_0_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_9_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/libraries/Maven__org_aspectj_aspectjrt_1_9_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/libraries/Maven__org_dom4j_dom4j_2_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/libraries/Maven__org_hibernate_hibernate_core_5_3_11_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/libraries/Maven__org_javassist_javassist_3_23_2_GA.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/libraries/Maven__org_jboss_jandex_2_0_5_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_3_2_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/libraries/Maven__org_reflections_reflections_0_9_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_26.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/libraries/Maven__org_springframework_spring_aop_5_2_2_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/libraries/Maven__org_springframework_spring_core_5_2_2_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/libraries/Maven__org_springframework_spring_jcl_5_2_2_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/libraries/Maven__org_springframework_spring_jdbc_5_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/libraries/Maven__org_springframework_spring_orm_5_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/libraries/Maven__org_springframework_spring_tx_5_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/libraries/Maven__org_springframework_spring_web_5_2_2_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | 10 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /exposing-json-data-spring/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /exposing-json-data-spring/src/main/java/com/spring5/practice/config/security/SpringSecurityInitializer.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.config.security; 2 | 3 | import org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer; 4 | 5 | public class SpringSecurityInitializer extends AbstractSecurityWebApplicationInitializer{ 6 | 7 | } 8 | -------------------------------------------------------------------------------- /exposing-json-data-spring/src/main/java/com/spring5/practice/enums/Role.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.enums; 2 | 3 | public enum Role { 4 | ROLE_USER, ROLE_ADMIN 5 | } 6 | -------------------------------------------------------------------------------- /exposing-json-data-spring/src/main/java/com/spring5/practice/exceptions/ResourceAlreadyExistsException.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.exceptions; 2 | 3 | public class ResourceAlreadyExistsException extends RuntimeException { 4 | public ResourceAlreadyExistsException() { 5 | super(); 6 | // TODO Auto-generated constructor stub 7 | } 8 | 9 | public ResourceAlreadyExistsException(String message, Throwable cause) { 10 | super(message, cause); 11 | // TODO Auto-generated constructor stub 12 | } 13 | 14 | public ResourceAlreadyExistsException(String message) { 15 | super(message); 16 | // TODO Auto-generated constructor stub 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /exposing-json-data-spring/src/main/java/com/spring5/practice/exceptions/ResourceNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.exceptions; 2 | 3 | public class ResourceNotFoundException extends RuntimeException { 4 | public ResourceNotFoundException() { 5 | super(); 6 | // TODO Auto-generated constructor stub 7 | } 8 | 9 | public ResourceNotFoundException(String message, Throwable cause) { 10 | super(message, cause); 11 | // TODO Auto-generated constructor stub 12 | } 13 | 14 | public ResourceNotFoundException(String message) { 15 | super(message); 16 | // TODO Auto-generated constructor stub 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /exposing-json-data-spring/src/main/java/com/spring5/practice/repositories/UserRepository.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.repositories; 2 | 3 | import com.spring5.practice.model.User; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.stereotype.Repository; 6 | import org.springframework.transaction.annotation.Transactional; 7 | 8 | import java.util.Optional; 9 | 10 | @Repository 11 | @Transactional 12 | public interface UserRepository extends JpaRepository { 13 | 14 | Optional findByUsername(String username); 15 | } 16 | -------------------------------------------------------------------------------- /exposing-json-data-spring/src/main/resources/hibernate.properties: -------------------------------------------------------------------------------- 1 | hibernate.hbm2ddl.auto=update 2 | hibernate.dialect=org.hibernate.dialect.MySQL5Dialect 3 | hibernate.show_sql=true 4 | #hibernate.current_session_context_class=thread 5 | hibernate.connection.url=jdbc:mysql://localhost:3306/student_course_module_jpa?createDatabaseIfNotExist=true&serverTimezone=UTC 6 | hibernate.connection.driver_class=com.mysql.cj.jdbc.Driver 7 | hibernate.connection.username=root 8 | hibernate.connection.password= 9 | hibernate.connection.autocommit=true 10 | -------------------------------------------------------------------------------- /exposing-json-data-spring/src/main/webapp/WEB-INF/resources/images/course_cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/exposing-json-data-spring/src/main/webapp/WEB-INF/resources/images/course_cover.jpg -------------------------------------------------------------------------------- /exposing-json-data-spring/src/main/webapp/WEB-INF/views/403.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: mainul35 4 | Date: ১২/২/২০ 5 | Time: ১১:৪৬ PM 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 403 12 | 13 | 14 |

Sorry, You don't have sufficint permission to visit this page.

15 | 16 | 17 | -------------------------------------------------------------------------------- /exposing-json-data-spring/src/main/webapp/WEB-INF/views/common/footer.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /exposing-json-data-spring/src/main/webapp/WEB-INF/views/common/header.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1" 2 | pageEncoding="ISO-8859-1" %> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 4 | <%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %> 5 | 6 | 7 | 8 | 9 | Spring By Practical Examples 10 | 12 | 13 | -------------------------------------------------------------------------------- /exposing-json-data-spring/src/main/webapp/WEB-INF/views/course/header.jsp: -------------------------------------------------------------------------------- 1 | Logout -------------------------------------------------------------------------------- /exposing-json-data-spring/src/main/webapp/WEB-INF/views/error.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1" 2 | pageEncoding="ISO-8859-1" %> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 |

${message}

11 | 12 | -------------------------------------------------------------------------------- /hello-world-springboot/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /hello-world-springboot/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/hello-world-springboot/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /hello-world-springboot/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 3 | -------------------------------------------------------------------------------- /hello-world-springboot/src/main/java/com/springboot/practice/HelloWorldApplication.java: -------------------------------------------------------------------------------- 1 | package com.springboot.practice; 2 | 3 | import com.springboot.practice.init.InitializeData; 4 | import org.springframework.boot.CommandLineRunner; 5 | import org.springframework.boot.SpringApplication; 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; 7 | 8 | @SpringBootApplication 9 | public class HelloWorldApplication { 10 | 11 | public static void main(String[] args) throws Exception { 12 | SpringApplication.run(new Class[]{HelloWorldApplication.class}, args); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /hello-world-springboot/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.profiles.active=dev 2 | -------------------------------------------------------------------------------- /hello-world-springboot/src/test/java/com/springboot/practice/HelloWorldApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.springboot.practice; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class HelloWorldApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /portfolio-template.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/portfolio-template.zip -------------------------------------------------------------------------------- /spring-aop/spring-aop-java/src/main/java/com/mainul35/Audit.java: -------------------------------------------------------------------------------- 1 | package com.mainul35; 2 | 3 | import java.lang.annotation.*; 4 | 5 | @Documented 6 | @Retention(RetentionPolicy.RUNTIME) 7 | @Target({ ElementType.METHOD, ElementType.TYPE }) 8 | public @interface Audit { 9 | public String role(); 10 | } 11 | -------------------------------------------------------------------------------- /spring-aop/spring-aop-java/src/main/java/com/mainul35/RootConfig.java: -------------------------------------------------------------------------------- 1 | package com.mainul35; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.ComponentScan; 5 | import org.springframework.context.annotation.Configuration; 6 | import org.springframework.context.annotation.EnableAspectJAutoProxy; 7 | 8 | @ComponentScan(basePackages = "com.mainul35.service") 9 | @EnableAspectJAutoProxy 10 | @Configuration 11 | public class RootConfig { 12 | 13 | @Bean 14 | public EmployeeCRUDAspect loggingAspect() { 15 | return new EmployeeCRUDAspect(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /spring-aop/spring-aop-java/src/main/java/com/mainul35/TestAOP.java: -------------------------------------------------------------------------------- 1 | /* 2 | package com.mainul35; 3 | 4 | import org.springframework.context.ApplicationContext; 5 | import org.springframework.context.support.ClassPathXmlApplicationContext; 6 | 7 | public class TestAOP 8 | { 9 | @SuppressWarnings("resource") 10 | public static void main(String[] args) { 11 | 12 | ApplicationContext context = new ClassPathXmlApplicationContext("classpath:/applicationContext.xml"); 13 | EmployeeManager manager = context.getBean(EmployeeManager.class); 14 | 15 | manager.getEmployeeById(1); 16 | manager.createEmployee(new EmployeeDTO()); 17 | } 18 | }*/ 19 | -------------------------------------------------------------------------------- /spring-aop/spring-aop-xml/src/main/java/com/mainul35/TestAOP.java: -------------------------------------------------------------------------------- 1 | package com.mainul35; 2 | 3 | import org.springframework.context.ApplicationContext; 4 | import org.springframework.context.support.ClassPathXmlApplicationContext; 5 | 6 | public class TestAOP 7 | { 8 | @SuppressWarnings("resource") 9 | public static void main(String[] args) { 10 | 11 | ApplicationContext context = new ClassPathXmlApplicationContext("classpath:/applicationContext.xml"); 12 | EmployeeManager manager = context.getBean(EmployeeManager.class); 13 | 14 | manager.getEmployeeById(1); 15 | manager.createEmployee(new EmployeeDTO()); 16 | } 17 | } -------------------------------------------------------------------------------- /spring-boot-demo/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-demo/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/spring-boot-demo/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-demo/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 3 | -------------------------------------------------------------------------------- /spring-boot-demo/src/main/java/com/springboot/demo/DemoApplication.java: -------------------------------------------------------------------------------- 1 | package com.springboot.demo; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; 6 | 7 | @SpringBootApplication 8 | public class DemoApplication extends SpringBootServletInitializer { 9 | 10 | public static void main(String[] args) { 11 | SpringApplication.run(DemoApplication.class, args); 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /spring-boot-demo/src/main/java/com/springboot/demo/config/MvcCacheControlConfig.java: -------------------------------------------------------------------------------- 1 | package com.springboot.demo.config; 2 | 3 | import org.springframework.context.annotation.Configuration; 4 | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; 5 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 6 | 7 | @Configuration 8 | public class MvcCacheControlConfig implements WebMvcConfigurer { 9 | @Override 10 | public void addResourceHandlers(ResourceHandlerRegistry registry) { 11 | registry.addResourceHandler("/**").addResourceLocations("classpath:/static/"); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-demo/src/main/java/com/springboot/demo/controller/RootController.java: -------------------------------------------------------------------------------- 1 | package com.springboot.demo.controller; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.ui.Model; 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | 7 | @Controller 8 | public class RootController { 9 | 10 | @GetMapping("/") 11 | public String root(Model model) { 12 | model.addAttribute("msg", "Spring Boot"); 13 | model.addAttribute("msg2", "Spring Boot is easy"); 14 | return "index"; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-demo/src/main/resources/application-dev.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/spring-boot-demo/src/main/resources/application-dev.properties -------------------------------------------------------------------------------- /spring-boot-demo/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.thymeleaf.mode=HTML 2 | spring.thymeleaf.prefix=classpath:/templates/ 3 | spring.thymeleaf.suffix=.html 4 | spring.thymeleaf.enabled=true 5 | spring.thymeleaf.encoding=UTF-8 6 | server.servlet.context-path=/ 7 | spring.thymeleaf.cache=false 8 | 9 | spring.profiles.active=dev -------------------------------------------------------------------------------- /spring-boot-demo/src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 9 | 10 | 11 |

12 |

13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /spring-boot-demo/src/test/java/com/springboot/demo/DemoApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.springboot.demo; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class DemoApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-data-jpa-demo/src/main/java/com/spring5/practice/RootConfig.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.ComponentScan; 5 | 6 | @ComponentScan(basePackages = { 7 | "com.spring5.practice.service", 8 | "com.spring5.practice.config.persistence", 9 | }) 10 | //@ComponentScan(basePackageClasses = {StudentService.class}) 11 | public class RootConfig { 12 | @Bean 13 | GlobalExceptionHandler globalExceptionHandler() { 14 | return new GlobalExceptionHandler(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /spring-data-jpa-demo/src/main/java/com/spring5/practice/controllers/RootController.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.controllers; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.ui.Model; 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | import org.springframework.web.bind.annotation.PostMapping; 7 | import org.springframework.web.bind.annotation.RequestParam; 8 | 9 | // For showing index.jsp instead of showing the "not found page" error 10 | @Controller 11 | public class RootController { 12 | @GetMapping("/") 13 | public String root() { 14 | return "index"; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /spring-data-jpa-demo/src/main/java/com/spring5/practice/exceptions/ResourceAlreadyExistsException.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.exceptions; 2 | 3 | public class ResourceAlreadyExistsException extends RuntimeException { 4 | public ResourceAlreadyExistsException() { 5 | super(); 6 | // TODO Auto-generated constructor stub 7 | } 8 | 9 | public ResourceAlreadyExistsException(String message, Throwable cause) { 10 | super(message, cause); 11 | // TODO Auto-generated constructor stub 12 | } 13 | 14 | public ResourceAlreadyExistsException(String message) { 15 | super(message); 16 | // TODO Auto-generated constructor stub 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /spring-data-jpa-demo/src/main/java/com/spring5/practice/exceptions/ResourceNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.exceptions; 2 | 3 | public class ResourceNotFoundException extends RuntimeException { 4 | public ResourceNotFoundException() { 5 | super(); 6 | // TODO Auto-generated constructor stub 7 | } 8 | 9 | public ResourceNotFoundException(String message, Throwable cause) { 10 | super(message, cause); 11 | // TODO Auto-generated constructor stub 12 | } 13 | 14 | public ResourceNotFoundException(String message) { 15 | super(message); 16 | // TODO Auto-generated constructor stub 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /spring-data-jpa-demo/src/main/java/com/spring5/practice/repositories/CourseRepository.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.repositories; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | import com.spring5.practice.model.Course; 8 | import org.springframework.stereotype.Repository; 9 | import org.springframework.transaction.annotation.Transactional; 10 | 11 | @Repository 12 | @Transactional 13 | public interface CourseRepository extends JpaRepository{ 14 | 15 | Course findByCourseId(Long id); 16 | 17 | Course findByCourseCode(String courseCode); 18 | 19 | // List findByCountry_CountryCode(String countryCode); 20 | } 21 | -------------------------------------------------------------------------------- /spring-data-jpa-demo/src/main/resources/hibernate.properties: -------------------------------------------------------------------------------- 1 | hibernate.hbm2ddl.auto=update 2 | hibernate.dialect=org.hibernate.dialect.MySQL5Dialect 3 | hibernate.show_sql=true 4 | #hibernate.current_session_context_class=thread 5 | hibernate.connection.url=jdbc:mysql://localhost:3306/student_course_module_jpa?createDatabaseIfNotExist=true&serverTimezone=UTC 6 | hibernate.connection.driver_class=com.mysql.cj.jdbc.Driver 7 | hibernate.connection.username=mainul35 8 | hibernate.connection.password= 9 | hibernate.connection.autocommit=true 10 | -------------------------------------------------------------------------------- /spring-data-jpa-demo/src/main/webapp/WEB-INF/resources/images/course_cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/spring-data-jpa-demo/src/main/webapp/WEB-INF/resources/images/course_cover.jpg -------------------------------------------------------------------------------- /spring-data-jpa-demo/src/main/webapp/WEB-INF/views/common/footer.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /spring-data-jpa-demo/src/main/webapp/WEB-INF/views/common/header.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1" 2 | pageEncoding="ISO-8859-1"%> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | <%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%> 5 | 6 | 7 | 8 | 9 | Spring By Practical Examples 10 | 12 | 13 | -------------------------------------------------------------------------------- /spring-data-jpa-demo/src/main/webapp/WEB-INF/views/error.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1" 2 | pageEncoding="ISO-8859-1"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 |

${message}

11 | 12 | -------------------------------------------------------------------------------- /spring-profiles-example/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | *.iml 3 | target 4 | -------------------------------------------------------------------------------- /spring-profiles-example/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /spring-profiles-example/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /spring-profiles-example/.idea/spring-profiles-example.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /spring-profiles-example/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | *.iml 3 | target -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__antlr_antlr_2_7_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__com_fasterxml_classmate_1_5_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__com_google_android_annotations_4_1_1_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__com_google_api_api_common_1_8_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__com_google_api_gax_1_49_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__com_google_api_gax_grpc_1_49_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__com_google_api_gax_httpjson_0_65_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__com_google_code_findbugs_jsr305_3_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__com_google_code_gson_gson_2_8_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__com_google_firebase_firebase_admin_6_12_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__com_google_guava_guava_26_0_android.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__com_google_protobuf_protobuf_java_3_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__com_sun_xml_fastinfoset_FastInfoset_1_2_16.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__com_zaxxer_HikariCP_3_4_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__commons_codec_commons_codec_1_13.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__io_grpc_grpc_alts_1_23_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__io_grpc_grpc_api_1_23_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__io_grpc_grpc_auth_1_23_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__io_grpc_grpc_context_1_19_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__io_grpc_grpc_core_1_23_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__io_grpc_grpc_grpclb_1_23_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__io_grpc_grpc_netty_shaded_1_23_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__io_grpc_grpc_protobuf_1_23_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__io_grpc_grpc_protobuf_lite_1_23_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__io_grpc_grpc_stub_1_23_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__io_netty_netty_buffer_4_1_45_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__io_netty_netty_codec_4_1_45_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__io_netty_netty_common_4_1_45_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__io_netty_netty_handler_4_1_45_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__io_netty_netty_resolver_4_1_45_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__io_opencensus_opencensus_api_0_21_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__io_perfmark_perfmark_api_0_17_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__mysql_mysql_connector_java_8_0_19.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_10_8.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_4_13.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_12_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_9_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__org_dom4j_dom4j_2_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__org_glassfish_jaxb_jaxb_runtime_2_3_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__org_glassfish_jaxb_txw2_2_3_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__org_javassist_javassist_3_24_0_GA.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__org_jboss_jandex_2_1_1_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__org_jvnet_staxex_stax_ex_1_8_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__org_postgresql_postgresql_42_2_11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__org_projectlombok_lombok_1_18_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_30.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_30.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__org_threeten_threetenbp_1_3_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/libraries/Maven__org_yaml_snakeyaml_1_25.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/src/main/java/com/mainul35/Main.java: -------------------------------------------------------------------------------- 1 | package com.mainul35; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class Main extends SpringApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(Main.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/src/main/java/com/mainul35/RootRestController.java: -------------------------------------------------------------------------------- 1 | package com.mainul35; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | @RestController 7 | public class RootRestController { 8 | 9 | @GetMapping("/") 10 | public String test() { 11 | return "Test passed"; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/src/main/resources/application-dev.properties: -------------------------------------------------------------------------------- 1 | # Datasource configuration properties 2 | spring.datasource.url=jdbc:mysql://localhost:3306/student_course_module?createDatabaseIfNotExist=true&serverTimezone=UTC 3 | spring.datasource.username=root 4 | spring.datasource.password=!23456Tt 5 | spring.database.driverClassName=com.mysql.cj.jdbc.Driver 6 | # Spring Data JPA configuration properties 7 | spring.jpa.database-platform=org.hibernate.dialect.MySQL8Dialect 8 | spring.jpa.show-sql=true 9 | spring.jpa.generate-ddl=true 10 | spring.jpa.hibernate.ddl-auto=update 11 | spring.jpa.properties.hibernate.default_schema=public -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/src/main/resources/application-prod.properties: -------------------------------------------------------------------------------- 1 | # Datasource configuration properties 2 | spring.datasource.platform=postgres 3 | spring.datasource.url=jdbc:postgresql://localhost:5432/student_course_module 4 | spring.datasource.username=postgres 5 | spring.datasource.password=secret 6 | spring.database.driverClassName=org.postgresql.Driver 7 | # Spring Data JPA configuration properties 8 | spring.jpa.database-platform=org.hibernate.dialect.PostgreSQL94Dialect 9 | spring.jpa.show-sql=true 10 | spring.jpa.generate-ddl=true 11 | spring.jpa.hibernate.ddl-auto=update 12 | spring.jpa.properties.hibernate.default_schema=public -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-boot/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.profiles.active=dev -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /workspace.xml 3 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/.idea/libraries/Maven__antlr_antlr_2_7_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/.idea/libraries/Maven__com_fasterxml_classmate_1_3_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/.idea/libraries/Maven__com_google_protobuf_protobuf_java_3_6_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/.idea/libraries/Maven__javax_servlet_jstl_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/.idea/libraries/Maven__javax_xml_bind_jaxb_api_2_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/.idea/libraries/Maven__mysql_mysql_connector_java_8_0_19.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_9_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/.idea/libraries/Maven__org_aspectj_aspectjrt_1_9_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/.idea/libraries/Maven__org_dom4j_dom4j_2_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/.idea/libraries/Maven__org_javassist_javassist_3_23_2_GA.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/.idea/libraries/Maven__org_jboss_jandex_2_0_5_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/.idea/libraries/Maven__org_postgresql_postgresql_42_2_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/.idea/libraries/Maven__org_reflections_reflections_0_9_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_26.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/src/main/java/com/spring5/practice/config/security/SpringSecurityInitializer.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.config.security; 2 | 3 | import org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer; 4 | 5 | public class SpringSecurityInitializer extends AbstractSecurityWebApplicationInitializer{ 6 | 7 | } 8 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/src/main/java/com/spring5/practice/enums/Role.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.enums; 2 | 3 | public enum Role { 4 | ROLE_USER, ROLE_ADMIN 5 | } 6 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/src/main/java/com/spring5/practice/exceptions/ResourceAlreadyExistsException.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.exceptions; 2 | 3 | public class ResourceAlreadyExistsException extends RuntimeException { 4 | public ResourceAlreadyExistsException() { 5 | super(); 6 | // TODO Auto-generated constructor stub 7 | } 8 | 9 | public ResourceAlreadyExistsException(String message, Throwable cause) { 10 | super(message, cause); 11 | // TODO Auto-generated constructor stub 12 | } 13 | 14 | public ResourceAlreadyExistsException(String message) { 15 | super(message); 16 | // TODO Auto-generated constructor stub 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/src/main/java/com/spring5/practice/exceptions/ResourceNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.exceptions; 2 | 3 | public class ResourceNotFoundException extends RuntimeException { 4 | public ResourceNotFoundException() { 5 | super(); 6 | // TODO Auto-generated constructor stub 7 | } 8 | 9 | public ResourceNotFoundException(String message, Throwable cause) { 10 | super(message, cause); 11 | // TODO Auto-generated constructor stub 12 | } 13 | 14 | public ResourceNotFoundException(String message) { 15 | super(message); 16 | // TODO Auto-generated constructor stub 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/src/main/java/com/spring5/practice/repositories/UserRepository.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.repositories; 2 | 3 | import com.spring5.practice.model.User; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.stereotype.Repository; 6 | import org.springframework.transaction.annotation.Transactional; 7 | 8 | import java.util.Optional; 9 | 10 | @Repository 11 | @Transactional 12 | public interface UserRepository extends JpaRepository { 13 | 14 | Optional findByUsername(String username); 15 | } 16 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/src/main/resources/hibernate-dev.properties: -------------------------------------------------------------------------------- 1 | hibernate.hbm2ddl.auto=update 2 | hibernate.dialect=org.hibernate.dialect.MySQL8Dialect 3 | hibernate.show_sql=true 4 | #hibernate.current_session_context_class=thread 5 | hibernate.connection.url=jdbc:mysql://localhost:3306/student_course_module?createDatabaseIfNotExist=true&serverTimezone=UTC 6 | hibernate.connection.driver_class=com.mysql.cj.jdbc.Driver 7 | hibernate.connection.username=root 8 | hibernate.connection.password=!23456Tt 9 | hibernate.connection.autocommit=true 10 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/src/main/resources/hibernate-prod.properties: -------------------------------------------------------------------------------- 1 | hibernate.hbm2ddl.auto=update 2 | hibernate.dialect=org.hibernate.dialect.PostgreSQL94Dialect 3 | hibernate.show_sql=true 4 | #hibernate.current_session_context_class=thread 5 | hibernate.connection.url=jdbc:postgresql://localhost:5432/student_course_module 6 | hibernate.connection.driver_class=org.postgresql.Driver 7 | hibernate.connection.username=postgres 8 | hibernate.connection.password=secret 9 | hibernate.connection.autocommit=true 10 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/src/main/webapp/WEB-INF/resources/images/course_cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/spring-profiles-example/spring-profiles-with-spring-mvc-java-config/src/main/webapp/WEB-INF/resources/images/course_cover.jpg -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/src/main/webapp/WEB-INF/views/403.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: mainul35 4 | Date: ১২/২/২০ 5 | Time: ১১:৪৬ PM 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 403 12 | 13 | 14 |

Sorry, You don't have sufficint permission to visit this page.

15 | 16 | 17 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/src/main/webapp/WEB-INF/views/common/footer.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/src/main/webapp/WEB-INF/views/common/header.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1" 2 | pageEncoding="ISO-8859-1" %> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 4 | <%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %> 5 | 6 | 7 | 8 | 9 | Spring By Practical Examples 10 | 12 | 13 | -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/src/main/webapp/WEB-INF/views/course/header.jsp: -------------------------------------------------------------------------------- 1 | Logout -------------------------------------------------------------------------------- /spring-profiles-example/spring-profiles-with-spring-mvc-java-config/src/main/webapp/WEB-INF/views/error.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1" 2 | pageEncoding="ISO-8859-1" %> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 |

${message}

11 | 12 | -------------------------------------------------------------------------------- /spring-security-custom-auth-success-handler/src/main/java/com/spring5/practice/config/security/SpringSecurityInitializer.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.config.security; 2 | 3 | import org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer; 4 | 5 | public class SpringSecurityInitializer extends AbstractSecurityWebApplicationInitializer{ 6 | 7 | } 8 | -------------------------------------------------------------------------------- /spring-security-custom-auth-success-handler/src/main/java/com/spring5/practice/exceptions/ResourceAlreadyExistsException.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.exceptions; 2 | 3 | public class ResourceAlreadyExistsException extends RuntimeException { 4 | public ResourceAlreadyExistsException() { 5 | super(); 6 | // TODO Auto-generated constructor stub 7 | } 8 | 9 | public ResourceAlreadyExistsException(String message, Throwable cause) { 10 | super(message, cause); 11 | // TODO Auto-generated constructor stub 12 | } 13 | 14 | public ResourceAlreadyExistsException(String message) { 15 | super(message); 16 | // TODO Auto-generated constructor stub 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /spring-security-custom-auth-success-handler/src/main/java/com/spring5/practice/exceptions/ResourceNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.exceptions; 2 | 3 | public class ResourceNotFoundException extends RuntimeException { 4 | public ResourceNotFoundException() { 5 | super(); 6 | // TODO Auto-generated constructor stub 7 | } 8 | 9 | public ResourceNotFoundException(String message, Throwable cause) { 10 | super(message, cause); 11 | // TODO Auto-generated constructor stub 12 | } 13 | 14 | public ResourceNotFoundException(String message) { 15 | super(message); 16 | // TODO Auto-generated constructor stub 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /spring-security-custom-auth-success-handler/src/main/java/com/spring5/practice/repositories/CourseRepository.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.repositories; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | import com.spring5.practice.model.Course; 8 | import org.springframework.stereotype.Repository; 9 | import org.springframework.transaction.annotation.Transactional; 10 | 11 | @Repository 12 | @Transactional 13 | public interface CourseRepository extends JpaRepository{ 14 | 15 | Course findByCourseId(Long id); 16 | 17 | Course findByCourseCode(String courseCode); 18 | 19 | // List findByCountry_CountryCode(String countryCode); 20 | } 21 | -------------------------------------------------------------------------------- /spring-security-custom-auth-success-handler/src/main/resources/hibernate.properties: -------------------------------------------------------------------------------- 1 | hibernate.hbm2ddl.auto=update 2 | hibernate.dialect=org.hibernate.dialect.MySQL5Dialect 3 | hibernate.show_sql=true 4 | #hibernate.current_session_context_class=thread 5 | hibernate.connection.url=jdbc:mysql://localhost:3306/student_course_module_jpa?createDatabaseIfNotExist=true&serverTimezone=UTC 6 | hibernate.connection.driver_class=com.mysql.cj.jdbc.Driver 7 | hibernate.connection.username=root 8 | hibernate.connection.password= 9 | hibernate.connection.autocommit=true 10 | -------------------------------------------------------------------------------- /spring-security-custom-auth-success-handler/src/main/webapp/WEB-INF/resources/images/course_cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/spring-security-custom-auth-success-handler/src/main/webapp/WEB-INF/resources/images/course_cover.jpg -------------------------------------------------------------------------------- /spring-security-custom-auth-success-handler/src/main/webapp/WEB-INF/views/common/footer.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /spring-security-custom-auth-success-handler/src/main/webapp/WEB-INF/views/common/header.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1" 2 | pageEncoding="ISO-8859-1" %> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 4 | <%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %> 5 | 6 | 7 | 8 | 9 | Spring By Practical Examples 10 | 12 | 13 | -------------------------------------------------------------------------------- /spring-security-custom-auth-success-handler/src/main/webapp/WEB-INF/views/course/header.jsp: -------------------------------------------------------------------------------- 1 | Logout -------------------------------------------------------------------------------- /spring-security-custom-auth-success-handler/src/main/webapp/WEB-INF/views/error.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1" 2 | pageEncoding="ISO-8859-1" %> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 |

${message}

11 | 12 | -------------------------------------------------------------------------------- /spring5-hello-world/src/main/java/com/spring5/practice/config/RootConfig.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.config; 2 | 3 | import org.springframework.context.annotation.ComponentScan; 4 | 5 | @ComponentScan(basePackages = {"com.spring5.practice.service"}) 6 | public class RootConfig { } 7 | -------------------------------------------------------------------------------- /spring5-hello-world/src/main/webapp/WEB-INF/views/hello.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Syed Mainul Hasan 4 | Date: 2/11/2020 5 | Time: 6:57 PM 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | Hello world 12 | 13 | 14 |

Hello ${name}

15 | 16 | 17 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /workspace.xml 3 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/.name: -------------------------------------------------------------------------------- 1 | spring5-hello-world -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/artifacts/spring5_hello_world_war.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | $PROJECT_DIR$/target 4 | 5 | 6 | spring5-hello-world 7 | war 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/libraries/Maven__antlr_antlr_2_7_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/libraries/Maven__aopalliance_aopalliance_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/libraries/Maven__com_fasterxml_classmate_1_3_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/libraries/Maven__commons_codec_commons_codec_1_9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/libraries/Maven__javax_activation_javax_activation_api_1_2_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/libraries/Maven__javax_persistence_javax_persistence_api_2_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/libraries/Maven__javax_servlet_javax_servlet_api_4_0_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/libraries/Maven__javax_servlet_jstl_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/libraries/Maven__javax_xml_bind_jaxb_api_2_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_9_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/libraries/Maven__org_aspectj_aspectjrt_1_9_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/libraries/Maven__org_codehaus_jackson_jackson_core_asl_1_9_13.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/libraries/Maven__org_dom4j_dom4j_2_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/libraries/Maven__org_hibernate_hibernate_core_5_3_11_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/libraries/Maven__org_javassist_javassist_3_23_2_GA.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/libraries/Maven__org_jboss_jandex_2_0_5_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_3_2_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/libraries/Maven__org_postgresql_postgresql_42_2_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/libraries/Maven__org_reflections_reflections_0_9_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_26.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/libraries/Maven__org_springframework_spring_aop_5_2_2_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/libraries/Maven__org_springframework_spring_jcl_5_2_2_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/libraries/Maven__org_springframework_spring_orm_5_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/libraries/Maven__org_springframework_spring_tx_5_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/libraries/Maven__org_springframework_spring_web_5_2_2_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/src/main/java/com/spring5/practice/RootConfig.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.ComponentScan; 5 | 6 | @ComponentScan(basePackages = { 7 | "com.spring5.practice.service", 8 | "com.spring5.practice.config.persistence", 9 | }) 10 | //@ComponentScan(basePackageClasses = {StudentService.class}) 11 | public class RootConfig { 12 | @Bean 13 | GlobalExceptionHandler globalExceptionHandler() { 14 | return new GlobalExceptionHandler(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/src/main/java/com/spring5/practice/config/RootConfig.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.config; 2 | 3 | import org.springframework.context.annotation.ComponentScan; 4 | 5 | @ComponentScan(basePackages = {"com.spring5.practice.service"}) 6 | public class RootConfig { } 7 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/src/main/resources/hibernate.properties: -------------------------------------------------------------------------------- 1 | hibernate.hbm2ddl.auto=update 2 | hibernate.dialect=org.hibernate.dialect.PostgreSQL94Dialect 3 | hibernate.show_sql=true 4 | #hibernate.current_session_context_class=thread 5 | hibernate.connection.url=jdbc:mysql://localhost:5432/demonstrating_oauth 6 | hibernate.connection.driver_class=org.postgresql.Driver 7 | hibernate.connection.username=postgres 8 | hibernate.connection.password=secret 9 | hibernate.connection.autocommit=true 10 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/src/main/webapp/WEB-INF/resources/images/course_cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/spring5-oauth2-inmemory/src/main/webapp/WEB-INF/resources/images/course_cover.jpg -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/src/main/webapp/WEB-INF/views/common/footer.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/src/main/webapp/WEB-INF/views/common/header.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1" 2 | pageEncoding="ISO-8859-1"%> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | <%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%> 5 | 6 | 7 | 8 | 9 | Spring By Practical Examples 10 | 12 | 13 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/src/main/webapp/WEB-INF/views/error.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1" 2 | pageEncoding="ISO-8859-1"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 |

${message}

11 | 12 | -------------------------------------------------------------------------------- /spring5-oauth2-inmemory/src/main/webapp/WEB-INF/views/hello.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Syed Mainul Hasan 4 | Date: 2/11/2020 5 | Time: 6:57 PM 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | Hello world 12 | 13 | 14 |

Hello ${name}

15 | 16 | 17 | -------------------------------------------------------------------------------- /spring5-rendering-static-resources/src/main/java/com/spring5/practice/config/RootConfig.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.config; 2 | 3 | import org.springframework.context.annotation.ComponentScan; 4 | 5 | @ComponentScan(basePackages = {"com.spring5.practice.service"}) 6 | public class RootConfig { } 7 | -------------------------------------------------------------------------------- /spring5-rendering-static-resources/src/main/webapp/WEB-INF/resources/images/profile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/spring5-rendering-static-resources/src/main/webapp/WEB-INF/resources/images/profile.jpg -------------------------------------------------------------------------------- /spring5-rendering-static-resources/src/main/webapp/WEB-INF/resources/vendor/fontawesome-free/webfonts/fa-brands-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/spring5-rendering-static-resources/src/main/webapp/WEB-INF/resources/vendor/fontawesome-free/webfonts/fa-brands-400.eot -------------------------------------------------------------------------------- /spring5-rendering-static-resources/src/main/webapp/WEB-INF/resources/vendor/fontawesome-free/webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/spring5-rendering-static-resources/src/main/webapp/WEB-INF/resources/vendor/fontawesome-free/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /spring5-rendering-static-resources/src/main/webapp/WEB-INF/resources/vendor/fontawesome-free/webfonts/fa-brands-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/spring5-rendering-static-resources/src/main/webapp/WEB-INF/resources/vendor/fontawesome-free/webfonts/fa-brands-400.woff -------------------------------------------------------------------------------- /spring5-rendering-static-resources/src/main/webapp/WEB-INF/resources/vendor/fontawesome-free/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/spring5-rendering-static-resources/src/main/webapp/WEB-INF/resources/vendor/fontawesome-free/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /spring5-rendering-static-resources/src/main/webapp/WEB-INF/resources/vendor/fontawesome-free/webfonts/fa-regular-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/spring5-rendering-static-resources/src/main/webapp/WEB-INF/resources/vendor/fontawesome-free/webfonts/fa-regular-400.eot -------------------------------------------------------------------------------- /spring5-rendering-static-resources/src/main/webapp/WEB-INF/resources/vendor/fontawesome-free/webfonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/spring5-rendering-static-resources/src/main/webapp/WEB-INF/resources/vendor/fontawesome-free/webfonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /spring5-rendering-static-resources/src/main/webapp/WEB-INF/resources/vendor/fontawesome-free/webfonts/fa-regular-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/spring5-rendering-static-resources/src/main/webapp/WEB-INF/resources/vendor/fontawesome-free/webfonts/fa-regular-400.woff -------------------------------------------------------------------------------- /spring5-rendering-static-resources/src/main/webapp/WEB-INF/resources/vendor/fontawesome-free/webfonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/spring5-rendering-static-resources/src/main/webapp/WEB-INF/resources/vendor/fontawesome-free/webfonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /spring5-rendering-static-resources/src/main/webapp/WEB-INF/resources/vendor/fontawesome-free/webfonts/fa-solid-900.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/spring5-rendering-static-resources/src/main/webapp/WEB-INF/resources/vendor/fontawesome-free/webfonts/fa-solid-900.eot -------------------------------------------------------------------------------- /spring5-rendering-static-resources/src/main/webapp/WEB-INF/resources/vendor/fontawesome-free/webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/spring5-rendering-static-resources/src/main/webapp/WEB-INF/resources/vendor/fontawesome-free/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /spring5-rendering-static-resources/src/main/webapp/WEB-INF/resources/vendor/fontawesome-free/webfonts/fa-solid-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/spring5-rendering-static-resources/src/main/webapp/WEB-INF/resources/vendor/fontawesome-free/webfonts/fa-solid-900.woff -------------------------------------------------------------------------------- /spring5-rendering-static-resources/src/main/webapp/WEB-INF/resources/vendor/fontawesome-free/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/spring5-rendering-static-resources/src/main/webapp/WEB-INF/resources/vendor/fontawesome-free/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /spring5-rendering-static-resources/src/main/webapp/WEB-INF/views/hello.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Syed Mainul Hasan 4 | Date: 2/11/2020 5 | Time: 6:57 PM 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | Hello world 12 | 13 | 14 |

Hello ${name}

15 | 16 | 17 | -------------------------------------------------------------------------------- /using-firebase-realtime-db-with-spring/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /workspace.xml 3 | -------------------------------------------------------------------------------- /using-firebase-realtime-db-with-spring/.idea/artifacts/using_firebase_realtime_db_with_spring_war.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | $PROJECT_DIR$/target 4 | 5 | 6 | using-firebase-realtime-db-with-spring 7 | war 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /using-firebase-realtime-db-with-spring/.idea/libraries/Maven__javax_servlet_javax_servlet_api_4_0_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /using-firebase-realtime-db-with-spring/.idea/libraries/Maven__javax_servlet_jstl_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /using-firebase-realtime-db-with-spring/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /using-firebase-realtime-db-with-spring/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /using-firebase-realtime-db-with-spring/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /using-firebase-realtime-db-with-spring/src/main/java/com/spring5/practice/config/RootConfig.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.config; 2 | 3 | import org.springframework.context.annotation.ComponentScan; 4 | 5 | @ComponentScan(basePackages = {"com.spring5.practice.service"}) 6 | public class RootConfig { } 7 | -------------------------------------------------------------------------------- /using-firebase-realtime-db-with-spring/src/main/webapp/WEB-INF/views/hello.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Syed Mainul Hasan 4 | Date: 4/10/2020 5 | Time: 6:57 PM 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | Hello world 12 | 13 | 14 |

Hello ${name}

15 | 16 | 17 | -------------------------------------------------------------------------------- /using-spring-security-taglib/src/main/java/com/spring5/practice/config/security/SpringSecurityInitializer.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.config.security; 2 | 3 | import org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer; 4 | 5 | public class SpringSecurityInitializer extends AbstractSecurityWebApplicationInitializer{ 6 | 7 | } 8 | -------------------------------------------------------------------------------- /using-spring-security-taglib/src/main/java/com/spring5/practice/enums/Role.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.enums; 2 | 3 | public enum Role { 4 | ROLE_USER, ROLE_ADMIN 5 | } 6 | -------------------------------------------------------------------------------- /using-spring-security-taglib/src/main/java/com/spring5/practice/exceptions/ResourceAlreadyExistsException.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.exceptions; 2 | 3 | public class ResourceAlreadyExistsException extends RuntimeException { 4 | public ResourceAlreadyExistsException() { 5 | super(); 6 | // TODO Auto-generated constructor stub 7 | } 8 | 9 | public ResourceAlreadyExistsException(String message, Throwable cause) { 10 | super(message, cause); 11 | // TODO Auto-generated constructor stub 12 | } 13 | 14 | public ResourceAlreadyExistsException(String message) { 15 | super(message); 16 | // TODO Auto-generated constructor stub 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /using-spring-security-taglib/src/main/java/com/spring5/practice/exceptions/ResourceNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.exceptions; 2 | 3 | public class ResourceNotFoundException extends RuntimeException { 4 | public ResourceNotFoundException() { 5 | super(); 6 | // TODO Auto-generated constructor stub 7 | } 8 | 9 | public ResourceNotFoundException(String message, Throwable cause) { 10 | super(message, cause); 11 | // TODO Auto-generated constructor stub 12 | } 13 | 14 | public ResourceNotFoundException(String message) { 15 | super(message); 16 | // TODO Auto-generated constructor stub 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /using-spring-security-taglib/src/main/java/com/spring5/practice/repositories/CourseRepository.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.repositories; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | import com.spring5.practice.model.Course; 8 | import org.springframework.stereotype.Repository; 9 | import org.springframework.transaction.annotation.Transactional; 10 | 11 | @Repository 12 | @Transactional 13 | public interface CourseRepository extends JpaRepository{ 14 | 15 | Course findByCourseId(Long id); 16 | 17 | Course findByCourseCode(String courseCode); 18 | 19 | // List findByCountry_CountryCode(String countryCode); 20 | } 21 | -------------------------------------------------------------------------------- /using-spring-security-taglib/src/main/java/com/spring5/practice/repositories/UserRepository.java: -------------------------------------------------------------------------------- 1 | package com.spring5.practice.repositories; 2 | 3 | import com.spring5.practice.model.User; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.stereotype.Repository; 6 | import org.springframework.transaction.annotation.Transactional; 7 | 8 | import java.util.Optional; 9 | 10 | @Repository 11 | @Transactional 12 | public interface UserRepository extends JpaRepository { 13 | 14 | Optional findByUsername(String username); 15 | } 16 | -------------------------------------------------------------------------------- /using-spring-security-taglib/src/main/resources/hibernate.properties: -------------------------------------------------------------------------------- 1 | hibernate.hbm2ddl.auto=update 2 | hibernate.dialect=org.hibernate.dialect.MySQL5Dialect 3 | hibernate.show_sql=true 4 | #hibernate.current_session_context_class=thread 5 | hibernate.connection.url=jdbc:mysql://localhost:3306/student_course_module_jpa?createDatabaseIfNotExist=true&serverTimezone=UTC 6 | hibernate.connection.driver_class=com.mysql.cj.jdbc.Driver 7 | hibernate.connection.username=mainul35 8 | hibernate.connection.password= 9 | hibernate.connection.autocommit=true 10 | -------------------------------------------------------------------------------- /using-spring-security-taglib/src/main/webapp/WEB-INF/resources/images/course_cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainul35/pondit-class-lecture-git-demo/33964796dc4c3fcd82f854b508a5178fd128f37d/using-spring-security-taglib/src/main/webapp/WEB-INF/resources/images/course_cover.jpg -------------------------------------------------------------------------------- /using-spring-security-taglib/src/main/webapp/WEB-INF/views/403.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: mainul35 4 | Date: ১২/২/২০ 5 | Time: ১১:৪৬ PM 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 403 12 | 13 | 14 |

Sorry, You don't have sufficint permission to visit this page.

15 | 16 | 17 | -------------------------------------------------------------------------------- /using-spring-security-taglib/src/main/webapp/WEB-INF/views/common/footer.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /using-spring-security-taglib/src/main/webapp/WEB-INF/views/common/header.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1" 2 | pageEncoding="ISO-8859-1" %> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 4 | <%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %> 5 | 6 | 7 | 8 | 9 | Spring By Practical Examples 10 | 12 | 13 | -------------------------------------------------------------------------------- /using-spring-security-taglib/src/main/webapp/WEB-INF/views/course/header.jsp: -------------------------------------------------------------------------------- 1 | Logout -------------------------------------------------------------------------------- /using-spring-security-taglib/src/main/webapp/WEB-INF/views/error.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1" 2 | pageEncoding="ISO-8859-1" %> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 |

${message}

11 | 12 | --------------------------------------------------------------------------------