├── 1.presentation.zip ├── 1.presentation ├── .gitignore ├── Gruntfile.js ├── LICENSE ├── css │ ├── print │ │ ├── paper.css │ │ └── pdf.css │ ├── reveal-override.css │ ├── reveal.css │ ├── reveal.scss │ └── theme │ │ ├── README.md │ │ ├── beige.css │ │ ├── black.css │ │ ├── blood.css │ │ ├── league.css │ │ ├── moon.css │ │ ├── night.css │ │ ├── serif.css │ │ ├── simple.css │ │ ├── sky.css │ │ ├── solarized.css │ │ ├── source │ │ ├── beige.scss │ │ ├── black.scss │ │ ├── blood.scss │ │ ├── league.scss │ │ ├── moon.scss │ │ ├── night.scss │ │ ├── serif.scss │ │ ├── simple.scss │ │ ├── sky.scss │ │ ├── solarized.scss │ │ └── white.scss │ │ ├── template │ │ ├── mixins.scss │ │ ├── settings.scss │ │ └── theme.scss │ │ └── white.css ├── images │ ├── Client-server_model.svg.png │ ├── CourseOverview_JPAIn10Steps.png │ ├── CourseOverview_RestfulWebServices.png │ ├── CourseOverview_SOAPWebServices.png │ ├── CourseOverview_SpringBootIn10Steps.png │ ├── CourseOverview_SpringIn10Steps.png │ ├── CourseOverview_SpringWebServices.png │ ├── CourseOverview_SpringWebServices_Sections.png │ ├── In28MinuteHorizontal-Small.png │ ├── In28Minutes-FocusAreas.png │ ├── In28MinutesCourseRoadMap-May2017.png │ ├── In28MinutesLogo-300X50.png │ ├── JPA_01_Introduction.png │ ├── JPA_02_Architecture.png │ ├── JavaEETypicalArchitecture.png │ ├── JavaEE_Model1_Architecture.png │ ├── JavaEE_Model2_Architecture.png │ ├── JavaEE_Model2_Architecture_Front_Controller.png │ ├── PostMan_Basic.png │ ├── PostMan_BasicAuth.png │ ├── PostMan_GET.png │ ├── PostMan_Headers.png │ ├── REST_Block_Structure.png │ ├── SOAPWebServiceClientAndServiceProvider.png │ ├── SOAP_WEB_SERVICE_Initial_Setup_Overview.png │ ├── SpringInterviewGuide_CourseOverview.png │ ├── SpringInterviewGuide_Database.png │ ├── SpringInterviewGuide_RestfulWebservices.png │ ├── SpringInterviewGuide_SOAPWebServices.png │ ├── SpringInterviewGuide_Spring.png │ ├── SpringInterviewGuide_SpringBoot.png │ ├── SpringInterviewGuide_SpringMVC.png │ ├── SpringMVCRequestFlow.png │ ├── SpringModules.png │ ├── Spring_MVC_Flow.png │ ├── Web_Service_Basic_Interaction.png │ ├── Web_Service_Basic_Interaction_SOAP.png │ ├── Web_Service_Basic_Interaction_SOAP_2.png │ ├── Web_Service_Browser_Server__Interaction.png │ ├── Web_Service_Multiple_Application_Interaction.png │ ├── Web_Service_SOAP-Envelope.svg.png │ ├── Web_Service_Service_Definition.png │ ├── Web_Service_Single_Application_Interaction.png │ ├── Web_Service_Z_ApplicationA_WebService.png │ ├── Web_Service_Z_ApplicationA_WebService_Request_Response.png │ ├── Web_Service_Z_PlatformIndependence.png │ ├── Web_Services_Application_Layers.png │ ├── Web_Services_WSDL_HighLevel.png │ ├── Web_Services_WSDL_LowLevel.png │ ├── Web_Services_WSDL_SOAP_Envelope.png │ ├── Web_Services_Web_Application_To_Manage_Todos.png │ ├── logo.png │ ├── soapoverhttp.png │ └── soapovermq.png ├── index.html ├── js │ └── reveal.js ├── lib │ ├── css │ │ └── zenburn.css │ ├── font │ │ ├── league-gothic │ │ │ ├── LICENSE │ │ │ ├── league-gothic.css │ │ │ ├── league-gothic.eot │ │ │ ├── league-gothic.ttf │ │ │ └── league-gothic.woff │ │ └── source-sans-pro │ │ │ ├── LICENSE │ │ │ ├── source-sans-pro-italic.eot │ │ │ ├── source-sans-pro-italic.ttf │ │ │ ├── source-sans-pro-italic.woff │ │ │ ├── source-sans-pro-regular.eot │ │ │ ├── source-sans-pro-regular.ttf │ │ │ ├── source-sans-pro-regular.woff │ │ │ ├── source-sans-pro-semibold.eot │ │ │ ├── source-sans-pro-semibold.ttf │ │ │ ├── source-sans-pro-semibold.woff │ │ │ ├── source-sans-pro-semibolditalic.eot │ │ │ ├── source-sans-pro-semibolditalic.ttf │ │ │ ├── source-sans-pro-semibolditalic.woff │ │ │ └── source-sans-pro.css │ └── js │ │ ├── classList.js │ │ ├── head.min.js │ │ └── html5shiv.js ├── package.json ├── plugin │ ├── highlight │ │ └── highlight.js │ ├── markdown │ │ ├── example.html │ │ ├── example.md │ │ ├── markdown.js │ │ └── marked.js │ ├── math │ │ └── math.js │ ├── multiplex │ │ ├── client.js │ │ ├── index.js │ │ ├── master.js │ │ └── package.json │ ├── notes-server │ │ ├── client.js │ │ ├── index.js │ │ └── notes.html │ ├── notes │ │ ├── notes.html │ │ └── notes.js │ ├── print-pdf │ │ └── print-pdf.js │ ├── search │ │ └── search.js │ └── zoom-js │ │ └── zoom.js ├── spring-interview-questions.html └── test │ ├── examples │ ├── assets │ │ ├── image1.png │ │ └── image2.png │ ├── barebones.html │ ├── embedded-media.html │ ├── math.html │ ├── slide-backgrounds.html │ └── slide-transitions.html │ ├── qunit-1.12.0.css │ ├── qunit-1.12.0.js │ ├── simple.md │ ├── test-markdown-element-attributes.html │ ├── test-markdown-element-attributes.js │ ├── test-markdown-external.html │ ├── test-markdown-external.js │ ├── test-markdown-options.html │ ├── test-markdown-options.js │ ├── test-markdown-slide-attributes.html │ ├── test-markdown-slide-attributes.js │ ├── test-markdown.html │ ├── test-markdown.js │ ├── test-pdf.html │ ├── test-pdf.js │ ├── test.html │ └── test.js ├── 2.spring-in-10-steps ├── .gitignore ├── pom.xml ├── readme.md └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── in28minutes │ │ │ └── spring │ │ │ └── basics │ │ │ └── springin5steps │ │ │ ├── BinarySearchImpl.java │ │ │ ├── BubbleSortAlgorithm.java │ │ │ ├── QuickSortAlgorithm.java │ │ │ ├── SortAlgorithm.java │ │ │ └── SpringIn5StepsApplication.java │ └── resources │ │ ├── application.properties │ │ └── log.txt │ └── test │ └── java │ └── com │ └── in28minutes │ └── spring │ └── basics │ └── springin5steps │ └── SpringIn5StepsApplicationTests.java ├── 3.spring-mvc ├── .gitignore ├── pom.xml ├── readme.md └── src │ └── main │ ├── java │ └── com │ │ └── in28minutes │ │ ├── exception │ │ └── ExceptionController.java │ │ ├── login │ │ ├── LogoutController.java │ │ └── WelcomeController.java │ │ ├── security │ │ └── SecurityConfiguration.java │ │ └── todo │ │ ├── Todo.java │ │ ├── TodoController.java │ │ ├── TodoRestController.java │ │ └── TodoService.java │ ├── resources │ ├── log4j.properties │ ├── messages_en.properties │ └── messages_fr.properties │ └── webapp │ └── WEB-INF │ ├── todo-servlet.xml │ ├── views │ ├── common │ │ ├── footer.jspf │ │ ├── header.jspf │ │ └── navigation.jspf │ ├── error-specific.jsp │ ├── error.jsp │ ├── list-todos.jsp │ ├── todo.jsp │ └── welcome.jsp │ └── web.xml ├── 4.springboot-in-10-steps ├── .gitignore ├── pom.xml ├── readme.md └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── in28minutes │ │ │ └── springboot │ │ │ └── basics │ │ │ └── springbootin10steps │ │ │ ├── Book.java │ │ │ ├── BooksController.java │ │ │ └── SpringbootIn10StepsApplication.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── in28minutes │ └── springboot │ └── basics │ └── springbootin10steps │ └── SpringbootIn10StepsApplicationTests.java ├── 5.soap-web-services ├── pom.xml ├── readme.md └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── in28minutes │ │ │ ├── courses │ │ │ ├── CourseDetails.java │ │ │ ├── DeleteCourseDetailsRequest.java │ │ │ ├── DeleteCourseDetailsResponse.java │ │ │ ├── GetAllCourseDetailsRequest.java │ │ │ ├── GetAllCourseDetailsResponse.java │ │ │ ├── GetCourseDetailsRequest.java │ │ │ ├── GetCourseDetailsResponse.java │ │ │ ├── ObjectFactory.java │ │ │ ├── Status.java │ │ │ └── package-info.java │ │ │ └── soap │ │ │ └── webservices │ │ │ └── soapcoursemanagement │ │ │ ├── SoapCourseManagementApplication.java │ │ │ └── soap │ │ │ ├── CourseDetailsEndpoint.java │ │ │ ├── WebServiceConfig.java │ │ │ ├── bean │ │ │ └── Course.java │ │ │ ├── exception │ │ │ └── CourseNotFoundException.java │ │ │ └── service │ │ │ └── CourseDetailsService.java │ └── resources │ │ ├── application.properties │ │ ├── course-details.xsd │ │ └── securityPolicy.xml │ └── test │ └── java │ └── com │ └── in28minutes │ └── soap │ └── webservices │ └── soapcoursemanagement │ └── SoapCourseManagementApplicationTests.java ├── 6.restful-web-services ├── pom.xml ├── readme.md └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── in28minutes │ │ │ └── rest │ │ │ └── webservices │ │ │ └── restfulwebservices │ │ │ ├── RestfulWebServicesApplication.java │ │ │ ├── SwaggerConfig.java │ │ │ ├── exception │ │ │ ├── CustomizedResponseEntityExceptionHandler.java │ │ │ └── ExceptionResponse.java │ │ │ ├── filtering │ │ │ ├── FilteringController.java │ │ │ └── SomeBean.java │ │ │ ├── helloworld │ │ │ ├── HelloWorldBean.java │ │ │ └── HelloWorldController.java │ │ │ ├── user │ │ │ ├── Post.java │ │ │ ├── PostRepository.java │ │ │ ├── User.java │ │ │ ├── UserDaoService.java │ │ │ ├── UserJPAResource.java │ │ │ ├── UserNotFoundException.java │ │ │ ├── UserRepository.java │ │ │ └── UserResource.java │ │ │ └── versioning │ │ │ ├── Name.java │ │ │ ├── PersonV1.java │ │ │ ├── PersonV2.java │ │ │ └── PersonVersioningController.java │ └── resources │ │ ├── application.properties │ │ ├── data.sql │ │ ├── messages.properties │ │ ├── messages_fr.properties │ │ └── messages_nl.properties │ └── test │ └── java │ └── com │ └── in28minutes │ └── rest │ └── webservices │ └── restfulwebservices │ └── RestfulWebServicesApplicationTests.java ├── LICENSE ├── notes.md ├── readme.md └── spring-interview-questions.pdf /1.presentation.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation.zip -------------------------------------------------------------------------------- /1.presentation/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | *.iml 3 | *.iws 4 | *.eml 5 | out/ 6 | .DS_Store 7 | .svn 8 | log/*.log 9 | tmp/** 10 | node_modules/ 11 | .sass-cache 12 | css/reveal.min.css 13 | js/reveal.min.js -------------------------------------------------------------------------------- /1.presentation/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2017 Hakim El Hattab, http://hakim.se, and reveal.js contributors 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /1.presentation/css/print/pdf.css: -------------------------------------------------------------------------------- 1 | /** 2 | * This stylesheet is used to print reveal.js 3 | * presentations to PDF. 4 | * 5 | * https://github.com/hakimel/reveal.js#pdf-export 6 | */ 7 | 8 | * { 9 | -webkit-print-color-adjust: exact; 10 | } 11 | 12 | body { 13 | margin: 0 auto !important; 14 | border: 0; 15 | padding: 0; 16 | float: none !important; 17 | overflow: visible; 18 | } 19 | 20 | html { 21 | width: 100%; 22 | height: 100%; 23 | overflow: visible; 24 | } 25 | 26 | /* Remove any elements not needed in print. */ 27 | .nestedarrow, 28 | .reveal .controls, 29 | .reveal .progress, 30 | .reveal .playback, 31 | .reveal.overview, 32 | .fork-reveal, 33 | .share-reveal, 34 | .state-background { 35 | display: none !important; 36 | } 37 | 38 | h1, h2, h3, h4, h5, h6 { 39 | text-shadow: 0 0 0 #000 !important; 40 | } 41 | 42 | .reveal pre code { 43 | overflow: hidden !important; 44 | font-family: Courier, 'Courier New', monospace !important; 45 | } 46 | 47 | ul, ol, div, p { 48 | visibility: visible; 49 | position: static; 50 | width: auto; 51 | height: auto; 52 | display: block; 53 | overflow: visible; 54 | margin: auto; 55 | } 56 | .reveal { 57 | width: auto !important; 58 | height: auto !important; 59 | overflow: hidden !important; 60 | } 61 | .reveal .slides { 62 | position: static; 63 | width: 100% !important; 64 | height: auto !important; 65 | zoom: 1 !important; 66 | 67 | left: auto; 68 | top: auto; 69 | margin: 0 !important; 70 | padding: 0 !important; 71 | 72 | overflow: visible; 73 | display: block; 74 | 75 | -webkit-perspective: none; 76 | -moz-perspective: none; 77 | -ms-perspective: none; 78 | perspective: none; 79 | 80 | -webkit-perspective-origin: 50% 50%; /* there isn't a none/auto value but 50-50 is the default */ 81 | -moz-perspective-origin: 50% 50%; 82 | -ms-perspective-origin: 50% 50%; 83 | perspective-origin: 50% 50%; 84 | } 85 | 86 | .reveal .slides .pdf-page { 87 | position: relative; 88 | overflow: hidden; 89 | z-index: 1; 90 | 91 | page-break-after: always; 92 | } 93 | 94 | .reveal .slides section { 95 | visibility: visible !important; 96 | display: block !important; 97 | position: absolute !important; 98 | 99 | margin: 0 !important; 100 | padding: 0 !important; 101 | box-sizing: border-box !important; 102 | min-height: 1px; 103 | 104 | opacity: 1 !important; 105 | 106 | -webkit-transform-style: flat !important; 107 | -moz-transform-style: flat !important; 108 | -ms-transform-style: flat !important; 109 | transform-style: flat !important; 110 | 111 | -webkit-transform: none !important; 112 | -moz-transform: none !important; 113 | -ms-transform: none !important; 114 | transform: none !important; 115 | } 116 | 117 | .reveal section.stack { 118 | position: relative !important; 119 | margin: 0 !important; 120 | padding: 0 !important; 121 | page-break-after: avoid !important; 122 | height: auto !important; 123 | min-height: auto !important; 124 | } 125 | 126 | .reveal img { 127 | box-shadow: none; 128 | } 129 | 130 | .reveal .roll { 131 | overflow: visible; 132 | line-height: 1em; 133 | } 134 | 135 | /* Slide backgrounds are placed inside of their slide when exporting to PDF */ 136 | .reveal .slide-background { 137 | display: block !important; 138 | position: absolute; 139 | top: 0; 140 | left: 0; 141 | width: 100%; 142 | height: 100%; 143 | z-index: auto !important; 144 | } 145 | 146 | /* Display slide speaker notes when 'showNotes' is enabled */ 147 | .reveal .speaker-notes-pdf { 148 | display: block; 149 | width: 100%; 150 | max-height: none; 151 | top: auto; 152 | right: auto; 153 | bottom: auto; 154 | left: auto; 155 | z-index: 100; 156 | } 157 | 158 | /* Layout option which makes notes appear on a separate page */ 159 | .reveal .speaker-notes-pdf[data-layout="separate-page"] { 160 | position: relative; 161 | color: inherit; 162 | background-color: transparent; 163 | padding: 20px; 164 | page-break-after: always; 165 | } 166 | 167 | /* Display slide numbers when 'slideNumber' is enabled */ 168 | .reveal .slide-number-pdf { 169 | display: block; 170 | position: absolute; 171 | font-size: 14px; 172 | } -------------------------------------------------------------------------------- /1.presentation/css/reveal-override.css: -------------------------------------------------------------------------------- 1 | body:after { 2 | content: url(../images/rangaraokaranam-4.png); 3 | position: fixed; 4 | top: 1em; 5 | right: 1em; 6 | } 7 | 8 | .reveal h1 { 9 | color: #D14D28; 10 | } 11 | 12 | .reveal h2 { 13 | color: #1BA84A; 14 | } 15 | 16 | .reveal h3 { 17 | color: #59C8DE; 18 | } -------------------------------------------------------------------------------- /1.presentation/css/theme/README.md: -------------------------------------------------------------------------------- 1 | ## Dependencies 2 | 3 | Themes are written using Sass to keep things modular and reduce the need for repeated selectors across files. Make sure that you have the reveal.js development environment including the Grunt dependencies installed before proceeding: https://github.com/hakimel/reveal.js#full-setup 4 | 5 | ## Creating a Theme 6 | 7 | To create your own theme, start by duplicating a ```.scss``` file in [/css/theme/source](https://github.com/hakimel/reveal.js/blob/master/css/theme/source). It will be automatically compiled by Grunt from Sass to CSS (see the [Gruntfile](https://github.com/hakimel/reveal.js/blob/master/Gruntfile.js)) when you run `grunt css-themes`. 8 | 9 | Each theme file does four things in the following order: 10 | 11 | 1. **Include [/css/theme/template/mixins.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/mixins.scss)** 12 | Shared utility functions. 13 | 14 | 2. **Include [/css/theme/template/settings.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/settings.scss)** 15 | Declares a set of custom variables that the template file (step 4) expects. Can be overridden in step 3. 16 | 17 | 3. **Override** 18 | This is where you override the default theme. Either by specifying variables (see [settings.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/settings.scss) for reference) or by adding any selectors and styles you please. 19 | 20 | 4. **Include [/css/theme/template/theme.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/theme.scss)** 21 | The template theme file which will generate final CSS output based on the currently defined variables. 22 | -------------------------------------------------------------------------------- /1.presentation/css/theme/source/beige.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Beige theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | 15 | // Include theme-specific fonts 16 | @import url(../../lib/font/league-gothic/league-gothic.css); 17 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 18 | 19 | 20 | // Override theme settings (see ../template/settings.scss) 21 | $mainColor: #333; 22 | $headingColor: #333; 23 | $headingTextShadow: none; 24 | $backgroundColor: #f7f3de; 25 | $linkColor: #8b743d; 26 | $linkColorHover: lighten( $linkColor, 20% ); 27 | $selectionBackgroundColor: rgba(79, 64, 28, 0.99); 28 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 29 | 30 | // Background generator 31 | @mixin bodyBackground() { 32 | @include radial-gradient( rgba(247,242,211,1), rgba(255,255,255,1) ); 33 | } 34 | 35 | 36 | 37 | // Theme template ------------------------------ 38 | @import "../template/theme"; 39 | // --------------------------------------------- -------------------------------------------------------------------------------- /1.presentation/css/theme/source/black.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Black theme for reveal.js. This is the opposite of the 'white' theme. 3 | * 4 | * By Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/source-sans-pro/source-sans-pro.css); 16 | 17 | 18 | // Override theme settings (see ../template/settings.scss) 19 | $backgroundColor: #222; 20 | 21 | $mainColor: #fff; 22 | $headingColor: #fff; 23 | 24 | $mainFontSize: 42px; 25 | $mainFont: 'Source Sans Pro', Helvetica, sans-serif; 26 | $headingFont: 'Source Sans Pro', Helvetica, sans-serif; 27 | $headingTextShadow: none; 28 | $headingLetterSpacing: normal; 29 | $headingTextTransform: uppercase; 30 | $headingFontWeight: 600; 31 | $linkColor: #42affa; 32 | $linkColorHover: lighten( $linkColor, 15% ); 33 | $selectionBackgroundColor: lighten( $linkColor, 25% ); 34 | 35 | $heading1Size: 2.5em; 36 | $heading2Size: 1.6em; 37 | $heading3Size: 1.3em; 38 | $heading4Size: 1.0em; 39 | 40 | section.has-light-background { 41 | &, h1, h2, h3, h4, h5, h6 { 42 | color: #222; 43 | } 44 | } 45 | 46 | 47 | // Theme template ------------------------------ 48 | @import "../template/theme"; 49 | // --------------------------------------------- -------------------------------------------------------------------------------- /1.presentation/css/theme/source/blood.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Blood theme for reveal.js 3 | * Author: Walther http://github.com/Walther 4 | * 5 | * Designed to be used with highlight.js theme 6 | * "monokai_sublime.css" available from 7 | * https://github.com/isagalaev/highlight.js/ 8 | * 9 | * For other themes, change $codeBackground accordingly. 10 | * 11 | */ 12 | 13 | // Default mixins and settings ----------------- 14 | @import "../template/mixins"; 15 | @import "../template/settings"; 16 | // --------------------------------------------- 17 | 18 | // Include theme-specific fonts 19 | 20 | @import url(https://fonts.googleapis.com/css?family=Ubuntu:300,700,300italic,700italic); 21 | 22 | // Colors used in the theme 23 | $blood: #a23; 24 | $coal: #222; 25 | $codeBackground: #23241f; 26 | 27 | $backgroundColor: $coal; 28 | 29 | // Main text 30 | $mainFont: Ubuntu, 'sans-serif'; 31 | $mainColor: #eee; 32 | 33 | // Headings 34 | $headingFont: Ubuntu, 'sans-serif'; 35 | $headingTextShadow: 2px 2px 2px $coal; 36 | 37 | // h1 shadow, borrowed humbly from 38 | // (c) Default theme by Hakim El Hattab 39 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 40 | 41 | // Links 42 | $linkColor: $blood; 43 | $linkColorHover: lighten( $linkColor, 20% ); 44 | 45 | // Text selection 46 | $selectionBackgroundColor: $blood; 47 | $selectionColor: #fff; 48 | 49 | 50 | // Theme template ------------------------------ 51 | @import "../template/theme"; 52 | // --------------------------------------------- 53 | 54 | // some overrides after theme template import 55 | 56 | .reveal p { 57 | font-weight: 300; 58 | text-shadow: 1px 1px $coal; 59 | } 60 | 61 | .reveal h1, 62 | .reveal h2, 63 | .reveal h3, 64 | .reveal h4, 65 | .reveal h5, 66 | .reveal h6 { 67 | font-weight: 700; 68 | } 69 | 70 | .reveal p code { 71 | background-color: $codeBackground; 72 | display: inline-block; 73 | border-radius: 7px; 74 | } 75 | 76 | .reveal small code { 77 | vertical-align: baseline; 78 | } -------------------------------------------------------------------------------- /1.presentation/css/theme/source/league.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * League theme for reveal.js. 3 | * 4 | * This was the default theme pre-3.0.0. 5 | * 6 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 7 | */ 8 | 9 | 10 | // Default mixins and settings ----------------- 11 | @import "../template/mixins"; 12 | @import "../template/settings"; 13 | // --------------------------------------------- 14 | 15 | 16 | 17 | // Include theme-specific fonts 18 | @import url(../../lib/font/league-gothic/league-gothic.css); 19 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 20 | 21 | // Override theme settings (see ../template/settings.scss) 22 | $headingTextShadow: 0px 0px 6px rgba(0,0,0,0.2); 23 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 24 | 25 | // Background generator 26 | @mixin bodyBackground() { 27 | @include radial-gradient( rgba(28,30,32,1), rgba(85,90,95,1) ); 28 | } 29 | 30 | 31 | 32 | // Theme template ------------------------------ 33 | @import "../template/theme"; 34 | // --------------------------------------------- -------------------------------------------------------------------------------- /1.presentation/css/theme/source/moon.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Solarized Dark theme for reveal.js. 3 | * Author: Achim Staebler 4 | */ 5 | 6 | 7 | // Default mixins and settings ----------------- 8 | @import "../template/mixins"; 9 | @import "../template/settings"; 10 | // --------------------------------------------- 11 | 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/league-gothic/league-gothic.css); 16 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 17 | 18 | /** 19 | * Solarized colors by Ethan Schoonover 20 | */ 21 | html * { 22 | color-profile: sRGB; 23 | rendering-intent: auto; 24 | } 25 | 26 | // Solarized colors 27 | $base03: #002b36; 28 | $base02: #073642; 29 | $base01: #586e75; 30 | $base00: #657b83; 31 | $base0: #839496; 32 | $base1: #93a1a1; 33 | $base2: #eee8d5; 34 | $base3: #fdf6e3; 35 | $yellow: #b58900; 36 | $orange: #cb4b16; 37 | $red: #dc322f; 38 | $magenta: #d33682; 39 | $violet: #6c71c4; 40 | $blue: #268bd2; 41 | $cyan: #2aa198; 42 | $green: #859900; 43 | 44 | // Override theme settings (see ../template/settings.scss) 45 | $mainColor: $base1; 46 | $headingColor: $base2; 47 | $headingTextShadow: none; 48 | $backgroundColor: $base03; 49 | $linkColor: $blue; 50 | $linkColorHover: lighten( $linkColor, 20% ); 51 | $selectionBackgroundColor: $magenta; 52 | 53 | 54 | 55 | // Theme template ------------------------------ 56 | @import "../template/theme"; 57 | // --------------------------------------------- 58 | -------------------------------------------------------------------------------- /1.presentation/css/theme/source/night.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Black theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(https://fonts.googleapis.com/css?family=Montserrat:700); 16 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic); 17 | 18 | 19 | // Override theme settings (see ../template/settings.scss) 20 | $backgroundColor: #111; 21 | 22 | $mainFont: 'Open Sans', sans-serif; 23 | $linkColor: #e7ad52; 24 | $linkColorHover: lighten( $linkColor, 20% ); 25 | $headingFont: 'Montserrat', Impact, sans-serif; 26 | $headingTextShadow: none; 27 | $headingLetterSpacing: -0.03em; 28 | $headingTextTransform: none; 29 | $selectionBackgroundColor: #e7ad52; 30 | 31 | 32 | // Theme template ------------------------------ 33 | @import "../template/theme"; 34 | // --------------------------------------------- -------------------------------------------------------------------------------- /1.presentation/css/theme/source/serif.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * A simple theme for reveal.js presentations, similar 3 | * to the default theme. The accent color is brown. 4 | * 5 | * This theme is Copyright (C) 2012-2013 Owen Versteeg, http://owenversteeg.com - it is MIT licensed. 6 | */ 7 | 8 | 9 | // Default mixins and settings ----------------- 10 | @import "../template/mixins"; 11 | @import "../template/settings"; 12 | // --------------------------------------------- 13 | 14 | 15 | 16 | // Override theme settings (see ../template/settings.scss) 17 | $mainFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; 18 | $mainColor: #000; 19 | $headingFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; 20 | $headingColor: #383D3D; 21 | $headingTextShadow: none; 22 | $headingTextTransform: none; 23 | $backgroundColor: #F0F1EB; 24 | $linkColor: #51483D; 25 | $linkColorHover: lighten( $linkColor, 20% ); 26 | $selectionBackgroundColor: #26351C; 27 | 28 | .reveal a { 29 | line-height: 1.3em; 30 | } 31 | 32 | 33 | // Theme template ------------------------------ 34 | @import "../template/theme"; 35 | // --------------------------------------------- 36 | -------------------------------------------------------------------------------- /1.presentation/css/theme/source/simple.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * A simple theme for reveal.js presentations, similar 3 | * to the default theme. The accent color is darkblue. 4 | * 5 | * This theme is Copyright (C) 2012 Owen Versteeg, https://github.com/StereotypicalApps. It is MIT licensed. 6 | * reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 7 | */ 8 | 9 | 10 | // Default mixins and settings ----------------- 11 | @import "../template/mixins"; 12 | @import "../template/settings"; 13 | // --------------------------------------------- 14 | 15 | 16 | 17 | // Include theme-specific fonts 18 | @import url(https://fonts.googleapis.com/css?family=News+Cycle:400,700); 19 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 20 | 21 | 22 | // Override theme settings (see ../template/settings.scss) 23 | $mainFont: 'Lato', sans-serif; 24 | $mainColor: #000; 25 | $headingFont: 'News Cycle', Impact, sans-serif; 26 | $headingColor: #000; 27 | $headingTextShadow: none; 28 | $headingTextTransform: none; 29 | $backgroundColor: #fff; 30 | $linkColor: #00008B; 31 | $linkColorHover: lighten( $linkColor, 20% ); 32 | $selectionBackgroundColor: rgba(0, 0, 0, 0.99); 33 | 34 | section.has-dark-background { 35 | &, h1, h2, h3, h4, h5, h6 { 36 | color: #fff; 37 | } 38 | } 39 | 40 | 41 | // Theme template ------------------------------ 42 | @import "../template/theme"; 43 | // --------------------------------------------- -------------------------------------------------------------------------------- /1.presentation/css/theme/source/sky.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Sky theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | 15 | // Include theme-specific fonts 16 | @import url(https://fonts.googleapis.com/css?family=Quicksand:400,700,400italic,700italic); 17 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700); 18 | 19 | 20 | // Override theme settings (see ../template/settings.scss) 21 | $mainFont: 'Open Sans', sans-serif; 22 | $mainColor: #333; 23 | $headingFont: 'Quicksand', sans-serif; 24 | $headingColor: #333; 25 | $headingLetterSpacing: -0.08em; 26 | $headingTextShadow: none; 27 | $backgroundColor: #f7fbfc; 28 | $linkColor: #3b759e; 29 | $linkColorHover: lighten( $linkColor, 20% ); 30 | $selectionBackgroundColor: #134674; 31 | 32 | // Fix links so they are not cut off 33 | .reveal a { 34 | line-height: 1.3em; 35 | } 36 | 37 | // Background generator 38 | @mixin bodyBackground() { 39 | @include radial-gradient( #add9e4, #f7fbfc ); 40 | } 41 | 42 | 43 | 44 | // Theme template ------------------------------ 45 | @import "../template/theme"; 46 | // --------------------------------------------- 47 | -------------------------------------------------------------------------------- /1.presentation/css/theme/source/solarized.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Solarized Light theme for reveal.js. 3 | * Author: Achim Staebler 4 | */ 5 | 6 | 7 | // Default mixins and settings ----------------- 8 | @import "../template/mixins"; 9 | @import "../template/settings"; 10 | // --------------------------------------------- 11 | 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/league-gothic/league-gothic.css); 16 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 17 | 18 | 19 | /** 20 | * Solarized colors by Ethan Schoonover 21 | */ 22 | html * { 23 | color-profile: sRGB; 24 | rendering-intent: auto; 25 | } 26 | 27 | // Solarized colors 28 | $base03: #002b36; 29 | $base02: #073642; 30 | $base01: #586e75; 31 | $base00: #657b83; 32 | $base0: #839496; 33 | $base1: #93a1a1; 34 | $base2: #eee8d5; 35 | $base3: #fdf6e3; 36 | $yellow: #b58900; 37 | $orange: #cb4b16; 38 | $red: #dc322f; 39 | $magenta: #d33682; 40 | $violet: #6c71c4; 41 | $blue: #268bd2; 42 | $cyan: #2aa198; 43 | $green: #859900; 44 | 45 | // Override theme settings (see ../template/settings.scss) 46 | $mainColor: $base00; 47 | $headingColor: $base01; 48 | $headingTextShadow: none; 49 | $backgroundColor: $base3; 50 | $linkColor: $blue; 51 | $linkColorHover: lighten( $linkColor, 20% ); 52 | $selectionBackgroundColor: $magenta; 53 | 54 | // Background generator 55 | // @mixin bodyBackground() { 56 | // @include radial-gradient( rgba($base3,1), rgba(lighten($base3, 20%),1) ); 57 | // } 58 | 59 | 60 | 61 | // Theme template ------------------------------ 62 | @import "../template/theme"; 63 | // --------------------------------------------- 64 | -------------------------------------------------------------------------------- /1.presentation/css/theme/source/white.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * White theme for reveal.js. This is the opposite of the 'black' theme. 3 | * 4 | * By Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/source-sans-pro/source-sans-pro.css); 16 | 17 | 18 | // Override theme settings (see ../template/settings.scss) 19 | $backgroundColor: #fff; 20 | 21 | $mainColor: #222; 22 | $headingColor: #222; 23 | 24 | $mainFontSize: 42px; 25 | $mainFont: 'Source Sans Pro', Helvetica, sans-serif; 26 | $headingFont: 'Source Sans Pro', Helvetica, sans-serif; 27 | $headingTextShadow: none; 28 | $headingLetterSpacing: normal; 29 | $headingTextTransform: uppercase; 30 | $headingFontWeight: 600; 31 | $linkColor: #2a76dd; 32 | $linkColorHover: lighten( $linkColor, 15% ); 33 | $selectionBackgroundColor: lighten( $linkColor, 25% ); 34 | 35 | $heading1Size: 2.5em; 36 | $heading2Size: 1.6em; 37 | $heading3Size: 1.3em; 38 | $heading4Size: 1.0em; 39 | 40 | section.has-dark-background { 41 | &, h1, h2, h3, h4, h5, h6 { 42 | color: #fff; 43 | } 44 | } 45 | 46 | 47 | // Theme template ------------------------------ 48 | @import "../template/theme"; 49 | // --------------------------------------------- -------------------------------------------------------------------------------- /1.presentation/css/theme/template/mixins.scss: -------------------------------------------------------------------------------- 1 | @mixin vertical-gradient( $top, $bottom ) { 2 | background: $top; 3 | background: -moz-linear-gradient( top, $top 0%, $bottom 100% ); 4 | background: -webkit-gradient( linear, left top, left bottom, color-stop(0%,$top), color-stop(100%,$bottom) ); 5 | background: -webkit-linear-gradient( top, $top 0%, $bottom 100% ); 6 | background: -o-linear-gradient( top, $top 0%, $bottom 100% ); 7 | background: -ms-linear-gradient( top, $top 0%, $bottom 100% ); 8 | background: linear-gradient( top, $top 0%, $bottom 100% ); 9 | } 10 | 11 | @mixin horizontal-gradient( $top, $bottom ) { 12 | background: $top; 13 | background: -moz-linear-gradient( left, $top 0%, $bottom 100% ); 14 | background: -webkit-gradient( linear, left top, right top, color-stop(0%,$top), color-stop(100%,$bottom) ); 15 | background: -webkit-linear-gradient( left, $top 0%, $bottom 100% ); 16 | background: -o-linear-gradient( left, $top 0%, $bottom 100% ); 17 | background: -ms-linear-gradient( left, $top 0%, $bottom 100% ); 18 | background: linear-gradient( left, $top 0%, $bottom 100% ); 19 | } 20 | 21 | @mixin radial-gradient( $outer, $inner, $type: circle ) { 22 | background: $outer; 23 | background: -moz-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 24 | background: -webkit-gradient( radial, center center, 0px, center center, 100%, color-stop(0%,$inner), color-stop(100%,$outer) ); 25 | background: -webkit-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 26 | background: -o-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 27 | background: -ms-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 28 | background: radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 29 | } -------------------------------------------------------------------------------- /1.presentation/css/theme/template/settings.scss: -------------------------------------------------------------------------------- 1 | // Base settings for all themes that can optionally be 2 | // overridden by the super-theme 3 | 4 | // Background of the presentation 5 | $backgroundColor: #2b2b2b; 6 | 7 | // Primary/body text 8 | $mainFont: 'Lato', sans-serif; 9 | $mainFontSize: 40px; 10 | $mainColor: #eee; 11 | 12 | // Vertical spacing between blocks of text 13 | $blockMargin: 20px; 14 | 15 | // Headings 16 | $headingMargin: 0 0 $blockMargin 0; 17 | $headingFont: 'League Gothic', Impact, sans-serif; 18 | $headingColor: #eee; 19 | $headingLineHeight: 1.2; 20 | $headingLetterSpacing: normal; 21 | $headingTextTransform: uppercase; 22 | $headingTextShadow: none; 23 | $headingFontWeight: normal; 24 | $heading1TextShadow: $headingTextShadow; 25 | 26 | $heading1Size: 3.77em; 27 | $heading2Size: 2.11em; 28 | $heading3Size: 1.55em; 29 | $heading4Size: 1.00em; 30 | 31 | // Links and actions 32 | $linkColor: #13DAEC; 33 | $linkColorHover: lighten( $linkColor, 20% ); 34 | 35 | // Text selection 36 | $selectionBackgroundColor: #FF5E99; 37 | $selectionColor: #fff; 38 | 39 | // Generates the presentation background, can be overridden 40 | // to return a background image or gradient 41 | @mixin bodyBackground() { 42 | background: $backgroundColor; 43 | } -------------------------------------------------------------------------------- /1.presentation/images/Client-server_model.svg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/Client-server_model.svg.png -------------------------------------------------------------------------------- /1.presentation/images/CourseOverview_JPAIn10Steps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/CourseOverview_JPAIn10Steps.png -------------------------------------------------------------------------------- /1.presentation/images/CourseOverview_RestfulWebServices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/CourseOverview_RestfulWebServices.png -------------------------------------------------------------------------------- /1.presentation/images/CourseOverview_SOAPWebServices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/CourseOverview_SOAPWebServices.png -------------------------------------------------------------------------------- /1.presentation/images/CourseOverview_SpringBootIn10Steps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/CourseOverview_SpringBootIn10Steps.png -------------------------------------------------------------------------------- /1.presentation/images/CourseOverview_SpringIn10Steps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/CourseOverview_SpringIn10Steps.png -------------------------------------------------------------------------------- /1.presentation/images/CourseOverview_SpringWebServices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/CourseOverview_SpringWebServices.png -------------------------------------------------------------------------------- /1.presentation/images/CourseOverview_SpringWebServices_Sections.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/CourseOverview_SpringWebServices_Sections.png -------------------------------------------------------------------------------- /1.presentation/images/In28MinuteHorizontal-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/In28MinuteHorizontal-Small.png -------------------------------------------------------------------------------- /1.presentation/images/In28Minutes-FocusAreas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/In28Minutes-FocusAreas.png -------------------------------------------------------------------------------- /1.presentation/images/In28MinutesCourseRoadMap-May2017.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/In28MinutesCourseRoadMap-May2017.png -------------------------------------------------------------------------------- /1.presentation/images/In28MinutesLogo-300X50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/In28MinutesLogo-300X50.png -------------------------------------------------------------------------------- /1.presentation/images/JPA_01_Introduction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/JPA_01_Introduction.png -------------------------------------------------------------------------------- /1.presentation/images/JPA_02_Architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/JPA_02_Architecture.png -------------------------------------------------------------------------------- /1.presentation/images/JavaEETypicalArchitecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/JavaEETypicalArchitecture.png -------------------------------------------------------------------------------- /1.presentation/images/JavaEE_Model1_Architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/JavaEE_Model1_Architecture.png -------------------------------------------------------------------------------- /1.presentation/images/JavaEE_Model2_Architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/JavaEE_Model2_Architecture.png -------------------------------------------------------------------------------- /1.presentation/images/JavaEE_Model2_Architecture_Front_Controller.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/JavaEE_Model2_Architecture_Front_Controller.png -------------------------------------------------------------------------------- /1.presentation/images/PostMan_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/PostMan_Basic.png -------------------------------------------------------------------------------- /1.presentation/images/PostMan_BasicAuth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/PostMan_BasicAuth.png -------------------------------------------------------------------------------- /1.presentation/images/PostMan_GET.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/PostMan_GET.png -------------------------------------------------------------------------------- /1.presentation/images/PostMan_Headers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/PostMan_Headers.png -------------------------------------------------------------------------------- /1.presentation/images/REST_Block_Structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/REST_Block_Structure.png -------------------------------------------------------------------------------- /1.presentation/images/SOAPWebServiceClientAndServiceProvider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/SOAPWebServiceClientAndServiceProvider.png -------------------------------------------------------------------------------- /1.presentation/images/SOAP_WEB_SERVICE_Initial_Setup_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/SOAP_WEB_SERVICE_Initial_Setup_Overview.png -------------------------------------------------------------------------------- /1.presentation/images/SpringInterviewGuide_CourseOverview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/SpringInterviewGuide_CourseOverview.png -------------------------------------------------------------------------------- /1.presentation/images/SpringInterviewGuide_Database.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/SpringInterviewGuide_Database.png -------------------------------------------------------------------------------- /1.presentation/images/SpringInterviewGuide_RestfulWebservices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/SpringInterviewGuide_RestfulWebservices.png -------------------------------------------------------------------------------- /1.presentation/images/SpringInterviewGuide_SOAPWebServices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/SpringInterviewGuide_SOAPWebServices.png -------------------------------------------------------------------------------- /1.presentation/images/SpringInterviewGuide_Spring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/SpringInterviewGuide_Spring.png -------------------------------------------------------------------------------- /1.presentation/images/SpringInterviewGuide_SpringBoot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/SpringInterviewGuide_SpringBoot.png -------------------------------------------------------------------------------- /1.presentation/images/SpringInterviewGuide_SpringMVC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/SpringInterviewGuide_SpringMVC.png -------------------------------------------------------------------------------- /1.presentation/images/SpringMVCRequestFlow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/SpringMVCRequestFlow.png -------------------------------------------------------------------------------- /1.presentation/images/SpringModules.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/SpringModules.png -------------------------------------------------------------------------------- /1.presentation/images/Spring_MVC_Flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/Spring_MVC_Flow.png -------------------------------------------------------------------------------- /1.presentation/images/Web_Service_Basic_Interaction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/Web_Service_Basic_Interaction.png -------------------------------------------------------------------------------- /1.presentation/images/Web_Service_Basic_Interaction_SOAP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/Web_Service_Basic_Interaction_SOAP.png -------------------------------------------------------------------------------- /1.presentation/images/Web_Service_Basic_Interaction_SOAP_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/Web_Service_Basic_Interaction_SOAP_2.png -------------------------------------------------------------------------------- /1.presentation/images/Web_Service_Browser_Server__Interaction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/Web_Service_Browser_Server__Interaction.png -------------------------------------------------------------------------------- /1.presentation/images/Web_Service_Multiple_Application_Interaction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/Web_Service_Multiple_Application_Interaction.png -------------------------------------------------------------------------------- /1.presentation/images/Web_Service_SOAP-Envelope.svg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/Web_Service_SOAP-Envelope.svg.png -------------------------------------------------------------------------------- /1.presentation/images/Web_Service_Service_Definition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/Web_Service_Service_Definition.png -------------------------------------------------------------------------------- /1.presentation/images/Web_Service_Single_Application_Interaction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/Web_Service_Single_Application_Interaction.png -------------------------------------------------------------------------------- /1.presentation/images/Web_Service_Z_ApplicationA_WebService.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/Web_Service_Z_ApplicationA_WebService.png -------------------------------------------------------------------------------- /1.presentation/images/Web_Service_Z_ApplicationA_WebService_Request_Response.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/Web_Service_Z_ApplicationA_WebService_Request_Response.png -------------------------------------------------------------------------------- /1.presentation/images/Web_Service_Z_PlatformIndependence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/Web_Service_Z_PlatformIndependence.png -------------------------------------------------------------------------------- /1.presentation/images/Web_Services_Application_Layers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/Web_Services_Application_Layers.png -------------------------------------------------------------------------------- /1.presentation/images/Web_Services_WSDL_HighLevel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/Web_Services_WSDL_HighLevel.png -------------------------------------------------------------------------------- /1.presentation/images/Web_Services_WSDL_LowLevel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/Web_Services_WSDL_LowLevel.png -------------------------------------------------------------------------------- /1.presentation/images/Web_Services_WSDL_SOAP_Envelope.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/Web_Services_WSDL_SOAP_Envelope.png -------------------------------------------------------------------------------- /1.presentation/images/Web_Services_Web_Application_To_Manage_Todos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/Web_Services_Web_Application_To_Manage_Todos.png -------------------------------------------------------------------------------- /1.presentation/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/logo.png -------------------------------------------------------------------------------- /1.presentation/images/soapoverhttp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/soapoverhttp.png -------------------------------------------------------------------------------- /1.presentation/images/soapovermq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/images/soapovermq.png -------------------------------------------------------------------------------- /1.presentation/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 23 | 24 | 25 |
26 |
27 |
Slide 1
28 |
Slide 2
29 |
30 |
31 | 32 | 33 | 34 | 35 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /1.presentation/lib/css/zenburn.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Visual Studio-like style based on original C# coloring by Jason Diamond 4 | 5 | */ 6 | .hljs { 7 | display: block; 8 | overflow-x: auto; 9 | padding: 0.5em; 10 | background: white; 11 | color: black; 12 | } 13 | 14 | .hljs-comment, 15 | .hljs-quote, 16 | .hljs-variable { 17 | color: #008000; 18 | } 19 | 20 | .hljs-keyword, 21 | .hljs-selector-tag, 22 | .hljs-built_in, 23 | .hljs-name, 24 | .hljs-tag { 25 | color: #00f; 26 | } 27 | 28 | .hljs-string, 29 | .hljs-title, 30 | .hljs-section, 31 | .hljs-attribute, 32 | .hljs-literal, 33 | .hljs-template-tag, 34 | .hljs-template-variable, 35 | .hljs-type, 36 | .hljs-addition { 37 | color: #a31515; 38 | } 39 | 40 | .hljs-deletion, 41 | .hljs-selector-attr, 42 | .hljs-selector-pseudo, 43 | .hljs-meta { 44 | color: #2b91af; 45 | } 46 | 47 | .hljs-doctag { 48 | color: #808080; 49 | } 50 | 51 | .hljs-attr { 52 | color: #f00; 53 | } 54 | 55 | .hljs-symbol, 56 | .hljs-bullet, 57 | .hljs-link { 58 | color: #00b0e8; 59 | } 60 | 61 | 62 | .hljs-emphasis { 63 | font-style: italic; 64 | } 65 | 66 | .hljs-strong { 67 | font-weight: bold; 68 | } -------------------------------------------------------------------------------- /1.presentation/lib/font/league-gothic/LICENSE: -------------------------------------------------------------------------------- 1 | SIL Open Font License (OFL) 2 | http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL 3 | -------------------------------------------------------------------------------- /1.presentation/lib/font/league-gothic/league-gothic.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'League Gothic'; 3 | src: url('league-gothic.eot'); 4 | src: url('league-gothic.eot?#iefix') format('embedded-opentype'), 5 | url('league-gothic.woff') format('woff'), 6 | url('league-gothic.ttf') format('truetype'); 7 | 8 | font-weight: normal; 9 | font-style: normal; 10 | } -------------------------------------------------------------------------------- /1.presentation/lib/font/league-gothic/league-gothic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/lib/font/league-gothic/league-gothic.eot -------------------------------------------------------------------------------- /1.presentation/lib/font/league-gothic/league-gothic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/lib/font/league-gothic/league-gothic.ttf -------------------------------------------------------------------------------- /1.presentation/lib/font/league-gothic/league-gothic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/lib/font/league-gothic/league-gothic.woff -------------------------------------------------------------------------------- /1.presentation/lib/font/source-sans-pro/LICENSE: -------------------------------------------------------------------------------- 1 | SIL Open Font License 2 | 3 | Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. 4 | 5 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 6 | This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL 7 | 8 | —————————————————————————————- 9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 10 | —————————————————————————————- 11 | 12 | PREAMBLE 13 | The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. 14 | 15 | The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. 16 | 17 | DEFINITIONS 18 | “Font Software” refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. 19 | 20 | “Reserved Font Name” refers to any names specified as such after the copyright statement(s). 21 | 22 | “Original Version” refers to the collection of Font Software components as distributed by the Copyright Holder(s). 23 | 24 | “Modified Version” refers to any derivative made by adding to, deleting, or substituting—in part or in whole—any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. 25 | 26 | “Author” refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. 27 | 28 | PERMISSION & CONDITIONS 29 | Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 30 | 31 | 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 32 | 33 | 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 34 | 35 | 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 36 | 37 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 38 | 39 | 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. 40 | 41 | TERMINATION 42 | This license becomes null and void if any of the above conditions are not met. 43 | 44 | DISCLAIMER 45 | THE FONT SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. -------------------------------------------------------------------------------- /1.presentation/lib/font/source-sans-pro/source-sans-pro-italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/lib/font/source-sans-pro/source-sans-pro-italic.eot -------------------------------------------------------------------------------- /1.presentation/lib/font/source-sans-pro/source-sans-pro-italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/lib/font/source-sans-pro/source-sans-pro-italic.ttf -------------------------------------------------------------------------------- /1.presentation/lib/font/source-sans-pro/source-sans-pro-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/lib/font/source-sans-pro/source-sans-pro-italic.woff -------------------------------------------------------------------------------- /1.presentation/lib/font/source-sans-pro/source-sans-pro-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/lib/font/source-sans-pro/source-sans-pro-regular.eot -------------------------------------------------------------------------------- /1.presentation/lib/font/source-sans-pro/source-sans-pro-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/lib/font/source-sans-pro/source-sans-pro-regular.ttf -------------------------------------------------------------------------------- /1.presentation/lib/font/source-sans-pro/source-sans-pro-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/lib/font/source-sans-pro/source-sans-pro-regular.woff -------------------------------------------------------------------------------- /1.presentation/lib/font/source-sans-pro/source-sans-pro-semibold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/lib/font/source-sans-pro/source-sans-pro-semibold.eot -------------------------------------------------------------------------------- /1.presentation/lib/font/source-sans-pro/source-sans-pro-semibold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/lib/font/source-sans-pro/source-sans-pro-semibold.ttf -------------------------------------------------------------------------------- /1.presentation/lib/font/source-sans-pro/source-sans-pro-semibold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/lib/font/source-sans-pro/source-sans-pro-semibold.woff -------------------------------------------------------------------------------- /1.presentation/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot -------------------------------------------------------------------------------- /1.presentation/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf -------------------------------------------------------------------------------- /1.presentation/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff -------------------------------------------------------------------------------- /1.presentation/lib/font/source-sans-pro/source-sans-pro.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Source Sans Pro'; 3 | src: url('source-sans-pro-regular.eot'); 4 | src: url('source-sans-pro-regular.eot?#iefix') format('embedded-opentype'), 5 | url('source-sans-pro-regular.woff') format('woff'), 6 | url('source-sans-pro-regular.ttf') format('truetype'); 7 | font-weight: normal; 8 | font-style: normal; 9 | } 10 | 11 | @font-face { 12 | font-family: 'Source Sans Pro'; 13 | src: url('source-sans-pro-italic.eot'); 14 | src: url('source-sans-pro-italic.eot?#iefix') format('embedded-opentype'), 15 | url('source-sans-pro-italic.woff') format('woff'), 16 | url('source-sans-pro-italic.ttf') format('truetype'); 17 | font-weight: normal; 18 | font-style: italic; 19 | } 20 | 21 | @font-face { 22 | font-family: 'Source Sans Pro'; 23 | src: url('source-sans-pro-semibold.eot'); 24 | src: url('source-sans-pro-semibold.eot?#iefix') format('embedded-opentype'), 25 | url('source-sans-pro-semibold.woff') format('woff'), 26 | url('source-sans-pro-semibold.ttf') format('truetype'); 27 | font-weight: 600; 28 | font-style: normal; 29 | } 30 | 31 | @font-face { 32 | font-family: 'Source Sans Pro'; 33 | src: url('source-sans-pro-semibolditalic.eot'); 34 | src: url('source-sans-pro-semibolditalic.eot?#iefix') format('embedded-opentype'), 35 | url('source-sans-pro-semibolditalic.woff') format('woff'), 36 | url('source-sans-pro-semibolditalic.ttf') format('truetype'); 37 | font-weight: 600; 38 | font-style: italic; 39 | } -------------------------------------------------------------------------------- /1.presentation/lib/js/classList.js: -------------------------------------------------------------------------------- 1 | /*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js*/ 2 | if(typeof document!=="undefined"&&!("classList" in document.createElement("a"))){(function(j){var a="classList",f="prototype",m=(j.HTMLElement||j.Element)[f],b=Object,k=String[f].trim||function(){return this.replace(/^\s+|\s+$/g,"")},c=Array[f].indexOf||function(q){var p=0,o=this.length;for(;p=4.0.0" 24 | }, 25 | "devDependencies": { 26 | "express": "~4.14.0", 27 | "grunt": "~1.0.1", 28 | "grunt-autoprefixer": "~3.0.3", 29 | "grunt-cli": "~1.2.0", 30 | "grunt-contrib-connect": "~0.11.2", 31 | "grunt-contrib-cssmin": "~0.14.0", 32 | "grunt-contrib-jshint": "~0.11.3", 33 | "grunt-contrib-qunit": "~1.2.0", 34 | "grunt-contrib-uglify": "~0.9.2", 35 | "grunt-contrib-watch": "~1.0.0", 36 | "grunt-sass": "~1.2.0", 37 | "grunt-retire": "~0.3.10", 38 | "grunt-zip": "~0.17.1", 39 | "mustache": "~2.2.1", 40 | "node-sass": "~3.13.0", 41 | "socket.io": "^1.4.8" 42 | }, 43 | "license": "MIT" 44 | } 45 | -------------------------------------------------------------------------------- /1.presentation/plugin/markdown/example.md: -------------------------------------------------------------------------------- 1 | # Markdown Demo 2 | 3 | 4 | 5 | ## External 1.1 6 | 7 | Content 1.1 8 | 9 | Note: This will only appear in the speaker notes window. 10 | 11 | 12 | ## External 1.2 13 | 14 | Content 1.2 15 | 16 | 17 | 18 | ## External 2 19 | 20 | Content 2.1 21 | 22 | 23 | 24 | ## External 3.1 25 | 26 | Content 3.1 27 | 28 | 29 | ## External 3.2 30 | 31 | Content 3.2 32 | -------------------------------------------------------------------------------- /1.presentation/plugin/math/math.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A plugin which enables rendering of math equations inside 3 | * of reveal.js slides. Essentially a thin wrapper for MathJax. 4 | * 5 | * @author Hakim El Hattab 6 | */ 7 | var RevealMath = window.RevealMath || (function(){ 8 | 9 | var options = Reveal.getConfig().math || {}; 10 | options.mathjax = options.mathjax || 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js'; 11 | options.config = options.config || 'TeX-AMS_HTML-full'; 12 | 13 | loadScript( options.mathjax + '?config=' + options.config, function() { 14 | 15 | MathJax.Hub.Config({ 16 | messageStyle: 'none', 17 | tex2jax: { 18 | inlineMath: [['$','$'],['\\(','\\)']] , 19 | skipTags: ['script','noscript','style','textarea','pre'] 20 | }, 21 | skipStartupTypeset: true 22 | }); 23 | 24 | // Typeset followed by an immediate reveal.js layout since 25 | // the typesetting process could affect slide height 26 | MathJax.Hub.Queue( [ 'Typeset', MathJax.Hub ] ); 27 | MathJax.Hub.Queue( Reveal.layout ); 28 | 29 | // Reprocess equations in slides when they turn visible 30 | Reveal.addEventListener( 'slidechanged', function( event ) { 31 | 32 | MathJax.Hub.Queue( [ 'Typeset', MathJax.Hub, event.currentSlide ] ); 33 | 34 | } ); 35 | 36 | } ); 37 | 38 | function loadScript( url, callback ) { 39 | 40 | var head = document.querySelector( 'head' ); 41 | var script = document.createElement( 'script' ); 42 | script.type = 'text/javascript'; 43 | script.src = url; 44 | 45 | // Wrapper for callback to make sure it only fires once 46 | var finish = function() { 47 | if( typeof callback === 'function' ) { 48 | callback.call(); 49 | callback = null; 50 | } 51 | } 52 | 53 | script.onload = finish; 54 | 55 | // IE 56 | script.onreadystatechange = function() { 57 | if ( this.readyState === 'loaded' ) { 58 | finish(); 59 | } 60 | } 61 | 62 | // Normal browsers 63 | head.appendChild( script ); 64 | 65 | } 66 | 67 | })(); 68 | -------------------------------------------------------------------------------- /1.presentation/plugin/multiplex/client.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var multiplex = Reveal.getConfig().multiplex; 3 | var socketId = multiplex.id; 4 | var socket = io.connect(multiplex.url); 5 | 6 | socket.on(multiplex.id, function(data) { 7 | // ignore data from sockets that aren't ours 8 | if (data.socketId !== socketId) { return; } 9 | if( window.location.host === 'localhost:1947' ) return; 10 | 11 | Reveal.setState(data.state); 12 | }); 13 | }()); 14 | -------------------------------------------------------------------------------- /1.presentation/plugin/multiplex/index.js: -------------------------------------------------------------------------------- 1 | var http = require('http'); 2 | var express = require('express'); 3 | var fs = require('fs'); 4 | var io = require('socket.io'); 5 | var crypto = require('crypto'); 6 | 7 | var app = express(); 8 | var staticDir = express.static; 9 | var server = http.createServer(app); 10 | 11 | io = io(server); 12 | 13 | var opts = { 14 | port: process.env.PORT || 1948, 15 | baseDir : __dirname + '/../../' 16 | }; 17 | 18 | io.on( 'connection', function( socket ) { 19 | socket.on('multiplex-statechanged', function(data) { 20 | if (typeof data.secret == 'undefined' || data.secret == null || data.secret === '') return; 21 | if (createHash(data.secret) === data.socketId) { 22 | data.secret = null; 23 | socket.broadcast.emit(data.socketId, data); 24 | }; 25 | }); 26 | }); 27 | 28 | [ 'css', 'js', 'plugin', 'lib' ].forEach(function(dir) { 29 | app.use('/' + dir, staticDir(opts.baseDir + dir)); 30 | }); 31 | 32 | app.get("/", function(req, res) { 33 | res.writeHead(200, {'Content-Type': 'text/html'}); 34 | 35 | var stream = fs.createReadStream(opts.baseDir + '/index.html'); 36 | stream.on('error', function( error ) { 37 | res.write('

reveal.js multiplex server.

Generate token'); 38 | res.end(); 39 | }); 40 | stream.on('readable', function() { 41 | stream.pipe(res); 42 | }); 43 | }); 44 | 45 | app.get("/token", function(req,res) { 46 | var ts = new Date().getTime(); 47 | var rand = Math.floor(Math.random()*9999999); 48 | var secret = ts.toString() + rand.toString(); 49 | res.send({secret: secret, socketId: createHash(secret)}); 50 | }); 51 | 52 | var createHash = function(secret) { 53 | var cipher = crypto.createCipher('blowfish', secret); 54 | return(cipher.final('hex')); 55 | }; 56 | 57 | // Actually listen 58 | server.listen( opts.port || null ); 59 | 60 | var brown = '\033[33m', 61 | green = '\033[32m', 62 | reset = '\033[0m'; 63 | 64 | console.log( brown + "reveal.js:" + reset + " Multiplex running on port " + green + opts.port + reset ); -------------------------------------------------------------------------------- /1.presentation/plugin/multiplex/master.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 3 | // Don't emit events from inside of notes windows 4 | if ( window.location.search.match( /receiver/gi ) ) { return; } 5 | 6 | var multiplex = Reveal.getConfig().multiplex; 7 | 8 | var socket = io.connect( multiplex.url ); 9 | 10 | function post() { 11 | 12 | var messageData = { 13 | state: Reveal.getState(), 14 | secret: multiplex.secret, 15 | socketId: multiplex.id 16 | }; 17 | 18 | socket.emit( 'multiplex-statechanged', messageData ); 19 | 20 | }; 21 | 22 | // Monitor events that trigger a change in state 23 | Reveal.addEventListener( 'slidechanged', post ); 24 | Reveal.addEventListener( 'fragmentshown', post ); 25 | Reveal.addEventListener( 'fragmenthidden', post ); 26 | Reveal.addEventListener( 'overviewhidden', post ); 27 | Reveal.addEventListener( 'overviewshown', post ); 28 | Reveal.addEventListener( 'paused', post ); 29 | Reveal.addEventListener( 'resumed', post ); 30 | 31 | }()); -------------------------------------------------------------------------------- /1.presentation/plugin/multiplex/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reveal-js-multiplex", 3 | "version": "1.0.0", 4 | "description": "reveal.js multiplex server", 5 | "homepage": "http://lab.hakim.se/reveal-js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "engines": { 10 | "node": "~4.1.1" 11 | }, 12 | "dependencies": { 13 | "express": "~4.13.3", 14 | "grunt-cli": "~0.1.13", 15 | "mustache": "~2.2.1", 16 | "socket.io": "~1.3.7" 17 | }, 18 | "license": "MIT" 19 | } 20 | -------------------------------------------------------------------------------- /1.presentation/plugin/notes-server/client.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 3 | // don't emit events from inside the previews themselves 4 | if( window.location.search.match( /receiver/gi ) ) { return; } 5 | 6 | var socket = io.connect( window.location.origin ), 7 | socketId = Math.random().toString().slice( 2 ); 8 | 9 | console.log( 'View slide notes at ' + window.location.origin + '/notes/' + socketId ); 10 | 11 | window.open( window.location.origin + '/notes/' + socketId, 'notes-' + socketId ); 12 | 13 | /** 14 | * Posts the current slide data to the notes window 15 | */ 16 | function post() { 17 | 18 | var slideElement = Reveal.getCurrentSlide(), 19 | notesElement = slideElement.querySelector( 'aside.notes' ); 20 | 21 | var messageData = { 22 | notes: '', 23 | markdown: false, 24 | socketId: socketId, 25 | state: Reveal.getState() 26 | }; 27 | 28 | // Look for notes defined in a slide attribute 29 | if( slideElement.hasAttribute( 'data-notes' ) ) { 30 | messageData.notes = slideElement.getAttribute( 'data-notes' ); 31 | } 32 | 33 | // Look for notes defined in an aside element 34 | if( notesElement ) { 35 | messageData.notes = notesElement.innerHTML; 36 | messageData.markdown = typeof notesElement.getAttribute( 'data-markdown' ) === 'string'; 37 | } 38 | 39 | socket.emit( 'statechanged', messageData ); 40 | 41 | } 42 | 43 | // When a new notes window connects, post our current state 44 | socket.on( 'new-subscriber', function( data ) { 45 | post(); 46 | } ); 47 | 48 | // When the state changes from inside of the speaker view 49 | socket.on( 'statechanged-speaker', function( data ) { 50 | Reveal.setState( data.state ); 51 | } ); 52 | 53 | // Monitor events that trigger a change in state 54 | Reveal.addEventListener( 'slidechanged', post ); 55 | Reveal.addEventListener( 'fragmentshown', post ); 56 | Reveal.addEventListener( 'fragmenthidden', post ); 57 | Reveal.addEventListener( 'overviewhidden', post ); 58 | Reveal.addEventListener( 'overviewshown', post ); 59 | Reveal.addEventListener( 'paused', post ); 60 | Reveal.addEventListener( 'resumed', post ); 61 | 62 | // Post the initial state 63 | post(); 64 | 65 | }()); 66 | -------------------------------------------------------------------------------- /1.presentation/plugin/notes-server/index.js: -------------------------------------------------------------------------------- 1 | var http = require('http'); 2 | var express = require('express'); 3 | var fs = require('fs'); 4 | var io = require('socket.io'); 5 | var Mustache = require('mustache'); 6 | 7 | var app = express(); 8 | var staticDir = express.static; 9 | var server = http.createServer(app); 10 | 11 | io = io(server); 12 | 13 | var opts = { 14 | port : 1947, 15 | baseDir : __dirname + '/../../' 16 | }; 17 | 18 | io.on( 'connection', function( socket ) { 19 | 20 | socket.on( 'new-subscriber', function( data ) { 21 | socket.broadcast.emit( 'new-subscriber', data ); 22 | }); 23 | 24 | socket.on( 'statechanged', function( data ) { 25 | delete data.state.overview; 26 | socket.broadcast.emit( 'statechanged', data ); 27 | }); 28 | 29 | socket.on( 'statechanged-speaker', function( data ) { 30 | delete data.state.overview; 31 | socket.broadcast.emit( 'statechanged-speaker', data ); 32 | }); 33 | 34 | }); 35 | 36 | [ 'css', 'js', 'images', 'plugin', 'lib' ].forEach( function( dir ) { 37 | app.use( '/' + dir, staticDir( opts.baseDir + dir ) ); 38 | }); 39 | 40 | app.get('/', function( req, res ) { 41 | 42 | res.writeHead( 200, { 'Content-Type': 'text/html' } ); 43 | fs.createReadStream( opts.baseDir + '/index.html' ).pipe( res ); 44 | 45 | }); 46 | 47 | app.get( '/notes/:socketId', function( req, res ) { 48 | 49 | fs.readFile( opts.baseDir + 'plugin/notes-server/notes.html', function( err, data ) { 50 | res.send( Mustache.to_html( data.toString(), { 51 | socketId : req.params.socketId 52 | })); 53 | }); 54 | 55 | }); 56 | 57 | // Actually listen 58 | server.listen( opts.port || null ); 59 | 60 | var brown = '\033[33m', 61 | green = '\033[32m', 62 | reset = '\033[0m'; 63 | 64 | var slidesLocation = 'http://localhost' + ( opts.port ? ( ':' + opts.port ) : '' ); 65 | 66 | console.log( brown + 'reveal.js - Speaker Notes' + reset ); 67 | console.log( '1. Open the slides at ' + green + slidesLocation + reset ); 68 | console.log( '2. Click on the link in your JS console to go to the notes page' ); 69 | console.log( '3. Advance through your slides and your notes will advance automatically' ); 70 | -------------------------------------------------------------------------------- /1.presentation/plugin/print-pdf/print-pdf.js: -------------------------------------------------------------------------------- 1 | /** 2 | * phantomjs script for printing presentations to PDF. 3 | * 4 | * Example: 5 | * phantomjs print-pdf.js "http://lab.hakim.se/reveal-js?print-pdf" reveal-demo.pdf 6 | * 7 | * @author Manuel Bieh (https://github.com/manuelbieh) 8 | * @author Hakim El Hattab (https://github.com/hakimel) 9 | * @author Manuel Riezebosch (https://github.com/riezebosch) 10 | */ 11 | 12 | // html2pdf.js 13 | var system = require( 'system' ); 14 | 15 | var probePage = new WebPage(); 16 | var printPage = new WebPage(); 17 | 18 | var inputFile = system.args[1] || 'index.html?print-pdf'; 19 | var outputFile = system.args[2] || 'slides.pdf'; 20 | 21 | if( outputFile.match( /\.pdf$/gi ) === null ) { 22 | outputFile += '.pdf'; 23 | } 24 | 25 | console.log( 'Export PDF: Reading reveal.js config [1/4]' ); 26 | 27 | probePage.open( inputFile, function( status ) { 28 | 29 | console.log( 'Export PDF: Preparing print layout [2/4]' ); 30 | 31 | var config = probePage.evaluate( function() { 32 | return Reveal.getConfig(); 33 | } ); 34 | 35 | if( config ) { 36 | 37 | printPage.paperSize = { 38 | width: Math.floor( config.width * ( 1 + config.margin ) ), 39 | height: Math.floor( config.height * ( 1 + config.margin ) ), 40 | border: 0 41 | }; 42 | 43 | printPage.open( inputFile, function( status ) { 44 | console.log( 'Export PDF: Preparing pdf [3/4]') 45 | printPage.evaluate(function() { 46 | Reveal.isReady() ? window.callPhantom() : Reveal.addEventListener( 'pdf-ready', window.callPhantom ); 47 | }); 48 | } ); 49 | 50 | printPage.onCallback = function(data) { 51 | // For some reason we need to "jump the queue" for syntax highlighting to work. 52 | // See: http://stackoverflow.com/a/3580132/129269 53 | setTimeout(function() { 54 | console.log( 'Export PDF: Writing file [4/4]' ); 55 | printPage.render( outputFile ); 56 | console.log( 'Export PDF: Finished successfully!' ); 57 | phantom.exit(); 58 | }, 0); 59 | }; 60 | } 61 | else { 62 | 63 | console.log( 'Export PDF: Unable to read reveal.js config. Make sure the input address points to a reveal.js page.' ); 64 | phantom.exit(1); 65 | 66 | } 67 | } ); 68 | 69 | 70 | -------------------------------------------------------------------------------- /1.presentation/test/examples/assets/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/test/examples/assets/image1.png -------------------------------------------------------------------------------- /1.presentation/test/examples/assets/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/1.presentation/test/examples/assets/image2.png -------------------------------------------------------------------------------- /1.presentation/test/examples/barebones.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Barebones 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 |
17 | 18 |
19 |

Barebones Presentation

20 |

This example contains the bare minimum includes and markup required to run a reveal.js presentation.

21 |
22 | 23 |
24 |

No Theme

25 |

There's no theme included, so it will fall back on browser defaults.

26 |
27 | 28 |
29 | 30 |
31 | 32 | 33 | 34 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /1.presentation/test/examples/embedded-media.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Embedded Media 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 |
20 | 21 |
22 |

Embedded Media Test

23 |
24 | 25 |
26 | 27 |
28 | 29 |
30 |

Empty Slide

31 |
32 | 33 |
34 | 35 |
36 | 37 | 38 | 39 | 40 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /1.presentation/test/examples/slide-transitions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Slide Transitions 8 | 9 | 10 | 11 | 21 | 22 | 23 | 24 | 25 |
26 | 27 |
28 | 29 |
30 |

Default

31 |
32 | 33 |
34 |

Default

35 |
36 | 37 |
38 |

data-transition: zoom

39 |
40 | 41 |
42 |

data-transition: zoom-in fade-out

43 |
44 | 45 |
46 |

Default

47 |
48 | 49 |
50 |

data-transition: convex

51 |
52 | 53 |
54 |

data-transition: convex-in concave-out

55 |
56 | 57 |
58 |
59 |

Default

60 |
61 |
62 |

data-transition: concave

63 |
64 |
65 |

data-transition: convex-in fade-out

66 |
67 |
68 |

Default

69 |
70 |
71 | 72 |
73 |

data-transition: none

74 |
75 | 76 |
77 |

Default

78 |
79 | 80 |
81 | 82 |
83 | 84 | 85 | 86 | 87 | 99 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /1.presentation/test/simple.md: -------------------------------------------------------------------------------- 1 | ## Slide 1.1 2 | 3 | ```js 4 | var a = 1; 5 | ``` 6 | 7 | 8 | ## Slide 1.2 9 | 10 | 11 | 12 | ## Slide 2 13 | -------------------------------------------------------------------------------- /1.presentation/test/test-markdown-element-attributes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Markdown Element Attributes 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /1.presentation/test/test-markdown-element-attributes.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | Reveal.addEventListener( 'ready', function() { 4 | 5 | QUnit.module( 'Markdown' ); 6 | 7 | test( 'Vertical separator', function() { 8 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 4, 'found four slides' ); 9 | }); 10 | 11 | 12 | test( 'Attributes on element header in vertical slides', function() { 13 | strictEqual( document.querySelectorAll( '.reveal .slides section>section h2.fragment.fade-out' ).length, 1, 'found one vertical slide with class fragment.fade-out on header' ); 14 | strictEqual( document.querySelectorAll( '.reveal .slides section>section h2.fragment.shrink' ).length, 1, 'found one vertical slide with class fragment.shrink on header' ); 15 | }); 16 | 17 | test( 'Attributes on element paragraphs in vertical slides', function() { 18 | strictEqual( document.querySelectorAll( '.reveal .slides section>section p.fragment.grow' ).length, 2, 'found a vertical slide with two paragraphs with class fragment.grow' ); 19 | }); 20 | 21 | test( 'Attributes on element list items in vertical slides', function() { 22 | strictEqual( document.querySelectorAll( '.reveal .slides section>section li.fragment.grow' ).length, 3, 'found a vertical slide with three list items with class fragment.grow' ); 23 | }); 24 | 25 | test( 'Attributes on element paragraphs in horizontal slides', function() { 26 | strictEqual( document.querySelectorAll( '.reveal .slides section p.fragment.highlight-red' ).length, 4, 'found a horizontal slide with four paragraphs with class fragment.grow' ); 27 | }); 28 | test( 'Attributes on element list items in horizontal slides', function() { 29 | strictEqual( document.querySelectorAll( '.reveal .slides section li.fragment.highlight-green' ).length, 5, 'found a horizontal slide with five list items with class fragment.roll-in' ); 30 | }); 31 | test( 'Attributes on element list items in horizontal slides', function() { 32 | strictEqual( document.querySelectorAll( '.reveal .slides section img.reveal.stretch' ).length, 1, 'found a horizontal slide with stretched image, class img.reveal.stretch' ); 33 | }); 34 | 35 | test( 'Attributes on elements in vertical slides with default element attribute separator', function() { 36 | strictEqual( document.querySelectorAll( '.reveal .slides section h2.fragment.highlight-red' ).length, 2, 'found two h2 titles with fragment highlight-red in vertical slides with default element attribute separator' ); 37 | }); 38 | 39 | test( 'Attributes on elements in single slides with default element attribute separator', function() { 40 | strictEqual( document.querySelectorAll( '.reveal .slides section p.fragment.highlight-blue' ).length, 3, 'found three elements with fragment highlight-blue in single slide with default element attribute separator' ); 41 | }); 42 | 43 | } ); 44 | 45 | Reveal.initialize(); 46 | 47 | -------------------------------------------------------------------------------- /1.presentation/test/test-markdown-external.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Markdown 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /1.presentation/test/test-markdown-external.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | Reveal.addEventListener( 'ready', function() { 4 | 5 | QUnit.module( 'Markdown' ); 6 | 7 | test( 'Vertical separator', function() { 8 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 2, 'found two slides' ); 9 | }); 10 | 11 | test( 'Horizontal separator', function() { 12 | strictEqual( document.querySelectorAll( '.reveal .slides>section' ).length, 2, 'found two slides' ); 13 | }); 14 | 15 | test( 'Language highlighter', function() { 16 | strictEqual( document.querySelectorAll( '.hljs-keyword' ).length, 1, 'got rendered highlight tag.' ); 17 | strictEqual( document.querySelector( '.hljs-keyword' ).innerHTML, 'var', 'the same keyword: var.' ); 18 | }); 19 | 20 | 21 | } ); 22 | 23 | Reveal.initialize(); 24 | 25 | -------------------------------------------------------------------------------- /1.presentation/test/test-markdown-options.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Markdown Options 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /1.presentation/test/test-markdown-options.js: -------------------------------------------------------------------------------- 1 | Reveal.addEventListener( 'ready', function() { 2 | 3 | QUnit.module( 'Markdown' ); 4 | 5 | test( 'Options are set', function() { 6 | strictEqual( marked.defaults.smartypants, true ); 7 | }); 8 | 9 | test( 'Smart quotes are activated', function() { 10 | var text = document.querySelector( '.reveal .slides>section>p' ).textContent; 11 | 12 | strictEqual( /['"]/.test( text ), false ); 13 | strictEqual( /[“”‘’]/.test( text ), true ); 14 | }); 15 | 16 | } ); 17 | 18 | Reveal.initialize({ 19 | dependencies: [ 20 | { src: '../plugin/markdown/marked.js' }, 21 | { src: '../plugin/markdown/markdown.js' }, 22 | ], 23 | markdown: { 24 | smartypants: true 25 | } 26 | }); 27 | -------------------------------------------------------------------------------- /1.presentation/test/test-markdown-slide-attributes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Markdown Attributes 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | -------------------------------------------------------------------------------- /1.presentation/test/test-markdown-slide-attributes.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | Reveal.addEventListener( 'ready', function() { 4 | 5 | QUnit.module( 'Markdown' ); 6 | 7 | test( 'Vertical separator', function() { 8 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 6, 'found six vertical slides' ); 9 | }); 10 | 11 | test( 'Id on slide', function() { 12 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section#slide2' ).length, 1, 'found one slide with id slide2' ); 13 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section a[href="#/slide2"]' ).length, 1, 'found one slide with a link to slide2' ); 14 | }); 15 | 16 | test( 'data-background attributes', function() { 17 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#A0C66B"]' ).length, 1, 'found one vertical slide with data-background="#A0C66B"' ); 18 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#ff0000"]' ).length, 1, 'found one vertical slide with data-background="#ff0000"' ); 19 | strictEqual( document.querySelectorAll( '.reveal .slides>section[data-background="#C6916B"]' ).length, 1, 'found one slide with data-background="#C6916B"' ); 20 | }); 21 | 22 | test( 'data-transition attributes', function() { 23 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="zoom"]' ).length, 1, 'found one vertical slide with data-transition="zoom"' ); 24 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="fade"]' ).length, 1, 'found one vertical slide with data-transition="fade"' ); 25 | strictEqual( document.querySelectorAll( '.reveal .slides section [data-transition="zoom"]' ).length, 1, 'found one slide with data-transition="zoom"' ); 26 | }); 27 | 28 | test( 'data-background attributes with default separator', function() { 29 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#A7C66B"]' ).length, 1, 'found one vertical slide with data-background="#A0C66B"' ); 30 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#f70000"]' ).length, 1, 'found one vertical slide with data-background="#ff0000"' ); 31 | strictEqual( document.querySelectorAll( '.reveal .slides>section[data-background="#C7916B"]' ).length, 1, 'found one slide with data-background="#C6916B"' ); 32 | }); 33 | 34 | test( 'data-transition attributes with default separator', function() { 35 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="concave"]' ).length, 1, 'found one vertical slide with data-transition="zoom"' ); 36 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="page"]' ).length, 1, 'found one vertical slide with data-transition="fade"' ); 37 | strictEqual( document.querySelectorAll( '.reveal .slides section [data-transition="concave"]' ).length, 1, 'found one slide with data-transition="zoom"' ); 38 | }); 39 | 40 | test( 'data-transition attributes with inline content', function() { 41 | strictEqual( document.querySelectorAll( '.reveal .slides>section[data-background="#ff0000"]' ).length, 3, 'found three horizontal slides with data-background="#ff0000"' ); 42 | }); 43 | 44 | } ); 45 | 46 | Reveal.initialize(); 47 | 48 | -------------------------------------------------------------------------------- /1.presentation/test/test-markdown.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Markdown 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /1.presentation/test/test-markdown.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | Reveal.addEventListener( 'ready', function() { 4 | 5 | QUnit.module( 'Markdown' ); 6 | 7 | test( 'Vertical separator', function() { 8 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 2, 'found two slides' ); 9 | }); 10 | 11 | 12 | } ); 13 | 14 | Reveal.initialize(); 15 | 16 | -------------------------------------------------------------------------------- /1.presentation/test/test-pdf.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test PDF exports 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 | 19 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /1.presentation/test/test-pdf.js: -------------------------------------------------------------------------------- 1 | 2 | Reveal.addEventListener( 'ready', function() { 3 | 4 | // Only one test for now, we're mainly ensuring that there 5 | // are no execution errors when running PDF mode 6 | 7 | test( 'Reveal.isReady', function() { 8 | strictEqual( Reveal.isReady(), true, 'returns true' ); 9 | }); 10 | 11 | 12 | } ); 13 | 14 | Reveal.initialize({ pdf: true }); 15 | 16 | -------------------------------------------------------------------------------- /1.presentation/test/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Tests 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /2.spring-in-10-steps/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | target/ -------------------------------------------------------------------------------- /2.spring-in-10-steps/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.in28minutes.spring.basics 7 | spring-in-5-steps 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | spring-in-5-steps 12 | Demo project for Spring Boot 13 | 14 | 15 | org.springframework.boot 16 | spring-boot-starter-parent 17 | 3.0.0-M4 18 | 19 | 20 | 21 | 22 | 17 23 | 24 | 25 | 26 | 27 | org.springframework.boot 28 | spring-boot-starter 29 | 30 | 31 | org.springframework.boot 32 | spring-boot-starter-test 33 | test 34 | 35 | 36 | 37 | 38 | 39 | 40 | org.springframework.boot 41 | spring-boot-maven-plugin 42 | 43 | 44 | 45 | 46 | 47 | 48 | spring-milestones 49 | Spring Milestones 50 | https://repo.spring.io/milestone 51 | 52 | false 53 | 54 | 55 | 56 | 57 | 58 | spring-milestones 59 | Spring Milestones 60 | https://repo.spring.io/milestone 61 | 62 | false 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /2.spring-in-10-steps/readme.md: -------------------------------------------------------------------------------- 1 | # How to run this 2 | - Choose the Spring Boot Application file (search for file with @SpringBootApplication) 3 | - Right Click on the file and Run as Java Application 4 | - You are all Set 5 | 6 | -------------------------------------------------------------------------------- /2.spring-in-10-steps/src/main/java/com/in28minutes/spring/basics/springin5steps/BinarySearchImpl.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.spring.basics.springin5steps; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Component; 5 | 6 | @Component 7 | public class BinarySearchImpl { 8 | 9 | @Autowired 10 | private SortAlgorithm sortAlgorithm; 11 | 12 | public int binarySearch(int[] numbers, int numberToSearchFor) { 13 | 14 | int[] sortedNumbers = sortAlgorithm.sort(numbers); 15 | System.out.println(sortAlgorithm); 16 | // Search the array 17 | return 3; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /2.spring-in-10-steps/src/main/java/com/in28minutes/spring/basics/springin5steps/BubbleSortAlgorithm.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.spring.basics.springin5steps; 2 | 3 | import org.springframework.context.annotation.Primary; 4 | import org.springframework.stereotype.Component; 5 | 6 | @Component 7 | @Primary 8 | public class BubbleSortAlgorithm implements SortAlgorithm { 9 | public int[] sort(int[] numbers) { 10 | // Logic for Bubble Sort 11 | return numbers; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /2.spring-in-10-steps/src/main/java/com/in28minutes/spring/basics/springin5steps/QuickSortAlgorithm.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.spring.basics.springin5steps; 2 | 3 | import org.springframework.stereotype.Component; 4 | 5 | @Component 6 | public class QuickSortAlgorithm implements SortAlgorithm { 7 | public int[] sort(int[] numbers) { 8 | // Logic for Quick Sort 9 | return numbers; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /2.spring-in-10-steps/src/main/java/com/in28minutes/spring/basics/springin5steps/SortAlgorithm.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.spring.basics.springin5steps; 2 | 3 | public interface SortAlgorithm { 4 | public int[] sort(int[] numbers); 5 | } 6 | -------------------------------------------------------------------------------- /2.spring-in-10-steps/src/main/java/com/in28minutes/spring/basics/springin5steps/SpringIn5StepsApplication.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.spring.basics.springin5steps; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.context.ApplicationContext; 6 | 7 | @SpringBootApplication 8 | public class SpringIn5StepsApplication { 9 | 10 | // What are the beans? 11 | // What are the dependencies of a bean? 12 | // Where to search for beans? => No need 13 | 14 | public static void main(String[] args) { 15 | 16 | // BinarySearchImpl binarySearch = 17 | // new BinarySearchImpl(new QuickSortAlgorithm()); 18 | // Application Context 19 | ApplicationContext applicationContext = SpringApplication.run(SpringIn5StepsApplication.class, args); 20 | 21 | BinarySearchImpl binarySearch = applicationContext.getBean(BinarySearchImpl.class); 22 | 23 | int result = binarySearch.binarySearch(new int[]{12, 4, 6}, 3); 24 | 25 | System.out.println(result); 26 | } 27 | } -------------------------------------------------------------------------------- /2.spring-in-10-steps/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | logging.level.org.springframework = debug -------------------------------------------------------------------------------- /2.spring-in-10-steps/src/main/resources/log.txt: -------------------------------------------------------------------------------- 1 | Searching directory [/in28Minutes/git/getting-started-in-5-steps/spring-in-5-steps/target/classes/com/in28minutes/spring/basics/springin5steps] for files matching pattern [/in28Minutes/git/getting-started-in-5-steps/spring-in-5-steps/target/classes/com/in28minutes/spring/basics/springin5steps/**/*.class] 2 | Identified candidate component class: file [/in28Minutes/git/getting-started-in-5-steps/spring-in-5-steps/target/classes/com/in28minutes/spring/basics/springin5steps/BinarySearchImpl.class] 3 | Identified candidate component class: file [/in28Minutes/git/getting-started-in-5-steps/spring-in-5-steps/target/classes/com/in28minutes/spring/basics/springin5steps/BubbleSortAlgorithm.class] 4 | 5 | Creating instance of bean 'binarySearchImpl' 6 | Creating instance of bean 'bubbleSortAlgorithm' 7 | Finished creating instance of bean 'bubbleSortAlgorithm' 8 | 9 | Constructor - Autowiring by type from bean name 'binarySearchImpl' via constructor to bean named 'bubbleSortAlgorithm' 10 | Setter - Autowiring by type from bean name 'binarySearchImpl' to bean named 'bubbleSortAlgorithm' 11 | No Setter or Constructor - Autowiring by type from bean name 'binarySearchImpl' to bean named 'bubbleSortAlgorithm' 12 | 13 | Finished creating instance of bean 'binarySearchImpl' 14 | -------------------------------------------------------------------------------- /2.spring-in-10-steps/src/test/java/com/in28minutes/spring/basics/springin5steps/SpringIn5StepsApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.spring.basics.springin5steps; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.junit.jupiter.api.extension.ExtendWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit.jupiter.SpringExtension; 7 | 8 | @ExtendWith(SpringExtension.class) 9 | @SpringBootTest 10 | public class SpringIn5StepsApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /3.spring-mvc/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | target/ -------------------------------------------------------------------------------- /3.spring-mvc/readme.md: -------------------------------------------------------------------------------- 1 | # How to run this 2 | - Choose the Project in Eclipse 3 | - Right Click on Project and Choose Run as Maven Build 4 | - Type in tomcat7:run and press enter 5 | 6 | - Goto http://localhost:8080 7 | - use in28Minutes/dummy 8 | - User id/ password combination is case sensitive 9 | 10 | -------------------------------------------------------------------------------- /3.spring-mvc/src/main/java/com/in28minutes/exception/ExceptionController.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.exception; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | 5 | import org.apache.commons.logging.Log; 6 | import org.apache.commons.logging.LogFactory; 7 | import org.springframework.web.bind.annotation.ControllerAdvice; 8 | import org.springframework.web.bind.annotation.ExceptionHandler; 9 | 10 | @ControllerAdvice 11 | public class ExceptionController { 12 | 13 | private final Log LOGGER = LogFactory.getLog(ExceptionController.class); 14 | 15 | @ExceptionHandler(value = Exception.class) 16 | public String handleException(HttpServletRequest request, Exception ex) { 17 | LOGGER.error("Request " + request.getRequestURL() + " Threw an Exception", ex); 18 | return "error"; 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /3.spring-mvc/src/main/java/com/in28minutes/login/LogoutController.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.login; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletResponse; 5 | 6 | import org.springframework.security.core.Authentication; 7 | import org.springframework.security.core.context.SecurityContextHolder; 8 | import org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler; 9 | import org.springframework.stereotype.Controller; 10 | import org.springframework.web.bind.annotation.GetMapping; 11 | 12 | @Controller 13 | public class LogoutController { 14 | 15 | @GetMapping("/logout") 16 | public String logout(HttpServletRequest request, HttpServletResponse response) { 17 | Authentication auth = SecurityContextHolder.getContext() 18 | .getAuthentication(); 19 | 20 | if (auth != null) { 21 | new SecurityContextLogoutHandler().logout(request, response, auth); 22 | request.getSession().invalidate(); 23 | } 24 | return "redirect:/"; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /3.spring-mvc/src/main/java/com/in28minutes/login/WelcomeController.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.login; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.ui.ModelMap; 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | 7 | @Controller 8 | public class WelcomeController { 9 | 10 | @GetMapping("/") 11 | public String showLoginPage(ModelMap model) { 12 | model.put("name", "in28Minutes"); 13 | return "welcome"; 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /3.spring-mvc/src/main/java/com/in28minutes/security/SecurityConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.security; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; 6 | import org.springframework.security.config.annotation.web.builders.HttpSecurity; 7 | import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; 8 | import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; 9 | 10 | @Configuration 11 | @EnableWebSecurity 12 | public class SecurityConfiguration extends WebSecurityConfigurerAdapter { 13 | 14 | @Autowired 15 | public void configureGlobalSecurity(AuthenticationManagerBuilder auth) 16 | throws Exception { 17 | auth.inMemoryAuthentication().passwordEncoder(org.springframework.security.crypto.password.NoOpPasswordEncoder.getInstance()).withUser("in28Minutes").password("dummy") 18 | .roles("USER", "ADMIN"); 19 | } 20 | 21 | @Override 22 | protected void configure(HttpSecurity http) throws Exception { 23 | http.authorizeRequests().antMatchers("/login").permitAll() 24 | .antMatchers("/", "/*todo*/**").access("hasRole('USER')").and() 25 | .formLogin(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /3.spring-mvc/src/main/java/com/in28minutes/todo/Todo.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.todo; 2 | 3 | import java.time.LocalDate; 4 | 5 | import javax.validation.constraints.Size; 6 | 7 | public class Todo { 8 | 9 | private int id; 10 | private String user; 11 | 12 | @Size(min = 6, message = "Enter atleast 6 characters") 13 | private String desc; 14 | 15 | private LocalDate targetDate; 16 | private boolean isDone; 17 | 18 | public Todo() { 19 | } 20 | 21 | public Todo(int id, String user, String desc, LocalDate targetDate, 22 | boolean isDone) { 23 | super(); 24 | this.id = id; 25 | this.user = user; 26 | this.desc = desc; 27 | this.targetDate = targetDate; 28 | this.isDone = isDone; 29 | } 30 | 31 | public int getId() { 32 | return id; 33 | } 34 | 35 | public void setId(int id) { 36 | this.id = id; 37 | } 38 | 39 | public String getUser() { 40 | return user; 41 | } 42 | 43 | public void setUser(String user) { 44 | this.user = user; 45 | } 46 | 47 | public String getDesc() { 48 | return desc; 49 | } 50 | 51 | public void setDesc(String desc) { 52 | this.desc = desc; 53 | } 54 | 55 | public LocalDate getTargetDate() { 56 | return targetDate; 57 | } 58 | 59 | public void setTargetDate(LocalDate targetDate) { 60 | this.targetDate = targetDate; 61 | } 62 | 63 | public boolean isDone() { 64 | return isDone; 65 | } 66 | 67 | public void setDone(boolean isDone) { 68 | this.isDone = isDone; 69 | } 70 | 71 | @Override 72 | public String toString() { 73 | return String.format("ToString - Todo [id=%s, user=%s, desc=%s, targetDate=%s, isDone=%s]", 74 | id, user, desc, targetDate, isDone); 75 | } 76 | 77 | @Override 78 | public int hashCode() { 79 | final int prime = 31; 80 | int result = 1; 81 | result = prime * result + id; 82 | return result; 83 | } 84 | 85 | @Override 86 | public boolean equals(Object obj) { 87 | if (this == obj) 88 | return true; 89 | if (obj == null) 90 | return false; 91 | if (getClass() != obj.getClass()) 92 | return false; 93 | Todo other = (Todo) obj; 94 | return id == other.id; 95 | } 96 | 97 | } 98 | -------------------------------------------------------------------------------- /3.spring-mvc/src/main/java/com/in28minutes/todo/TodoController.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.todo; 2 | 3 | import java.text.SimpleDateFormat; 4 | import java.time.LocalDate; 5 | import java.util.Date; 6 | 7 | import javax.servlet.http.HttpServletRequest; 8 | import javax.validation.Valid; 9 | 10 | import org.apache.commons.logging.Log; 11 | import org.apache.commons.logging.LogFactory; 12 | import org.springframework.beans.factory.annotation.Autowired; 13 | import org.springframework.beans.propertyeditors.CustomDateEditor; 14 | import org.springframework.security.core.context.SecurityContextHolder; 15 | import org.springframework.security.core.userdetails.UserDetails; 16 | import org.springframework.stereotype.Controller; 17 | import org.springframework.ui.ModelMap; 18 | import org.springframework.validation.BindingResult; 19 | import org.springframework.web.bind.WebDataBinder; 20 | import org.springframework.web.bind.annotation.ExceptionHandler; 21 | import org.springframework.web.bind.annotation.GetMapping; 22 | import org.springframework.web.bind.annotation.InitBinder; 23 | import org.springframework.web.bind.annotation.PostMapping; 24 | import org.springframework.web.bind.annotation.RequestMapping; 25 | import org.springframework.web.bind.annotation.RequestMethod; 26 | import org.springframework.web.bind.annotation.RequestParam; 27 | import org.springframework.web.bind.annotation.SessionAttributes; 28 | 29 | import com.in28minutes.exception.ExceptionController; 30 | 31 | @Controller 32 | @SessionAttributes("name") 33 | public class TodoController { 34 | 35 | private final Log LOGGER = LogFactory.getLog(ExceptionController.class); 36 | 37 | @Autowired 38 | TodoService service; 39 | 40 | @InitBinder 41 | protected void initBinder(WebDataBinder binder) { 42 | SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy"); 43 | binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, false)); 44 | } 45 | 46 | @GetMapping("/list-todos") 47 | public String listTodos(ModelMap model) { 48 | model.addAttribute("todos", service.retrieveTodos(retrieveLoggedInUserName())); 49 | return "list-todos"; 50 | } 51 | 52 | 53 | @GetMapping("/add-todo") 54 | public String showTodoPage(ModelMap model) { 55 | model.addAttribute("todo", new Todo(0, retrieveLoggedInUserName(), "", LocalDate.now(), false)); 56 | return "todo"; 57 | } 58 | 59 | @PostMapping("/add-todo") 60 | public String addTodo(ModelMap model, @Valid Todo todo, BindingResult result) { 61 | if (result.hasErrors()) { 62 | return "todo"; 63 | } 64 | service.addTodo(retrieveLoggedInUserName(), todo.getDesc(), LocalDate.now(), false); 65 | model.clear(); 66 | return "redirect:list-todos"; 67 | } 68 | 69 | @GetMapping("/update-todo") 70 | public String updateTodo(ModelMap model, @RequestParam int id) { 71 | Todo todo = service.retrieveTodo(id); 72 | model.addAttribute("todo", todo); 73 | return "todo"; 74 | } 75 | 76 | @PostMapping("/update-todo") 77 | public String updateTodo(ModelMap model, @Valid Todo todo, BindingResult result) { 78 | // Update to do 79 | if (result.hasErrors()) { 80 | return "todo"; 81 | } 82 | 83 | todo.setUser(retrieveLoggedInUserName()); 84 | service.updateTodo(todo); 85 | 86 | return "redirect:list-todos"; 87 | } 88 | 89 | @GetMapping("/delete-todo") 90 | public String deleteTodo(ModelMap model, @RequestParam int id) { 91 | service.deleteTodo(id); 92 | model.clear(); 93 | return "redirect:list-todos"; 94 | } 95 | 96 | @ExceptionHandler(value = Exception.class) 97 | public String handleException(HttpServletRequest request, Exception ex) { 98 | LOGGER.error("Request " + request.getRequestURL() + " Threw an Exception", ex); 99 | return "error-specific"; 100 | } 101 | 102 | private String retrieveLoggedInUserName() { 103 | Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal(); 104 | 105 | if (principal instanceof UserDetails) 106 | return ((UserDetails) principal).getUsername(); 107 | 108 | return principal.toString(); 109 | } 110 | 111 | } -------------------------------------------------------------------------------- /3.spring-mvc/src/main/java/com/in28minutes/todo/TodoRestController.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.todo; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | import org.springframework.web.bind.annotation.PathVariable; 8 | import org.springframework.web.bind.annotation.RestController; 9 | 10 | @RestController 11 | public class TodoRestController { 12 | @Autowired 13 | TodoService service; 14 | 15 | @GetMapping("/todos") 16 | public List retrieveAllTodos() { 17 | return service.retrieveTodos("in28Minutes"); 18 | } 19 | 20 | @GetMapping("/todos/{id}") 21 | public Todo retrieveTodo(@PathVariable int id) { 22 | return service.retrieveTodo(id); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /3.spring-mvc/src/main/java/com/in28minutes/todo/TodoService.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.todo; 2 | 3 | import java.time.LocalDate; 4 | import java.util.ArrayList; 5 | import java.util.Date; 6 | import java.util.Iterator; 7 | import java.util.List; 8 | 9 | import org.springframework.stereotype.Service; 10 | 11 | @Service 12 | public class TodoService { 13 | private static final List todos = new ArrayList(); 14 | private static int todoCount = 3; 15 | 16 | static { 17 | todos.add(new Todo(1, "in28Minutes", "Learn Spring MVC", LocalDate.now(), false)); 18 | todos.add(new Todo(2, "in28Minutes", "Learn Struts", LocalDate.now(), false)); 19 | todos.add(new Todo(3, "in28Minutes", "Learn Hibernate", LocalDate.now(), false)); 20 | } 21 | 22 | public void addTodo(String name, String desc, LocalDate targetDate, boolean isDone) { 23 | todos.add(new Todo(++todoCount, name, desc, targetDate, isDone)); 24 | } 25 | 26 | public void deleteTodo(int id) { 27 | todos.removeIf(todo -> todo.getId() == id); 28 | } 29 | 30 | public List retrieveTodos(String user) { 31 | List filteredTodos = new ArrayList<>(); 32 | for (Todo todo : todos) { 33 | if (todo.getUser().equals(user)) 34 | filteredTodos.add(todo); 35 | } 36 | return filteredTodos; 37 | } 38 | 39 | public Todo retrieveTodo(int id) { 40 | for (Todo todo : todos) { 41 | if (todo.getId() == id) 42 | return todo; 43 | } 44 | return null; 45 | } 46 | 47 | public void updateTodo(Todo todo) { 48 | todos.remove(todo); 49 | todos.add(todo); 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /3.spring-mvc/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=DEBUG, Appender1 2 | 3 | log4j.appender.Appender1=org.apache.log4j.ConsoleAppender 4 | log4j.appender.Appender1.layout=org.apache.log4j.PatternLayout 5 | log4j.appender.Appender1.layout.ConversionPattern=%-7p %d [%t] %c %x - %m%n 6 | 7 | #TRACE 8 | #DEBUG 9 | #INFO 10 | #WARN 11 | #ERROR -------------------------------------------------------------------------------- /3.spring-mvc/src/main/resources/messages_en.properties: -------------------------------------------------------------------------------- 1 | welcome.caption=Welcome in English 2 | todo.caption= Your Todos in English -------------------------------------------------------------------------------- /3.spring-mvc/src/main/resources/messages_fr.properties: -------------------------------------------------------------------------------- 1 | welcome.caption=Welcome in French 2 | todo.caption=Your Todos in French -------------------------------------------------------------------------------- /3.spring-mvc/src/main/webapp/WEB-INF/todo-servlet.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 12 | 13 | /WEB-INF/views/ 14 | 15 | 16 | .jsp 17 | 18 | 19 | 20 | 21 | 22 | 24 | 25 | 26 | 27 | 28 | 30 | 31 | 32 | 33 | 34 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /3.spring-mvc/src/main/webapp/WEB-INF/views/common/footer.jspf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /3.spring-mvc/src/main/webapp/WEB-INF/views/common/header.jspf: -------------------------------------------------------------------------------- 1 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 2 | <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> 3 | <%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%> 4 | <%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> 5 | 6 | 7 | Yahoo!! 8 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /3.spring-mvc/src/main/webapp/WEB-INF/views/common/navigation.jspf: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /3.spring-mvc/src/main/webapp/WEB-INF/views/error-specific.jsp: -------------------------------------------------------------------------------- 1 | <%@ include file="common/header.jspf"%> 2 | <%@ include file="common/navigation.jspf"%> 3 |
4 | Specific Exception Page 5 | Please contact support on ... 6 |
7 | 8 | <%@ include file="common/footer.jspf"%> -------------------------------------------------------------------------------- /3.spring-mvc/src/main/webapp/WEB-INF/views/error.jsp: -------------------------------------------------------------------------------- 1 | <%@ include file="common/header.jspf"%> 2 | <%@ include file="common/navigation.jspf"%> 3 |
4 | Application has encountered an error. 5 | Please contact support on ... 6 |
7 | 8 | <%@ include file="common/footer.jspf"%> -------------------------------------------------------------------------------- /3.spring-mvc/src/main/webapp/WEB-INF/views/list-todos.jsp: -------------------------------------------------------------------------------- 1 | <%@ include file="common/header.jspf"%> 2 | <%@ include file="common/navigation.jspf"%> 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 22 | 26 | 27 | 28 | 29 |
DescriptionTarget DateIs Completed?
${todo.desc}${todo.done}Update Delete 25 |
30 |
31 | Add 32 |
33 | 34 |
35 | 36 | <%@ include file="common/footer.jspf"%> 37 | 38 | -------------------------------------------------------------------------------- /3.spring-mvc/src/main/webapp/WEB-INF/views/todo.jsp: -------------------------------------------------------------------------------- 1 | <%@ include file="common/header.jspf"%> 2 | <%@ include file="common/navigation.jspf"%> 3 |
4 |

Add a Todo

5 | 6 | 7 | 8 | 9 |
10 | Description 11 | 13 | 14 |
15 | 16 |
17 | Target Date 18 | 20 | 21 |
22 | 23 | 24 | 25 |
26 |
27 | <%@ include file="common/footer.jspf"%> 28 | -------------------------------------------------------------------------------- /3.spring-mvc/src/main/webapp/WEB-INF/views/welcome.jsp: -------------------------------------------------------------------------------- 1 | <%@ include file="common/header.jspf"%> 2 | <%@ include file="common/navigation.jspf"%> 3 |
4 | ${name}.
Now, you can manage 5 | your todos. 6 |
7 | <%@ include file="common/footer.jspf"%> 8 | -------------------------------------------------------------------------------- /3.spring-mvc/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | To do List 7 | 8 | 9 | dispatcher 10 | 11 | org.springframework.web.servlet.DispatcherServlet 12 | 13 | 14 | contextConfigLocation 15 | /WEB-INF/todo-servlet.xml 16 | 17 | 1 18 | 19 | 20 | 21 | dispatcher 22 | / 23 | 24 | 25 | 26 | springSecurityFilterChain 27 | org.springframework.web.filter.DelegatingFilterProxy 28 | 29 | 30 | 31 | springSecurityFilterChain 32 | /* 33 | 34 | 35 | 36 | /WEB-INF/views/jsp/error.jsp 37 | 38 | 39 | -------------------------------------------------------------------------------- /4.springboot-in-10-steps/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | target/ -------------------------------------------------------------------------------- /4.springboot-in-10-steps/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.in28minutes.springboot.basics 7 | springboot-in-10-steps 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | springboot-in-10-steps 12 | Demo project for Spring Boot 13 | 14 | 15 | org.springframework.boot 16 | spring-boot-starter-parent 17 | 3.0.0-M4 18 | 19 | 20 | 21 | 22 | 17 23 | 24 | 25 | 26 | 27 | org.springframework.boot 28 | spring-boot-starter-web 29 | 30 | 31 | 32 | org.springframework.boot 33 | spring-boot-starter-actuator 34 | 35 | 36 | 37 | org.springframework.data 38 | spring-data-rest-hal-explorer 39 | 40 | 41 | 47 | 48 | 49 | org.springframework.boot 50 | spring-boot-starter-test 51 | test 52 | 53 | 54 | 55 | org.springframework.boot 56 | spring-boot-devtools 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | org.springframework.boot 65 | spring-boot-maven-plugin 66 | 67 | 68 | 69 | 70 | 71 | 72 | spring-milestones 73 | Spring Milestones 74 | https://repo.spring.io/milestone 75 | 76 | false 77 | 78 | 79 | 80 | 81 | 82 | 83 | spring-milestones 84 | Spring Milestones 85 | https://repo.spring.io/milestone 86 | 87 | false 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /4.springboot-in-10-steps/readme.md: -------------------------------------------------------------------------------- 1 | # How to run this 2 | - Choose the Spring Boot Application file (search for file with @SpringBootApplication) 3 | - Right Click on the file and Run as Java Application 4 | - You are all Set 5 | 6 | -------------------------------------------------------------------------------- /4.springboot-in-10-steps/src/main/java/com/in28minutes/springboot/basics/springbootin10steps/Book.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.springboot.basics.springbootin10steps; 2 | 3 | public record Book(long id, String name, String author) { 4 | @Override 5 | public String toString() { 6 | return String.format("Book [id=%s, name=%s, author=%s]", id, name, author); 7 | } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /4.springboot-in-10-steps/src/main/java/com/in28minutes/springboot/basics/springbootin10steps/BooksController.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.springboot.basics.springbootin10steps; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | @RestController 9 | public class BooksController { 10 | @GetMapping("/books") 11 | public List getAllBooks() { 12 | return List.of(new Book(1L, "Mastering Spring 5.2", "Ranga Karanam")); 13 | } 14 | } -------------------------------------------------------------------------------- /4.springboot-in-10-steps/src/main/java/com/in28minutes/springboot/basics/springbootin10steps/SpringbootIn10StepsApplication.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.springboot.basics.springbootin10steps; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.context.ApplicationContext; 6 | 7 | @SpringBootApplication 8 | public class SpringbootIn10StepsApplication { 9 | 10 | public static void main(String[] args) { 11 | ApplicationContext applicationContext = SpringApplication.run(SpringbootIn10StepsApplication.class, args); 12 | 13 | for (String name : applicationContext.getBeanDefinitionNames()) { 14 | System.out.println(name); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /4.springboot-in-10-steps/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | #logging.level.org.springframework = DEBUG 2 | management.security.enabled=false -------------------------------------------------------------------------------- /4.springboot-in-10-steps/src/test/java/com/in28minutes/springboot/basics/springbootin10steps/SpringbootIn10StepsApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.springboot.basics.springbootin10steps; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.junit.jupiter.api.extension.ExtendWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit.jupiter.SpringExtension; 7 | 8 | @ExtendWith(SpringExtension.class) 9 | @SpringBootTest 10 | public class SpringbootIn10StepsApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /5.soap-web-services/readme.md: -------------------------------------------------------------------------------- 1 | # How to run this 2 | - Choose the Spring Boot Application file (search for file with @SpringBootApplication) 3 | - Right Click on the file and Run as Java Application 4 | - You are all Set 5 | 6 | -------------------------------------------------------------------------------- /5.soap-web-services/src/main/java/com/in28minutes/courses/CourseDetails.java: -------------------------------------------------------------------------------- 1 | // 2 | // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 3 | // See http://java.sun.com/xml/jaxb 4 | // Any modifications to this file will be lost upon recompilation of the source schema. 5 | // Generated on: 2017.07.30 at 12:41:31 PM IST 6 | // 7 | 8 | 9 | package com.in28minutes.courses; 10 | 11 | import javax.xml.bind.annotation.XmlAccessType; 12 | import javax.xml.bind.annotation.XmlAccessorType; 13 | import javax.xml.bind.annotation.XmlElement; 14 | import javax.xml.bind.annotation.XmlType; 15 | 16 | 17 | /** 18 | *

Java class for CourseDetails complex type. 19 | * 20 | *

The following schema fragment specifies the expected content contained within this class. 21 | * 22 | *

 23 |  * <complexType name="CourseDetails">
 24 |  *   <complexContent>
 25 |  *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 26 |  *       <sequence>
 27 |  *         <element name="id" type="{http://www.w3.org/2001/XMLSchema}int"/>
 28 |  *         <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
 29 |  *         <element name="description" type="{http://www.w3.org/2001/XMLSchema}string"/>
 30 |  *       </sequence>
 31 |  *     </restriction>
 32 |  *   </complexContent>
 33 |  * </complexType>
 34 |  * 
35 | * 36 | * 37 | */ 38 | @XmlAccessorType(XmlAccessType.FIELD) 39 | @XmlType(name = "CourseDetails", propOrder = { 40 | "id", 41 | "name", 42 | "description" 43 | }) 44 | public class CourseDetails { 45 | 46 | protected int id; 47 | @XmlElement(required = true) 48 | protected String name; 49 | @XmlElement(required = true) 50 | protected String description; 51 | 52 | /** 53 | * Gets the value of the id property. 54 | * 55 | */ 56 | public int getId() { 57 | return id; 58 | } 59 | 60 | /** 61 | * Sets the value of the id property. 62 | * 63 | */ 64 | public void setId(int value) { 65 | this.id = value; 66 | } 67 | 68 | /** 69 | * Gets the value of the name property. 70 | * 71 | * @return 72 | * possible object is 73 | * {@link String } 74 | * 75 | */ 76 | public String getName() { 77 | return name; 78 | } 79 | 80 | /** 81 | * Sets the value of the name property. 82 | * 83 | * @param value 84 | * allowed object is 85 | * {@link String } 86 | * 87 | */ 88 | public void setName(String value) { 89 | this.name = value; 90 | } 91 | 92 | /** 93 | * Gets the value of the description property. 94 | * 95 | * @return 96 | * possible object is 97 | * {@link String } 98 | * 99 | */ 100 | public String getDescription() { 101 | return description; 102 | } 103 | 104 | /** 105 | * Sets the value of the description property. 106 | * 107 | * @param value 108 | * allowed object is 109 | * {@link String } 110 | * 111 | */ 112 | public void setDescription(String value) { 113 | this.description = value; 114 | } 115 | 116 | } 117 | -------------------------------------------------------------------------------- /5.soap-web-services/src/main/java/com/in28minutes/courses/DeleteCourseDetailsRequest.java: -------------------------------------------------------------------------------- 1 | // 2 | // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 3 | // See http://java.sun.com/xml/jaxb 4 | // Any modifications to this file will be lost upon recompilation of the source schema. 5 | // Generated on: 2017.07.30 at 12:41:31 PM IST 6 | // 7 | 8 | 9 | package com.in28minutes.courses; 10 | 11 | import javax.xml.bind.annotation.XmlAccessType; 12 | import javax.xml.bind.annotation.XmlAccessorType; 13 | import javax.xml.bind.annotation.XmlRootElement; 14 | import javax.xml.bind.annotation.XmlType; 15 | 16 | 17 | /** 18 | *

Java class for anonymous complex type. 19 | * 20 | *

The following schema fragment specifies the expected content contained within this class. 21 | * 22 | *

23 |  * <complexType>
24 |  *   <complexContent>
25 |  *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
26 |  *       <sequence>
27 |  *         <element name="id" type="{http://www.w3.org/2001/XMLSchema}int"/>
28 |  *       </sequence>
29 |  *     </restriction>
30 |  *   </complexContent>
31 |  * </complexType>
32 |  * 
33 | * 34 | * 35 | */ 36 | @XmlAccessorType(XmlAccessType.FIELD) 37 | @XmlType(name = "", propOrder = { 38 | "id" 39 | }) 40 | @XmlRootElement(name = "DeleteCourseDetailsRequest") 41 | public class DeleteCourseDetailsRequest { 42 | 43 | protected int id; 44 | 45 | /** 46 | * Gets the value of the id property. 47 | * 48 | */ 49 | public int getId() { 50 | return id; 51 | } 52 | 53 | /** 54 | * Sets the value of the id property. 55 | * 56 | */ 57 | public void setId(int value) { 58 | this.id = value; 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /5.soap-web-services/src/main/java/com/in28minutes/courses/DeleteCourseDetailsResponse.java: -------------------------------------------------------------------------------- 1 | // 2 | // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 3 | // See http://java.sun.com/xml/jaxb 4 | // Any modifications to this file will be lost upon recompilation of the source schema. 5 | // Generated on: 2017.07.30 at 12:41:31 PM IST 6 | // 7 | 8 | 9 | package com.in28minutes.courses; 10 | 11 | import javax.xml.bind.annotation.XmlAccessType; 12 | import javax.xml.bind.annotation.XmlAccessorType; 13 | import javax.xml.bind.annotation.XmlElement; 14 | import javax.xml.bind.annotation.XmlRootElement; 15 | import javax.xml.bind.annotation.XmlType; 16 | 17 | 18 | /** 19 | *

Java class for anonymous complex type. 20 | * 21 | *

The following schema fragment specifies the expected content contained within this class. 22 | * 23 | *

24 |  * <complexType>
25 |  *   <complexContent>
26 |  *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
27 |  *       <sequence>
28 |  *         <element name="status" type="{http://in28minutes.com/courses}Status"/>
29 |  *       </sequence>
30 |  *     </restriction>
31 |  *   </complexContent>
32 |  * </complexType>
33 |  * 
34 | * 35 | * 36 | */ 37 | @XmlAccessorType(XmlAccessType.FIELD) 38 | @XmlType(name = "", propOrder = { 39 | "status" 40 | }) 41 | @XmlRootElement(name = "DeleteCourseDetailsResponse") 42 | public class DeleteCourseDetailsResponse { 43 | 44 | @XmlElement(required = true) 45 | protected Status status; 46 | 47 | /** 48 | * Gets the value of the status property. 49 | * 50 | * @return 51 | * possible object is 52 | * {@link Status } 53 | * 54 | */ 55 | public Status getStatus() { 56 | return status; 57 | } 58 | 59 | /** 60 | * Sets the value of the status property. 61 | * 62 | * @param value 63 | * allowed object is 64 | * {@link Status } 65 | * 66 | */ 67 | public void setStatus(Status value) { 68 | this.status = value; 69 | } 70 | 71 | } 72 | -------------------------------------------------------------------------------- /5.soap-web-services/src/main/java/com/in28minutes/courses/GetAllCourseDetailsRequest.java: -------------------------------------------------------------------------------- 1 | // 2 | // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 3 | // See http://java.sun.com/xml/jaxb 4 | // Any modifications to this file will be lost upon recompilation of the source schema. 5 | // Generated on: 2017.07.30 at 12:41:31 PM IST 6 | // 7 | 8 | 9 | package com.in28minutes.courses; 10 | 11 | import javax.xml.bind.annotation.XmlAccessType; 12 | import javax.xml.bind.annotation.XmlAccessorType; 13 | import javax.xml.bind.annotation.XmlRootElement; 14 | import javax.xml.bind.annotation.XmlType; 15 | 16 | 17 | /** 18 | *

Java class for anonymous complex type. 19 | * 20 | *

The following schema fragment specifies the expected content contained within this class. 21 | * 22 | *

23 |  * <complexType>
24 |  *   <complexContent>
25 |  *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
26 |  *     </restriction>
27 |  *   </complexContent>
28 |  * </complexType>
29 |  * 
30 | * 31 | * 32 | */ 33 | @XmlAccessorType(XmlAccessType.FIELD) 34 | @XmlType(name = "") 35 | @XmlRootElement(name = "GetAllCourseDetailsRequest") 36 | public class GetAllCourseDetailsRequest { 37 | 38 | 39 | } 40 | -------------------------------------------------------------------------------- /5.soap-web-services/src/main/java/com/in28minutes/courses/GetAllCourseDetailsResponse.java: -------------------------------------------------------------------------------- 1 | // 2 | // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 3 | // See http://java.sun.com/xml/jaxb 4 | // Any modifications to this file will be lost upon recompilation of the source schema. 5 | // Generated on: 2017.07.30 at 12:41:31 PM IST 6 | // 7 | 8 | 9 | package com.in28minutes.courses; 10 | 11 | import java.util.ArrayList; 12 | import java.util.List; 13 | import javax.xml.bind.annotation.XmlAccessType; 14 | import javax.xml.bind.annotation.XmlAccessorType; 15 | import javax.xml.bind.annotation.XmlElement; 16 | import javax.xml.bind.annotation.XmlRootElement; 17 | import javax.xml.bind.annotation.XmlType; 18 | 19 | 20 | /** 21 | *

Java class for anonymous complex type. 22 | * 23 | *

The following schema fragment specifies the expected content contained within this class. 24 | * 25 | *

26 |  * <complexType>
27 |  *   <complexContent>
28 |  *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
29 |  *       <sequence>
30 |  *         <element name="CourseDetails" type="{http://in28minutes.com/courses}CourseDetails" maxOccurs="unbounded"/>
31 |  *       </sequence>
32 |  *     </restriction>
33 |  *   </complexContent>
34 |  * </complexType>
35 |  * 
36 | * 37 | * 38 | */ 39 | @XmlAccessorType(XmlAccessType.FIELD) 40 | @XmlType(name = "", propOrder = { 41 | "courseDetails" 42 | }) 43 | @XmlRootElement(name = "GetAllCourseDetailsResponse") 44 | public class GetAllCourseDetailsResponse { 45 | 46 | @XmlElement(name = "CourseDetails", required = true) 47 | protected List courseDetails; 48 | 49 | /** 50 | * Gets the value of the courseDetails property. 51 | * 52 | *

53 | * This accessor method returns a reference to the live list, 54 | * not a snapshot. Therefore any modification you make to the 55 | * returned list will be present inside the JAXB object. 56 | * This is why there is not a set method for the courseDetails property. 57 | * 58 | *

59 | * For example, to add a new item, do as follows: 60 | *

61 |      *    getCourseDetails().add(newItem);
62 |      * 
63 | * 64 | * 65 | *

66 | * Objects of the following type(s) are allowed in the list 67 | * {@link CourseDetails } 68 | * 69 | * 70 | */ 71 | public List getCourseDetails() { 72 | if (courseDetails == null) { 73 | courseDetails = new ArrayList(); 74 | } 75 | return this.courseDetails; 76 | } 77 | 78 | } 79 | -------------------------------------------------------------------------------- /5.soap-web-services/src/main/java/com/in28minutes/courses/GetCourseDetailsRequest.java: -------------------------------------------------------------------------------- 1 | // 2 | // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 3 | // See http://java.sun.com/xml/jaxb 4 | // Any modifications to this file will be lost upon recompilation of the source schema. 5 | // Generated on: 2017.07.30 at 12:41:31 PM IST 6 | // 7 | 8 | 9 | package com.in28minutes.courses; 10 | 11 | import javax.xml.bind.annotation.XmlAccessType; 12 | import javax.xml.bind.annotation.XmlAccessorType; 13 | import javax.xml.bind.annotation.XmlRootElement; 14 | import javax.xml.bind.annotation.XmlType; 15 | 16 | 17 | /** 18 | *

Java class for anonymous complex type. 19 | * 20 | *

The following schema fragment specifies the expected content contained within this class. 21 | * 22 | *

23 |  * <complexType>
24 |  *   <complexContent>
25 |  *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
26 |  *       <sequence>
27 |  *         <element name="id" type="{http://www.w3.org/2001/XMLSchema}int"/>
28 |  *       </sequence>
29 |  *     </restriction>
30 |  *   </complexContent>
31 |  * </complexType>
32 |  * 
33 | * 34 | * 35 | */ 36 | @XmlAccessorType(XmlAccessType.FIELD) 37 | @XmlType(name = "", propOrder = { 38 | "id" 39 | }) 40 | @XmlRootElement(name = "GetCourseDetailsRequest") 41 | public class GetCourseDetailsRequest { 42 | 43 | protected int id; 44 | 45 | /** 46 | * Gets the value of the id property. 47 | * 48 | */ 49 | public int getId() { 50 | return id; 51 | } 52 | 53 | /** 54 | * Sets the value of the id property. 55 | * 56 | */ 57 | public void setId(int value) { 58 | this.id = value; 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /5.soap-web-services/src/main/java/com/in28minutes/courses/GetCourseDetailsResponse.java: -------------------------------------------------------------------------------- 1 | // 2 | // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 3 | // See http://java.sun.com/xml/jaxb 4 | // Any modifications to this file will be lost upon recompilation of the source schema. 5 | // Generated on: 2017.07.30 at 12:41:31 PM IST 6 | // 7 | 8 | 9 | package com.in28minutes.courses; 10 | 11 | import javax.xml.bind.annotation.XmlAccessType; 12 | import javax.xml.bind.annotation.XmlAccessorType; 13 | import javax.xml.bind.annotation.XmlElement; 14 | import javax.xml.bind.annotation.XmlRootElement; 15 | import javax.xml.bind.annotation.XmlType; 16 | 17 | 18 | /** 19 | *

Java class for anonymous complex type. 20 | * 21 | *

The following schema fragment specifies the expected content contained within this class. 22 | * 23 | *

24 |  * <complexType>
25 |  *   <complexContent>
26 |  *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
27 |  *       <sequence>
28 |  *         <element name="CourseDetails" type="{http://in28minutes.com/courses}CourseDetails"/>
29 |  *       </sequence>
30 |  *     </restriction>
31 |  *   </complexContent>
32 |  * </complexType>
33 |  * 
34 | * 35 | * 36 | */ 37 | @XmlAccessorType(XmlAccessType.FIELD) 38 | @XmlType(name = "", propOrder = { 39 | "courseDetails" 40 | }) 41 | @XmlRootElement(name = "GetCourseDetailsResponse") 42 | public class GetCourseDetailsResponse { 43 | 44 | @XmlElement(name = "CourseDetails", required = true) 45 | protected CourseDetails courseDetails; 46 | 47 | /** 48 | * Gets the value of the courseDetails property. 49 | * 50 | * @return 51 | * possible object is 52 | * {@link CourseDetails } 53 | * 54 | */ 55 | public CourseDetails getCourseDetails() { 56 | return courseDetails; 57 | } 58 | 59 | /** 60 | * Sets the value of the courseDetails property. 61 | * 62 | * @param value 63 | * allowed object is 64 | * {@link CourseDetails } 65 | * 66 | */ 67 | public void setCourseDetails(CourseDetails value) { 68 | this.courseDetails = value; 69 | } 70 | 71 | } 72 | -------------------------------------------------------------------------------- /5.soap-web-services/src/main/java/com/in28minutes/courses/ObjectFactory.java: -------------------------------------------------------------------------------- 1 | // 2 | // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 3 | // See http://java.sun.com/xml/jaxb 4 | // Any modifications to this file will be lost upon recompilation of the source schema. 5 | // Generated on: 2017.07.30 at 12:41:31 PM IST 6 | // 7 | 8 | 9 | package com.in28minutes.courses; 10 | 11 | import javax.xml.bind.annotation.XmlRegistry; 12 | 13 | 14 | /** 15 | * This object contains factory methods for each 16 | * Java content interface and Java element interface 17 | * generated in the com.in28minutes.courses package. 18 | *

An ObjectFactory allows you to programatically 19 | * construct new instances of the Java representation 20 | * for XML content. The Java representation of XML 21 | * content can consist of schema derived interfaces 22 | * and classes representing the binding of schema 23 | * type definitions, element declarations and model 24 | * groups. Factory methods for each of these are 25 | * provided in this class. 26 | * 27 | */ 28 | @XmlRegistry 29 | public class ObjectFactory { 30 | 31 | 32 | /** 33 | * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.in28minutes.courses 34 | * 35 | */ 36 | public ObjectFactory() { 37 | } 38 | 39 | /** 40 | * Create an instance of {@link GetAllCourseDetailsResponse } 41 | * 42 | */ 43 | public GetAllCourseDetailsResponse createGetAllCourseDetailsResponse() { 44 | return new GetAllCourseDetailsResponse(); 45 | } 46 | 47 | /** 48 | * Create an instance of {@link CourseDetails } 49 | * 50 | */ 51 | public CourseDetails createCourseDetails() { 52 | return new CourseDetails(); 53 | } 54 | 55 | /** 56 | * Create an instance of {@link GetAllCourseDetailsRequest } 57 | * 58 | */ 59 | public GetAllCourseDetailsRequest createGetAllCourseDetailsRequest() { 60 | return new GetAllCourseDetailsRequest(); 61 | } 62 | 63 | /** 64 | * Create an instance of {@link DeleteCourseDetailsRequest } 65 | * 66 | */ 67 | public DeleteCourseDetailsRequest createDeleteCourseDetailsRequest() { 68 | return new DeleteCourseDetailsRequest(); 69 | } 70 | 71 | /** 72 | * Create an instance of {@link GetCourseDetailsRequest } 73 | * 74 | */ 75 | public GetCourseDetailsRequest createGetCourseDetailsRequest() { 76 | return new GetCourseDetailsRequest(); 77 | } 78 | 79 | /** 80 | * Create an instance of {@link DeleteCourseDetailsResponse } 81 | * 82 | */ 83 | public DeleteCourseDetailsResponse createDeleteCourseDetailsResponse() { 84 | return new DeleteCourseDetailsResponse(); 85 | } 86 | 87 | /** 88 | * Create an instance of {@link GetCourseDetailsResponse } 89 | * 90 | */ 91 | public GetCourseDetailsResponse createGetCourseDetailsResponse() { 92 | return new GetCourseDetailsResponse(); 93 | } 94 | 95 | } 96 | -------------------------------------------------------------------------------- /5.soap-web-services/src/main/java/com/in28minutes/courses/Status.java: -------------------------------------------------------------------------------- 1 | // 2 | // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 3 | // See http://java.sun.com/xml/jaxb 4 | // Any modifications to this file will be lost upon recompilation of the source schema. 5 | // Generated on: 2017.07.30 at 12:41:31 PM IST 6 | // 7 | 8 | 9 | package com.in28minutes.courses; 10 | 11 | import javax.xml.bind.annotation.XmlEnum; 12 | import javax.xml.bind.annotation.XmlType; 13 | 14 | 15 | /** 16 | *

Java class for Status. 17 | * 18 | *

The following schema fragment specifies the expected content contained within this class. 19 | *

20 | *

21 |  * <simpleType name="Status">
22 |  *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
23 |  *     <enumeration value="SUCCESS"/>
24 |  *     <enumeration value="FAILURE"/>
25 |  *   </restriction>
26 |  * </simpleType>
27 |  * 
28 | * 29 | */ 30 | @XmlType(name = "Status") 31 | @XmlEnum 32 | public enum Status { 33 | 34 | SUCCESS, 35 | FAILURE; 36 | 37 | public String value() { 38 | return name(); 39 | } 40 | 41 | public static Status fromValue(String v) { 42 | return valueOf(v); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /5.soap-web-services/src/main/java/com/in28minutes/courses/package-info.java: -------------------------------------------------------------------------------- 1 | // 2 | // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 3 | // See http://java.sun.com/xml/jaxb 4 | // Any modifications to this file will be lost upon recompilation of the source schema. 5 | // Generated on: 2017.07.30 at 12:41:31 PM IST 6 | // 7 | 8 | @javax.xml.bind.annotation.XmlSchema(namespace = "http://in28minutes.com/courses", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) 9 | package com.in28minutes.courses; 10 | -------------------------------------------------------------------------------- /5.soap-web-services/src/main/java/com/in28minutes/soap/webservices/soapcoursemanagement/SoapCourseManagementApplication.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.soap.webservices.soapcoursemanagement; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SoapCourseManagementApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SoapCourseManagementApplication.class, args); 11 | } 12 | } -------------------------------------------------------------------------------- /5.soap-web-services/src/main/java/com/in28minutes/soap/webservices/soapcoursemanagement/soap/CourseDetailsEndpoint.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.soap.webservices.soapcoursemanagement.soap; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.ws.server.endpoint.annotation.Endpoint; 7 | import org.springframework.ws.server.endpoint.annotation.PayloadRoot; 8 | import org.springframework.ws.server.endpoint.annotation.RequestPayload; 9 | import org.springframework.ws.server.endpoint.annotation.ResponsePayload; 10 | 11 | import com.in28minutes.courses.CourseDetails; 12 | import com.in28minutes.courses.DeleteCourseDetailsRequest; 13 | import com.in28minutes.courses.DeleteCourseDetailsResponse; 14 | import com.in28minutes.courses.GetAllCourseDetailsRequest; 15 | import com.in28minutes.courses.GetAllCourseDetailsResponse; 16 | import com.in28minutes.courses.GetCourseDetailsRequest; 17 | import com.in28minutes.courses.GetCourseDetailsResponse; 18 | import com.in28minutes.soap.webservices.soapcoursemanagement.soap.bean.Course; 19 | import com.in28minutes.soap.webservices.soapcoursemanagement.soap.exception.CourseNotFoundException; 20 | import com.in28minutes.soap.webservices.soapcoursemanagement.soap.service.CourseDetailsService; 21 | import com.in28minutes.soap.webservices.soapcoursemanagement.soap.service.CourseDetailsService.Status; 22 | 23 | @Endpoint 24 | public class CourseDetailsEndpoint { 25 | 26 | @Autowired 27 | CourseDetailsService service; 28 | 29 | // method 30 | // input - GetCourseDetailsRequest 31 | // output - GetCourseDetailsResponse 32 | 33 | // http://in28minutes.com/courses 34 | // GetCourseDetailsRequest 35 | @PayloadRoot(namespace = "http://in28minutes.com/courses", localPart = "GetCourseDetailsRequest") 36 | @ResponsePayload 37 | public GetCourseDetailsResponse processCourseDetailsRequest(@RequestPayload GetCourseDetailsRequest request) { 38 | 39 | Course course = service.findById(request.getId()); 40 | 41 | if (course == null) 42 | throw new CourseNotFoundException("Invalid Course Id " + request.getId()); 43 | 44 | return mapCourseDetails(course); 45 | } 46 | 47 | private GetCourseDetailsResponse mapCourseDetails(Course course) { 48 | GetCourseDetailsResponse response = new GetCourseDetailsResponse(); 49 | response.setCourseDetails(mapCourse(course)); 50 | return response; 51 | } 52 | 53 | private GetAllCourseDetailsResponse mapAllCourseDetails(List courses) { 54 | GetAllCourseDetailsResponse response = new GetAllCourseDetailsResponse(); 55 | for (Course course : courses) { 56 | CourseDetails mapCourse = mapCourse(course); 57 | response.getCourseDetails().add(mapCourse); 58 | } 59 | return response; 60 | } 61 | 62 | private CourseDetails mapCourse(Course course) { 63 | CourseDetails courseDetails = new CourseDetails(); 64 | 65 | courseDetails.setId(course.getId()); 66 | 67 | courseDetails.setName(course.getName()); 68 | 69 | courseDetails.setDescription(course.getDescription()); 70 | return courseDetails; 71 | } 72 | 73 | @PayloadRoot(namespace = "http://in28minutes.com/courses", localPart = "GetAllCourseDetailsRequest") 74 | @ResponsePayload 75 | public GetAllCourseDetailsResponse processAllCourseDetailsRequest( 76 | @RequestPayload GetAllCourseDetailsRequest request) { 77 | 78 | List courses = service.findAll(); 79 | 80 | return mapAllCourseDetails(courses); 81 | } 82 | 83 | @PayloadRoot(namespace = "http://in28minutes.com/courses", localPart = "DeleteCourseDetailsRequest") 84 | @ResponsePayload 85 | public DeleteCourseDetailsResponse deleteCourseDetailsRequest(@RequestPayload DeleteCourseDetailsRequest request) { 86 | 87 | Status status = service.deleteById(request.getId()); 88 | 89 | DeleteCourseDetailsResponse response = new DeleteCourseDetailsResponse(); 90 | response.setStatus(mapStatus(status)); 91 | 92 | return response; 93 | } 94 | 95 | private com.in28minutes.courses.Status mapStatus(Status status) { 96 | if (status == Status.FAILURE) 97 | return com.in28minutes.courses.Status.FAILURE; 98 | return com.in28minutes.courses.Status.SUCCESS; 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /5.soap-web-services/src/main/java/com/in28minutes/soap/webservices/soapcoursemanagement/soap/WebServiceConfig.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.soap.webservices.soapcoursemanagement.soap; 2 | 3 | import java.util.Collections; 4 | import java.util.List; 5 | 6 | import org.springframework.boot.web.servlet.ServletRegistrationBean; 7 | import org.springframework.context.ApplicationContext; 8 | import org.springframework.context.annotation.Bean; 9 | import org.springframework.context.annotation.Configuration; 10 | import org.springframework.core.io.ClassPathResource; 11 | import org.springframework.ws.config.annotation.EnableWs; 12 | import org.springframework.ws.config.annotation.WsConfigurerAdapter; 13 | import org.springframework.ws.server.EndpointInterceptor; 14 | import org.springframework.ws.soap.security.xwss.XwsSecurityInterceptor; 15 | import org.springframework.ws.soap.security.xwss.callback.SimplePasswordValidationCallbackHandler; 16 | import org.springframework.ws.transport.http.MessageDispatcherServlet; 17 | import org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition; 18 | import org.springframework.xml.xsd.SimpleXsdSchema; 19 | import org.springframework.xml.xsd.XsdSchema; 20 | 21 | //Enable Spring Web Services 22 | @EnableWs 23 | // Spring Configuration 24 | @Configuration 25 | public class WebServiceConfig extends WsConfigurerAdapter{ 26 | // MessageDispatcherServlet 27 | // ApplicationContext 28 | // url -> /ws/* 29 | 30 | @Bean 31 | public ServletRegistrationBean messageDispatcherServlet(ApplicationContext context) { 32 | MessageDispatcherServlet messageDispatcherServlet = new MessageDispatcherServlet(); 33 | messageDispatcherServlet.setApplicationContext(context); 34 | messageDispatcherServlet.setTransformWsdlLocations(true); 35 | return new ServletRegistrationBean(messageDispatcherServlet, "/ws/*"); 36 | } 37 | 38 | // /ws/courses.wsdl 39 | // course-details.xsd 40 | @Bean(name = "courses") 41 | public DefaultWsdl11Definition defaultWsdl11Definition(XsdSchema coursesSchema) { 42 | DefaultWsdl11Definition definition = new DefaultWsdl11Definition(); 43 | definition.setPortTypeName("CoursePort"); 44 | definition.setTargetNamespace("http://in28minutes.com/courses"); 45 | definition.setLocationUri("/ws"); 46 | definition.setSchema(coursesSchema); 47 | return definition; 48 | } 49 | 50 | @Bean 51 | public XsdSchema coursesSchema() { 52 | return new SimpleXsdSchema(new ClassPathResource("course-details.xsd")); 53 | } 54 | 55 | 56 | //XwsSecurityInterceptor 57 | @Bean 58 | public XwsSecurityInterceptor securityInterceptor(){ 59 | XwsSecurityInterceptor securityInterceptor = new XwsSecurityInterceptor(); 60 | //Callback Handler -> SimplePasswordValidationCallbackHandler 61 | securityInterceptor.setCallbackHandler(callbackHandler()); 62 | //Security Policy -> securityPolicy.xml 63 | securityInterceptor.setPolicyConfiguration(new ClassPathResource("securityPolicy.xml")); 64 | return securityInterceptor; 65 | } 66 | 67 | @Bean 68 | public SimplePasswordValidationCallbackHandler callbackHandler() { 69 | SimplePasswordValidationCallbackHandler handler = new SimplePasswordValidationCallbackHandler(); 70 | handler.setUsersMap(Collections.singletonMap("user", "password")); 71 | return handler; 72 | } 73 | 74 | //Interceptors.add -> XwsSecurityInterceptor 75 | @Override 76 | public void addInterceptors(List interceptors) { 77 | interceptors.add(securityInterceptor()); 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /5.soap-web-services/src/main/java/com/in28minutes/soap/webservices/soapcoursemanagement/soap/bean/Course.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.soap.webservices.soapcoursemanagement.soap.bean; 2 | 3 | public class Course { 4 | private int id; 5 | private String name; 6 | private String description; 7 | 8 | public Course(int id, String name, String description) { 9 | super(); 10 | this.id = id; 11 | this.name = name; 12 | this.description = description; 13 | } 14 | 15 | public int getId() { 16 | return id; 17 | } 18 | 19 | public void setId(int id) { 20 | this.id = id; 21 | } 22 | 23 | public String getName() { 24 | return name; 25 | } 26 | 27 | public void setName(String name) { 28 | this.name = name; 29 | } 30 | 31 | public String getDescription() { 32 | return description; 33 | } 34 | 35 | public void setDescription(String description) { 36 | this.description = description; 37 | } 38 | 39 | @Override 40 | public String toString() { 41 | return String.format("Course [id=%s, name=%s, description=%s]", id, name, description); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /5.soap-web-services/src/main/java/com/in28minutes/soap/webservices/soapcoursemanagement/soap/exception/CourseNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.soap.webservices.soapcoursemanagement.soap.exception; 2 | 3 | import org.springframework.ws.soap.server.endpoint.annotation.FaultCode; 4 | import org.springframework.ws.soap.server.endpoint.annotation.SoapFault; 5 | 6 | @SoapFault(faultCode = FaultCode.CUSTOM, customFaultCode = "{http://in28minutes.com/courses}001_COURSE_NOT_FOUND") 7 | public class CourseNotFoundException extends RuntimeException { 8 | 9 | private static final long serialVersionUID = 3518170101751491969L; 10 | 11 | public CourseNotFoundException(String message) { 12 | super(message); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /5.soap-web-services/src/main/java/com/in28minutes/soap/webservices/soapcoursemanagement/soap/service/CourseDetailsService.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.soap.webservices.soapcoursemanagement.soap.service; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Iterator; 5 | import java.util.List; 6 | 7 | import org.springframework.stereotype.Component; 8 | 9 | import com.in28minutes.soap.webservices.soapcoursemanagement.soap.bean.Course; 10 | 11 | @Component 12 | public class CourseDetailsService { 13 | 14 | public enum Status { 15 | SUCCESS, FAILURE; 16 | } 17 | 18 | private static List courses = new ArrayList<>(); 19 | 20 | static { 21 | Course course1 = new Course(1, "Spring", "10 Steps"); 22 | courses.add(course1); 23 | 24 | Course course2 = new Course(2, "Spring MVC", "10 Examples"); 25 | courses.add(course2); 26 | 27 | Course course3 = new Course(3, "Spring Boot", "6K Students"); 28 | courses.add(course3); 29 | 30 | Course course4 = new Course(4, "Maven", "Most popular maven course on internet!"); 31 | courses.add(course4); 32 | } 33 | 34 | // course - 1 35 | public Course findById(int id) { 36 | for (Course course : courses) { 37 | if (course.getId() == id) 38 | return course; 39 | } 40 | return null; 41 | } 42 | 43 | // courses 44 | public List findAll() { 45 | return courses; 46 | } 47 | 48 | public Status deleteById(int id) { 49 | Iterator iterator = courses.iterator(); 50 | while (iterator.hasNext()) { 51 | Course course = iterator.next(); 52 | if (course.getId() == id) { 53 | iterator.remove(); 54 | return Status.SUCCESS; 55 | } 56 | } 57 | return Status.FAILURE; 58 | } 59 | 60 | // updating course & new course 61 | } 62 | -------------------------------------------------------------------------------- /5.soap-web-services/src/main/resources/application.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/5.soap-web-services/src/main/resources/application.properties -------------------------------------------------------------------------------- /5.soap-web-services/src/main/resources/course-details.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /5.soap-web-services/src/main/resources/securityPolicy.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | -------------------------------------------------------------------------------- /5.soap-web-services/src/test/java/com/in28minutes/soap/webservices/soapcoursemanagement/SoapCourseManagementApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.soap.webservices.soapcoursemanagement; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SoapCourseManagementApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /6.restful-web-services/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.in28minutes.rest.webservices 7 | restful-web-services 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | restful-web-services 12 | Demo project for Spring Boot 13 | 14 | 15 | org.springframework.boot 16 | spring-boot-starter-parent 17 | 2.0.0.RELEASE 18 | 19 | 20 | 21 | 22 | UTF-8 23 | UTF-8 24 | 1.8 25 | 26 | 27 | 28 | 29 | 30 | org.springframework.boot 31 | spring-boot-starter-data-jpa 32 | 33 | 34 | 35 | org.springframework.boot 36 | spring-boot-starter-web 37 | 38 | 39 | 43 | 44 | 45 | org.springframework.boot 46 | spring-boot-starter-actuator 47 | 48 | 49 | 50 | org.springframework.data 51 | spring-data-rest-hal-browser 52 | 53 | 54 | 55 | 56 | org.springframework.boot 57 | spring-boot-starter-hateoas 58 | 59 | 60 | 61 | com.fasterxml.jackson.dataformat 62 | jackson-dataformat-xml 63 | 64 | 65 | 66 | io.springfox 67 | springfox-swagger2 68 | 2.4.0 69 | 70 | 71 | 72 | io.springfox 73 | springfox-swagger-ui 74 | 2.4.0 75 | 76 | 77 | 78 | org.springframework.boot 79 | spring-boot-devtools 80 | runtime 81 | 82 | 83 | 84 | com.h2database 85 | h2 86 | runtime 87 | 88 | 89 | 90 | org.springframework.boot 91 | spring-boot-starter-test 92 | test 93 | 94 | 95 | 96 | 97 | 98 | 99 | org.springframework.boot 100 | spring-boot-maven-plugin 101 | 102 | 103 | 104 | 105 | 106 | 107 | spring-snapshots 108 | Spring Snapshots 109 | https://repo.spring.io/snapshot 110 | 111 | true 112 | 113 | 114 | 115 | spring-milestones 116 | Spring Milestones 117 | https://repo.spring.io/milestone 118 | 119 | false 120 | 121 | 122 | 123 | 124 | 125 | 126 | spring-snapshots 127 | Spring Snapshots 128 | https://repo.spring.io/snapshot 129 | 130 | true 131 | 132 | 133 | 134 | spring-milestones 135 | Spring Milestones 136 | https://repo.spring.io/milestone 137 | 138 | false 139 | 140 | 141 | 142 | 143 | 144 | 145 | -------------------------------------------------------------------------------- /6.restful-web-services/readme.md: -------------------------------------------------------------------------------- 1 | # How to run this 2 | - Choose the Spring Boot Application file (search for file with @SpringBootApplication) 3 | - Right Click on the file and Run as Java Application 4 | - You are all Set 5 | 6 | -------------------------------------------------------------------------------- /6.restful-web-services/src/main/java/com/in28minutes/rest/webservices/restfulwebservices/RestfulWebServicesApplication.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.rest.webservices.restfulwebservices; 2 | 3 | import java.util.Locale; 4 | 5 | import org.springframework.boot.SpringApplication; 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; 7 | import org.springframework.context.annotation.Bean; 8 | import org.springframework.web.servlet.LocaleResolver; 9 | import org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver; 10 | 11 | @SpringBootApplication 12 | public class RestfulWebServicesApplication { 13 | 14 | public static void main(String[] args) { 15 | SpringApplication.run(RestfulWebServicesApplication.class, args); 16 | } 17 | 18 | @Bean 19 | public LocaleResolver localeResolver() { 20 | AcceptHeaderLocaleResolver localeResolver = new AcceptHeaderLocaleResolver(); 21 | localeResolver.setDefaultLocale(Locale.US); 22 | return localeResolver; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /6.restful-web-services/src/main/java/com/in28minutes/rest/webservices/restfulwebservices/SwaggerConfig.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.rest.webservices.restfulwebservices; 2 | 3 | import java.util.Arrays; 4 | import java.util.HashSet; 5 | import java.util.Set; 6 | 7 | import org.springframework.context.annotation.Bean; 8 | import org.springframework.context.annotation.Configuration; 9 | 10 | import springfox.documentation.service.ApiInfo; 11 | import springfox.documentation.service.Contact; 12 | import springfox.documentation.spi.DocumentationType; 13 | import springfox.documentation.spring.web.plugins.Docket; 14 | import springfox.documentation.swagger2.annotations.EnableSwagger2; 15 | 16 | @Configuration 17 | @EnableSwagger2 18 | public class SwaggerConfig { 19 | 20 | public static final Contact DEFAULT_CONTACT = new Contact( 21 | "Ranga Karanam", "http://www.in28minutes.com", "in28minutes@gmail.com"); 22 | 23 | public static final ApiInfo DEFAULT_API_INFO = new ApiInfo( 24 | "Awesome API Title", "Awesome API Description", "1.0", 25 | "urn:tos", DEFAULT_CONTACT, 26 | "Apache 2.0", "http://www.apache.org/licenses/LICENSE-2.0"); 27 | 28 | private static final Set DEFAULT_PRODUCES_AND_CONSUMES = 29 | new HashSet(Arrays.asList("application/json", 30 | "application/xml")); 31 | 32 | @Bean 33 | public Docket api() { 34 | return new Docket(DocumentationType.SWAGGER_2) 35 | .apiInfo(DEFAULT_API_INFO) 36 | .produces(DEFAULT_PRODUCES_AND_CONSUMES) 37 | .consumes(DEFAULT_PRODUCES_AND_CONSUMES); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /6.restful-web-services/src/main/java/com/in28minutes/rest/webservices/restfulwebservices/exception/CustomizedResponseEntityExceptionHandler.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.rest.webservices.restfulwebservices.exception; 2 | 3 | import java.util.Date; 4 | 5 | import org.springframework.http.HttpHeaders; 6 | import org.springframework.http.HttpStatus; 7 | import org.springframework.http.ResponseEntity; 8 | import org.springframework.web.bind.MethodArgumentNotValidException; 9 | import org.springframework.web.bind.annotation.ControllerAdvice; 10 | import org.springframework.web.bind.annotation.ExceptionHandler; 11 | import org.springframework.web.bind.annotation.RestController; 12 | import org.springframework.web.context.request.WebRequest; 13 | import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler; 14 | 15 | import com.in28minutes.rest.webservices.restfulwebservices.user.UserNotFoundException; 16 | 17 | @ControllerAdvice 18 | @RestController 19 | public class CustomizedResponseEntityExceptionHandler extends ResponseEntityExceptionHandler { 20 | 21 | @ExceptionHandler(Exception.class) 22 | public final ResponseEntity handleAllExceptions(Exception ex, WebRequest request) { 23 | ExceptionResponse exceptionResponse = new ExceptionResponse(new Date(), ex.getMessage(), 24 | request.getDescription(false)); 25 | return new ResponseEntity(exceptionResponse, HttpStatus.INTERNAL_SERVER_ERROR); 26 | } 27 | 28 | @ExceptionHandler(UserNotFoundException.class) 29 | public final ResponseEntity handleUserNotFoundException(UserNotFoundException ex, WebRequest request) { 30 | ExceptionResponse exceptionResponse = new ExceptionResponse(new Date(), ex.getMessage(), 31 | request.getDescription(false)); 32 | return new ResponseEntity(exceptionResponse, HttpStatus.NOT_FOUND); 33 | } 34 | 35 | @Override 36 | protected ResponseEntity handleMethodArgumentNotValid(MethodArgumentNotValidException ex, 37 | HttpHeaders headers, HttpStatus status, WebRequest request) { 38 | ExceptionResponse exceptionResponse = new ExceptionResponse(new Date(), "Validation Failed", 39 | ex.getBindingResult().toString()); 40 | return new ResponseEntity(exceptionResponse, HttpStatus.BAD_REQUEST); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /6.restful-web-services/src/main/java/com/in28minutes/rest/webservices/restfulwebservices/exception/ExceptionResponse.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.rest.webservices.restfulwebservices.exception; 2 | 3 | import java.util.Date; 4 | 5 | public class ExceptionResponse { 6 | private Date timestamp; 7 | private String message; 8 | private String details; 9 | 10 | public ExceptionResponse(Date timestamp, String message, String details) { 11 | super(); 12 | this.timestamp = timestamp; 13 | this.message = message; 14 | this.details = details; 15 | } 16 | 17 | public Date getTimestamp() { 18 | return timestamp; 19 | } 20 | 21 | public String getMessage() { 22 | return message; 23 | } 24 | 25 | public String getDetails() { 26 | return details; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /6.restful-web-services/src/main/java/com/in28minutes/rest/webservices/restfulwebservices/filtering/FilteringController.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.rest.webservices.restfulwebservices.filtering; 2 | 3 | import java.util.Arrays; 4 | import java.util.List; 5 | 6 | import org.springframework.http.converter.json.MappingJacksonValue; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.RestController; 9 | 10 | import com.fasterxml.jackson.databind.ser.FilterProvider; 11 | import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter; 12 | import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider; 13 | 14 | @RestController 15 | public class FilteringController { 16 | 17 | // field1,field2 18 | @GetMapping("/filtering") 19 | public MappingJacksonValue retrieveSomeBean() { 20 | SomeBean someBean = new SomeBean("value1", "value2", "value3"); 21 | 22 | SimpleBeanPropertyFilter filter = SimpleBeanPropertyFilter.filterOutAllExcept("field1", "field2"); 23 | 24 | FilterProvider filters = new SimpleFilterProvider().addFilter("SomeBeanFilter", filter); 25 | 26 | MappingJacksonValue mapping = new MappingJacksonValue(someBean); 27 | 28 | mapping.setFilters(filters); 29 | 30 | return mapping; 31 | } 32 | 33 | // field2, field3 34 | @GetMapping("/filtering-list") 35 | public MappingJacksonValue retrieveListOfSomeBeans() { 36 | List list = Arrays.asList(new SomeBean("value1", "value2", "value3"), 37 | new SomeBean("value12", "value22", "value32")); 38 | 39 | SimpleBeanPropertyFilter filter = SimpleBeanPropertyFilter.filterOutAllExcept("field2", "field3"); 40 | 41 | FilterProvider filters = new SimpleFilterProvider().addFilter("SomeBeanFilter", filter); 42 | 43 | MappingJacksonValue mapping = new MappingJacksonValue(list); 44 | 45 | mapping.setFilters(filters); 46 | 47 | return mapping; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /6.restful-web-services/src/main/java/com/in28minutes/rest/webservices/restfulwebservices/filtering/SomeBean.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.rest.webservices.restfulwebservices.filtering; 2 | 3 | import com.fasterxml.jackson.annotation.JsonFilter; 4 | 5 | @JsonFilter("SomeBeanFilter") 6 | public class SomeBean { 7 | 8 | private String field1; 9 | 10 | private String field2; 11 | 12 | private String field3; 13 | 14 | public SomeBean(String field1, String field2, String field3) { 15 | super(); 16 | this.field1 = field1; 17 | this.field2 = field2; 18 | this.field3 = field3; 19 | } 20 | 21 | public String getField1() { 22 | return field1; 23 | } 24 | 25 | public void setField1(String field1) { 26 | this.field1 = field1; 27 | } 28 | 29 | public String getField2() { 30 | return field2; 31 | } 32 | 33 | public void setField2(String field2) { 34 | this.field2 = field2; 35 | } 36 | 37 | public String getField3() { 38 | return field3; 39 | } 40 | 41 | public void setField3(String field3) { 42 | this.field3 = field3; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /6.restful-web-services/src/main/java/com/in28minutes/rest/webservices/restfulwebservices/helloworld/HelloWorldBean.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.rest.webservices.restfulwebservices.helloworld; 2 | 3 | public class HelloWorldBean { 4 | 5 | private String message; 6 | 7 | public HelloWorldBean(String message) { 8 | this.message = message; 9 | } 10 | 11 | public String getMessage() { 12 | return message; 13 | } 14 | 15 | public void setMessage(String message) { 16 | this.message = message; 17 | } 18 | 19 | @Override 20 | public String toString() { 21 | return String.format("HelloWorldBean [message=%s]", message); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /6.restful-web-services/src/main/java/com/in28minutes/rest/webservices/restfulwebservices/helloworld/HelloWorldController.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.rest.webservices.restfulwebservices.helloworld; 2 | 3 | import java.util.Locale; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.context.MessageSource; 7 | import org.springframework.context.i18n.LocaleContextHolder; 8 | import org.springframework.web.bind.annotation.GetMapping; 9 | import org.springframework.web.bind.annotation.PathVariable; 10 | import org.springframework.web.bind.annotation.RequestHeader; 11 | import org.springframework.web.bind.annotation.RestController; 12 | 13 | //Controller 14 | @RestController 15 | public class HelloWorldController { 16 | 17 | @Autowired 18 | private MessageSource messageSource; 19 | 20 | @GetMapping(path = "/hello-world") 21 | public String helloWorld() { 22 | return "Hello World"; 23 | } 24 | 25 | @GetMapping(path = "/hello-world-bean") 26 | public HelloWorldBean helloWorldBean() { 27 | return new HelloWorldBean("Hello World"); 28 | } 29 | 30 | ///hello-world/path-variable/in28minutes 31 | @GetMapping(path = "/hello-world/path-variable/{name}") 32 | public HelloWorldBean helloWorldPathVariable(@PathVariable String name) { 33 | return new HelloWorldBean(String.format("Hello World, %s", name)); 34 | } 35 | 36 | @GetMapping(path = "/hello-world-internationalized") 37 | public String helloWorldInternationalized() { 38 | return messageSource.getMessage("good.morning.message", null, 39 | LocaleContextHolder.getLocale()); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /6.restful-web-services/src/main/java/com/in28minutes/rest/webservices/restfulwebservices/user/Post.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.rest.webservices.restfulwebservices.user; 2 | 3 | import javax.persistence.Entity; 4 | import javax.persistence.FetchType; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.Id; 7 | import javax.persistence.ManyToOne; 8 | 9 | import com.fasterxml.jackson.annotation.JsonIgnore; 10 | 11 | @Entity 12 | public class Post { 13 | 14 | @Id 15 | @GeneratedValue 16 | private Integer id; 17 | private String description; 18 | 19 | @ManyToOne(fetch=FetchType.LAZY) 20 | @JsonIgnore 21 | private User user; 22 | 23 | public Integer getId() { 24 | return id; 25 | } 26 | 27 | public void setId(Integer id) { 28 | this.id = id; 29 | } 30 | 31 | public String getDescription() { 32 | return description; 33 | } 34 | 35 | public void setDescription(String description) { 36 | this.description = description; 37 | } 38 | 39 | public User getUser() { 40 | return user; 41 | } 42 | 43 | public void setUser(User user) { 44 | this.user = user; 45 | } 46 | 47 | @Override 48 | public String toString() { 49 | return String.format("Post [id=%s, description=%s]", id, description); 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /6.restful-web-services/src/main/java/com/in28minutes/rest/webservices/restfulwebservices/user/PostRepository.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.rest.webservices.restfulwebservices.user; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | import org.springframework.stereotype.Repository; 5 | 6 | @Repository 7 | public interface PostRepository extends JpaRepository{ 8 | 9 | } 10 | -------------------------------------------------------------------------------- /6.restful-web-services/src/main/java/com/in28minutes/rest/webservices/restfulwebservices/user/User.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.rest.webservices.restfulwebservices.user; 2 | 3 | import java.util.Date; 4 | import java.util.List; 5 | 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.Id; 9 | import javax.persistence.OneToMany; 10 | import javax.validation.constraints.Past; 11 | import javax.validation.constraints.Size; 12 | 13 | import io.swagger.annotations.ApiModel; 14 | import io.swagger.annotations.ApiModelProperty; 15 | 16 | @ApiModel(description="All details about the user.") 17 | @Entity 18 | public class User { 19 | 20 | @Id 21 | @GeneratedValue 22 | private Integer id; 23 | 24 | @Size(min=2, message="Name should have atleast 2 characters") 25 | @ApiModelProperty(notes="Name should have atleast 2 characters") 26 | private String name; 27 | 28 | @Past 29 | @ApiModelProperty(notes="Birth date should be in the past") 30 | private Date birthDate; 31 | 32 | @OneToMany(mappedBy="user") 33 | private List posts; 34 | 35 | protected User() { 36 | 37 | } 38 | 39 | public User(Integer id, String name, Date birthDate) { 40 | super(); 41 | this.id = id; 42 | this.name = name; 43 | this.birthDate = birthDate; 44 | } 45 | 46 | public Integer getId() { 47 | return id; 48 | } 49 | 50 | public void setId(Integer id) { 51 | this.id = id; 52 | } 53 | 54 | public String getName() { 55 | return name; 56 | } 57 | 58 | public void setName(String name) { 59 | this.name = name; 60 | } 61 | 62 | public Date getBirthDate() { 63 | return birthDate; 64 | } 65 | 66 | public void setBirthDate(Date birthDate) { 67 | this.birthDate = birthDate; 68 | } 69 | 70 | public List getPosts() { 71 | return posts; 72 | } 73 | 74 | public void setPosts(List posts) { 75 | this.posts = posts; 76 | } 77 | 78 | @Override 79 | public String toString() { 80 | return String.format("User [id=%s, name=%s, birthDate=%s]", id, name, birthDate); 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /6.restful-web-services/src/main/java/com/in28minutes/rest/webservices/restfulwebservices/user/UserDaoService.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.rest.webservices.restfulwebservices.user; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Date; 5 | import java.util.Iterator; 6 | import java.util.List; 7 | 8 | import org.springframework.stereotype.Component; 9 | 10 | @Component 11 | public class UserDaoService { 12 | 13 | private static List users = new ArrayList<>(); 14 | 15 | private static int usersCount = 3; 16 | 17 | static { 18 | users.add(new User(1, "Adam", new Date())); 19 | users.add(new User(2, "Eve", new Date())); 20 | users.add(new User(3, "Jack", new Date())); 21 | } 22 | 23 | public List findAll() { 24 | return users; 25 | } 26 | 27 | public User save(User user) { 28 | if (user.getId() == null) { 29 | user.setId(++usersCount); 30 | } 31 | users.add(user); 32 | return user; 33 | } 34 | 35 | public User findOne(int id) { 36 | for (User user : users) { 37 | if (user.getId() == id) { 38 | return user; 39 | } 40 | } 41 | return null; 42 | } 43 | 44 | public User deleteById(int id) { 45 | Iterator iterator = users.iterator(); 46 | while (iterator.hasNext()) { 47 | User user = iterator.next(); 48 | if (user.getId() == id) { 49 | iterator.remove(); 50 | return user; 51 | } 52 | } 53 | return null; 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /6.restful-web-services/src/main/java/com/in28minutes/rest/webservices/restfulwebservices/user/UserJPAResource.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.rest.webservices.restfulwebservices.user; 2 | 3 | import static org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo; 4 | import static org.springframework.hateoas.mvc.ControllerLinkBuilder.methodOn; 5 | 6 | import java.net.URI; 7 | import java.util.List; 8 | import java.util.Optional; 9 | 10 | import javax.validation.Valid; 11 | 12 | import org.springframework.beans.factory.annotation.Autowired; 13 | import org.springframework.hateoas.Resource; 14 | import org.springframework.hateoas.mvc.ControllerLinkBuilder; 15 | import org.springframework.http.ResponseEntity; 16 | import org.springframework.web.bind.annotation.DeleteMapping; 17 | import org.springframework.web.bind.annotation.GetMapping; 18 | import org.springframework.web.bind.annotation.PathVariable; 19 | import org.springframework.web.bind.annotation.PostMapping; 20 | import org.springframework.web.bind.annotation.RequestBody; 21 | import org.springframework.web.bind.annotation.RestController; 22 | import org.springframework.web.servlet.support.ServletUriComponentsBuilder; 23 | 24 | @RestController 25 | public class UserJPAResource { 26 | 27 | @Autowired 28 | private UserRepository userRepository; 29 | 30 | @Autowired 31 | private PostRepository postRepository; 32 | 33 | @GetMapping("/jpa/users") 34 | public List retrieveAllUsers() { 35 | return userRepository.findAll(); 36 | } 37 | 38 | @GetMapping("/jpa/users/{id}") 39 | public Resource retrieveUser(@PathVariable int id) { 40 | Optional user = userRepository.findById(id); 41 | 42 | if (!user.isPresent()) 43 | throw new UserNotFoundException("id-" + id); 44 | 45 | // "all-users", SERVER_PATH + "/users" 46 | // retrieveAllUsers 47 | Resource resource = new Resource(user.get()); 48 | 49 | ControllerLinkBuilder linkTo = linkTo(methodOn(this.getClass()).retrieveAllUsers()); 50 | 51 | resource.add(linkTo.withRel("all-users")); 52 | 53 | // HATEOAS 54 | 55 | return resource; 56 | } 57 | 58 | @DeleteMapping("/jpa/users/{id}") 59 | public void deleteUser(@PathVariable int id) { 60 | userRepository.deleteById(id); 61 | } 62 | 63 | // 64 | // input - details of user 65 | // output - CREATED & Return the created URI 66 | 67 | // HATEOAS 68 | 69 | @PostMapping("/jpa/users") 70 | public ResponseEntity createUser(@Valid @RequestBody User user) { 71 | User savedUser = userRepository.save(user); 72 | 73 | URI location = ServletUriComponentsBuilder.fromCurrentRequest().path("/{id}").buildAndExpand(savedUser.getId()) 74 | .toUri(); 75 | 76 | return ResponseEntity.created(location).build(); 77 | 78 | } 79 | 80 | @GetMapping("/jpa/users/{id}/posts") 81 | public List retrieveAllUsers(@PathVariable int id) { 82 | Optional userOptional = userRepository.findById(id); 83 | 84 | if(!userOptional.isPresent()) { 85 | throw new UserNotFoundException("id-" + id); 86 | } 87 | 88 | return userOptional.get().getPosts(); 89 | } 90 | 91 | 92 | @PostMapping("/jpa/users/{id}/posts") 93 | public ResponseEntity createPost(@PathVariable int id, @RequestBody Post post) { 94 | 95 | Optional userOptional = userRepository.findById(id); 96 | 97 | if(!userOptional.isPresent()) { 98 | throw new UserNotFoundException("id-" + id); 99 | } 100 | 101 | User user = userOptional.get(); 102 | 103 | post.setUser(user); 104 | 105 | postRepository.save(post); 106 | 107 | URI location = ServletUriComponentsBuilder.fromCurrentRequest().path("/{id}").buildAndExpand(post.getId()) 108 | .toUri(); 109 | 110 | return ResponseEntity.created(location).build(); 111 | 112 | } 113 | 114 | } 115 | -------------------------------------------------------------------------------- /6.restful-web-services/src/main/java/com/in28minutes/rest/webservices/restfulwebservices/user/UserNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.rest.webservices.restfulwebservices.user; 2 | 3 | import org.springframework.http.HttpStatus; 4 | import org.springframework.web.bind.annotation.ResponseStatus; 5 | 6 | @ResponseStatus(HttpStatus.NOT_FOUND) 7 | public class UserNotFoundException extends RuntimeException { 8 | public UserNotFoundException(String message) { 9 | super(message); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /6.restful-web-services/src/main/java/com/in28minutes/rest/webservices/restfulwebservices/user/UserRepository.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.rest.webservices.restfulwebservices.user; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | import org.springframework.stereotype.Repository; 5 | 6 | @Repository 7 | public interface UserRepository extends JpaRepository{ 8 | 9 | } 10 | -------------------------------------------------------------------------------- /6.restful-web-services/src/main/java/com/in28minutes/rest/webservices/restfulwebservices/user/UserResource.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.rest.webservices.restfulwebservices.user; 2 | 3 | import static org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo; 4 | import static org.springframework.hateoas.mvc.ControllerLinkBuilder.methodOn; 5 | 6 | import java.net.URI; 7 | import java.util.List; 8 | 9 | import javax.validation.Valid; 10 | 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.hateoas.Resource; 13 | import org.springframework.hateoas.mvc.ControllerLinkBuilder; 14 | import org.springframework.http.ResponseEntity; 15 | import org.springframework.web.bind.annotation.DeleteMapping; 16 | import org.springframework.web.bind.annotation.GetMapping; 17 | import org.springframework.web.bind.annotation.PathVariable; 18 | import org.springframework.web.bind.annotation.PostMapping; 19 | import org.springframework.web.bind.annotation.RequestBody; 20 | import org.springframework.web.bind.annotation.RestController; 21 | import org.springframework.web.servlet.support.ServletUriComponentsBuilder; 22 | 23 | @RestController 24 | public class UserResource { 25 | 26 | @Autowired 27 | private UserDaoService service; 28 | 29 | @GetMapping("/users") 30 | public List retrieveAllUsers() { 31 | return service.findAll(); 32 | } 33 | 34 | @GetMapping("/users/{id}") 35 | public Resource retrieveUser(@PathVariable int id) { 36 | User user = service.findOne(id); 37 | 38 | if(user==null) 39 | throw new UserNotFoundException("id-"+ id); 40 | 41 | 42 | //"all-users", SERVER_PATH + "/users" 43 | //retrieveAllUsers 44 | Resource resource = new Resource(user); 45 | 46 | ControllerLinkBuilder linkTo = 47 | linkTo(methodOn(this.getClass()).retrieveAllUsers()); 48 | 49 | resource.add(linkTo.withRel("all-users")); 50 | 51 | //HATEOAS 52 | 53 | return resource; 54 | } 55 | 56 | @DeleteMapping("/users/{id}") 57 | public void deleteUser(@PathVariable int id) { 58 | User user = service.deleteById(id); 59 | 60 | if(user==null) 61 | throw new UserNotFoundException("id-"+ id); 62 | } 63 | 64 | // 65 | // input - details of user 66 | // output - CREATED & Return the created URI 67 | 68 | //HATEOAS 69 | 70 | @PostMapping("/users") 71 | public ResponseEntity createUser(@Valid @RequestBody User user) { 72 | User savedUser = service.save(user); 73 | // CREATED 74 | // /user/{id} savedUser.getId() 75 | 76 | URI location = ServletUriComponentsBuilder 77 | .fromCurrentRequest() 78 | .path("/{id}") 79 | .buildAndExpand(savedUser.getId()).toUri(); 80 | 81 | return ResponseEntity.created(location).build(); 82 | 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /6.restful-web-services/src/main/java/com/in28minutes/rest/webservices/restfulwebservices/versioning/Name.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.rest.webservices.restfulwebservices.versioning; 2 | 3 | public class Name { 4 | private String firstName; 5 | private String lastName; 6 | 7 | public Name() { 8 | } 9 | 10 | public Name(String firstName, String lastName) { 11 | super(); 12 | this.firstName = firstName; 13 | this.lastName = lastName; 14 | } 15 | 16 | public String getFirstName() { 17 | return firstName; 18 | } 19 | 20 | public void setFirstName(String firstName) { 21 | this.firstName = firstName; 22 | } 23 | 24 | public String getLastName() { 25 | return lastName; 26 | } 27 | 28 | public void setLastName(String lastName) { 29 | this.lastName = lastName; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /6.restful-web-services/src/main/java/com/in28minutes/rest/webservices/restfulwebservices/versioning/PersonV1.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.rest.webservices.restfulwebservices.versioning; 2 | 3 | public class PersonV1 { 4 | private String name; 5 | 6 | public PersonV1() { 7 | super(); 8 | } 9 | 10 | public PersonV1(String name) { 11 | super(); 12 | this.name = name; 13 | } 14 | 15 | public String getName() { 16 | return name; 17 | } 18 | 19 | public void setName(String name) { 20 | this.name = name; 21 | } 22 | 23 | 24 | } 25 | -------------------------------------------------------------------------------- /6.restful-web-services/src/main/java/com/in28minutes/rest/webservices/restfulwebservices/versioning/PersonV2.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.rest.webservices.restfulwebservices.versioning; 2 | 3 | public class PersonV2 { 4 | private Name name; 5 | 6 | public PersonV2() { 7 | super(); 8 | } 9 | 10 | public PersonV2(Name name) { 11 | super(); 12 | this.name = name; 13 | } 14 | 15 | public Name getName() { 16 | return name; 17 | } 18 | 19 | public void setName(Name name) { 20 | this.name = name; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /6.restful-web-services/src/main/java/com/in28minutes/rest/webservices/restfulwebservices/versioning/PersonVersioningController.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.rest.webservices.restfulwebservices.versioning; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | @RestController 7 | public class PersonVersioningController { 8 | 9 | @GetMapping("v1/person") 10 | public PersonV1 personV1() { 11 | return new PersonV1("Bob Charlie"); 12 | } 13 | 14 | @GetMapping("v2/person") 15 | public PersonV2 personV2() { 16 | return new PersonV2(new Name("Bob", "Charlie")); 17 | } 18 | 19 | @GetMapping(value = "/person/param", params = "version=1") 20 | public PersonV1 paramV1() { 21 | return new PersonV1("Bob Charlie"); 22 | } 23 | 24 | @GetMapping(value = "/person/param", params = "version=2") 25 | public PersonV2 paramV2() { 26 | return new PersonV2(new Name("Bob", "Charlie")); 27 | } 28 | 29 | @GetMapping(value = "/person/header", headers = "X-API-VERSION=1") 30 | public PersonV1 headerV1() { 31 | return new PersonV1("Bob Charlie"); 32 | } 33 | 34 | @GetMapping(value = "/person/header", headers = "X-API-VERSION=2") 35 | public PersonV2 headerV2() { 36 | return new PersonV2(new Name("Bob", "Charlie")); 37 | } 38 | 39 | @GetMapping(value = "/person/produces", produces = "application/vnd.company.app-v1+json") 40 | public PersonV1 producesV1() { 41 | return new PersonV1("Bob Charlie"); 42 | } 43 | 44 | @GetMapping(value = "/person/produces", produces = "application/vnd.company.app-v2+json") 45 | public PersonV2 producesV2() { 46 | return new PersonV2(new Name("Bob", "Charlie")); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /6.restful-web-services/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | logging.level.org.springframework = info 2 | #This is not really needed as this is the default after 2.0.0.RELEASE 3 | spring.jackson.serialization.write-dates-as-timestamps=false 4 | management.endpoints.web.exposure.include=* 5 | spring.security.user.name=username 6 | spring.security.user.password=password 7 | spring.jpa.show-sql=true 8 | spring.h2.console.enabled=true -------------------------------------------------------------------------------- /6.restful-web-services/src/main/resources/data.sql: -------------------------------------------------------------------------------- 1 | insert into user values(10001, sysdate(), 'AB'); 2 | insert into user values(10002, sysdate(), 'Jill'); 3 | insert into user values(10003, sysdate(), 'Jam'); 4 | insert into post values(11001, 'My First Post', 10001); 5 | insert into post values(11002, 'My Second Post', 10001); -------------------------------------------------------------------------------- /6.restful-web-services/src/main/resources/messages.properties: -------------------------------------------------------------------------------- 1 | good.morning.message=Good Morning -------------------------------------------------------------------------------- /6.restful-web-services/src/main/resources/messages_fr.properties: -------------------------------------------------------------------------------- 1 | good.morning.message=Bonjour -------------------------------------------------------------------------------- /6.restful-web-services/src/main/resources/messages_nl.properties: -------------------------------------------------------------------------------- 1 | good.morning.message=Goede Morgen -------------------------------------------------------------------------------- /6.restful-web-services/src/test/java/com/in28minutes/rest/webservices/restfulwebservices/RestfulWebServicesApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.rest.webservices.restfulwebservices; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class RestfulWebServicesApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any person obtaining a copy 2 | of this software and associated documentation files (the "Software"), to deal 3 | in the Software without restriction, including without limitation the rights 4 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 5 | copies of the Software, and to permit persons to whom the Software is 6 | furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in 9 | all copies or substantial portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 14 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 15 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 17 | THE SOFTWARE. -------------------------------------------------------------------------------- /spring-interview-questions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/spring-interview-guide/c2e0db88f08200bae7fa8e8c791fad4df0a5133a/spring-interview-questions.pdf --------------------------------------------------------------------------------