├── .github └── workflows │ ├── main.yml │ ├── maven-publish.yml │ ├── node.js.yml │ └── npm-publish-github-packages.yml ├── Adding-Props-To-Counter-PropTypes-And-Defaults └── frontend │ └── todo-app │ ├── package-lock.json │ ├── package.json │ ├── public │ ├── favicon.ico │ ├── index.html │ └── manifest.json │ └── src │ ├── App.css │ ├── App.js │ ├── App.test.js │ ├── components │ ├── counter │ │ ├── Counter.css │ │ └── Counter.jsx │ └── learning-examples │ │ ├── FirstComponent.jsx │ │ ├── SecondComponent.jsx │ │ └── ThirdComponent.jsx │ ├── index.css │ ├── index.js │ ├── logo.svg │ └── serviceWorker.js ├── Chapter01 ├── .gitignore ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── alan │ │ │ └── binu │ │ │ └── CardatabaseApplication.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── alan │ └── binu │ └── CardatabaseApplicationTests.java ├── Chapter02 ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── alan │ │ │ └── binu │ │ │ ├── CardatabaseApplication.java │ │ │ └── domain │ │ │ ├── Car.java │ │ │ ├── CarRepository.java │ │ │ ├── Owner.java │ │ │ └── OwnerRepository.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── alan │ └── binu │ └── CardatabaseApplicationTests.java ├── Chapter03 ├── .gitignore ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── alan │ │ │ └── binu │ │ │ ├── CardatabaseApplication.java │ │ │ ├── domain │ │ │ ├── Car.java │ │ │ ├── CarRepository.java │ │ │ ├── Owner.java │ │ │ └── OwnerRepository.java │ │ │ └── web │ │ │ └── CarController.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── alan │ └── binu │ └── CardatabaseApplicationTests.java ├── Chapter04 ├── .gitignore ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── alan │ │ │ └── binu │ │ │ ├── AuthenticationFilter.java │ │ │ ├── CardatabaseApplication.java │ │ │ ├── LoginFilter.java │ │ │ ├── SecurityConfig.java │ │ │ ├── domain │ │ │ ├── AccountCredentials.java │ │ │ ├── Car.java │ │ │ ├── CarRepository.java │ │ │ ├── Owner.java │ │ │ ├── OwnerRepository.java │ │ │ ├── User.java │ │ │ └── UserRepository.java │ │ │ ├── service │ │ │ ├── AuthenticationService.java │ │ │ └── UserDetailServiceImpl.java │ │ │ └── web │ │ │ └── CarController.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── alan │ └── binu │ ├── CarRepositoryTest.java │ ├── CarRestTest.java │ └── CardatabaseApplicationTests.java ├── Chapter07 ├── restgithub │ └── App.js └── weatherapp │ └── App.js ├── Chapter08 ├── ReactRouter │ ├── App.js │ ├── Contact.js │ └── Home.js ├── ReactTable │ └── App.js └── ShoppingList │ ├── AddItem.js │ └── App.js ├── Chapter10 ├── .gitignore ├── package.json ├── public │ ├── favicon.ico │ ├── index.html │ └── manifest.json ├── src │ ├── App.css │ ├── App.js │ ├── App.test.js │ ├── components │ │ ├── AddCar.js │ │ └── Carlist.js │ ├── constants.js │ ├── index.css │ ├── index.js │ ├── logo.svg │ └── registerServiceWorker.js └── yarn.lock ├── Chapter11 ├── .gitignore ├── package.json ├── public │ ├── favicon.ico │ ├── index.html │ └── manifest.json └── src │ ├── App.css │ ├── App.js │ ├── App.test.js │ ├── components │ ├── AddCar.js │ ├── Carlist.js │ └── Carlist.test.js │ ├── constants.js │ ├── index.css │ ├── index.js │ ├── logo.svg │ └── registerServiceWorker.js ├── Chapter12 ├── .gitignore ├── README.md ├── package.json ├── public │ ├── favicon.ico │ ├── index.html │ └── manifest.json └── src │ ├── AddCar.test.js │ ├── App.css │ ├── App.js │ ├── App.test.js │ ├── __snapshots__ │ └── App.test.js.snap │ ├── components │ ├── AddCar.js │ ├── Carlist.js │ └── getCars.js │ ├── constants.js │ ├── index.css │ ├── index.js │ ├── logo.svg │ └── registerServiceWorker.js ├── Chapter13 ├── back end │ ├── .gitignore │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── alan │ │ │ │ └── binu │ │ │ │ ├── AuthenticationFilter.java │ │ │ │ ├── CardatabaseApplication.java │ │ │ │ ├── LoginFilter.java │ │ │ │ ├── SecurityConfig.java │ │ │ │ ├── domain │ │ │ │ ├── AccountCredentials.java │ │ │ │ ├── Car.java │ │ │ │ ├── CarRepository.java │ │ │ │ ├── Owner.java │ │ │ │ ├── OwnerRepository.java │ │ │ │ ├── User.java │ │ │ │ └── UserRepository.java │ │ │ │ ├── service │ │ │ │ ├── AuthenticationService.java │ │ │ │ └── UserDetailServiceImpl.java │ │ │ │ └── web │ │ │ │ └── CarController.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── alan │ │ └── binu │ │ ├── CarRepositoryTest.java │ │ ├── CarRestTest.java │ │ └── CardatabaseApplicationTests.java └── front end │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── public │ ├── favicon.ico │ ├── index.html │ └── manifest.json │ └── src │ ├── AddCar.test.js │ ├── App.css │ ├── App.js │ ├── App.test.js │ ├── __snapshots__ │ └── App.test.js.snap │ ├── components │ ├── AddCar.js │ ├── Carlist.js │ └── Login.js │ ├── constants.js │ ├── index.css │ ├── index.js │ ├── logo.svg │ └── registerServiceWorker.js ├── Counter-Pre-Final-Step ├── LICENSE └── frontend │ └── todo-app │ ├── package-lock.json │ ├── package.json │ ├── public │ ├── favicon.ico │ ├── index.html │ └── manifest.json │ └── src │ ├── App.css │ ├── App.js │ ├── App.test.js │ ├── components │ ├── counter │ │ ├── Counter.css │ │ └── Counter.jsx │ └── learning-examples │ │ ├── FirstComponent.jsx │ │ ├── SecondComponent.jsx │ │ └── ThirdComponent.jsx │ ├── index.css │ ├── index.js │ ├── logo.svg │ └── serviceWorker.js ├── Error-Handling ├── frontend │ └── todo-app │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── public │ │ ├── favicon.ico │ │ ├── index.html │ │ └── manifest.json │ │ └── src │ │ ├── App.css │ │ ├── App.js │ │ ├── App.test.js │ │ ├── api │ │ └── todo │ │ │ └── HelloWorldService.js │ │ ├── bootstrap.css │ │ ├── components │ │ ├── counter │ │ │ ├── Counter.css │ │ │ └── Counter.jsx │ │ ├── learning-examples │ │ │ ├── FirstComponent.jsx │ │ │ ├── SecondComponent.jsx │ │ │ └── ThirdComponent.jsx │ │ └── todo │ │ │ ├── AuthenticatedRoute.jsx │ │ │ ├── AuthenticationService.js │ │ │ ├── ErrorComponent.jsx │ │ │ ├── FooterComponent.jsx │ │ │ ├── HeaderComponent.jsx │ │ │ ├── ListTodosComponent.jsx │ │ │ ├── LoginComponent.jsx │ │ │ ├── LogoutComponent.jsx │ │ │ ├── TodoApp.jsx │ │ │ └── WelcomeComponent.jsx │ │ ├── index.css │ │ ├── index.js │ │ ├── logo.svg │ │ └── serviceWorker.js └── restful-web-services │ ├── pom.xml │ └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── in28minutes │ │ │ └── rest │ │ │ └── webservices │ │ │ └── restfulwebservices │ │ │ ├── HelloWorldBean.java │ │ │ ├── HelloWorldController.java │ │ │ └── RestfulWebServicesApplication.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── in28minutes │ └── rest │ └── webservices │ └── restfulwebservices │ └── RestfulWebServicesApplicationTests.java ├── First-Component-And-Second-Component ├── LICENSE └── frontend │ └── todo-app │ ├── package-lock.json │ ├── package.json │ ├── public │ ├── favicon.ico │ ├── index.html │ └── manifest.json │ └── src │ ├── App.css │ ├── App.js │ ├── App.test.js │ ├── index.css │ ├── index.js │ ├── logo.svg │ └── serviceWorker.js ├── ListTodo-Component-Created └── frontend │ └── todo-app │ ├── package-lock.json │ ├── package.json │ ├── public │ ├── favicon.ico │ ├── index.html │ └── manifest.json │ └── src │ ├── App.css │ ├── App.js │ ├── App.test.js │ ├── components │ ├── counter │ │ ├── Counter.css │ │ └── Counter.jsx │ ├── learning-examples │ │ ├── FirstComponent.jsx │ │ ├── SecondComponent.jsx │ │ └── ThirdComponent.jsx │ └── todo │ │ └── TodoApp.jsx │ ├── index.css │ ├── index.js │ ├── logo.svg │ └── serviceWorker.js ├── Moving-State-Up ├── LICENSE └── frontend │ └── todo-app │ ├── package-lock.json │ ├── package.json │ ├── public │ ├── favicon.ico │ ├── index.html │ └── manifest.json │ └── src │ ├── App.css │ ├── App.js │ ├── App.test.js │ ├── components │ ├── counter │ │ ├── Counter.css │ │ └── Counter.jsx │ └── learning-examples │ │ ├── FirstComponent.jsx │ │ ├── SecondComponent.jsx │ │ └── ThirdComponent.jsx │ ├── index.css │ ├── index.js │ ├── logo.svg │ └── serviceWorker.js ├── README.md ├── React-Project-Counter-And-Counter-Buttons-With-State ├── package-lock.json ├── package.json └── public │ ├── favicon.ico │ ├── index.html │ └── manifest.json ├── SpringBoot-React-CRUD └── fullstack │ ├── backend │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── urunov │ │ │ │ ├── FullstackApplication.java │ │ │ │ ├── controller │ │ │ │ └── EmployeeController.java │ │ │ │ ├── exception │ │ │ │ └── ResourceNotFoundException.java │ │ │ │ ├── model │ │ │ │ └── Employee.java │ │ │ │ └── repository │ │ │ │ └── EmployeeRepository.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── uruov │ │ └── FullstackApplicationTests.java │ ├── backendSwagger │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── urunov │ │ │ │ ├── FullstackApplication.java │ │ │ │ ├── configures │ │ │ │ └── SwaggerConfig.java │ │ │ │ ├── controller │ │ │ │ └── EmployeeController.java │ │ │ │ ├── exception │ │ │ │ └── ResourceNotFoundException.java │ │ │ │ ├── model │ │ │ │ └── Employee.java │ │ │ │ └── repository │ │ │ │ └── EmployeeRepository.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── uruov │ │ └── FullstackApplicationTests.java │ └── frontend │ └── react-frontend │ ├── README.md │ ├── package-lock.json │ ├── package.json │ ├── public │ ├── favicon.ico │ ├── index.html │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── robots.txt │ └── src │ ├── App.css │ ├── App.js │ ├── App.test.js │ ├── components │ ├── CreateEmployeeComponent.jsx │ ├── FooterComponents.jsx │ ├── HeaderComponents.jsx │ ├── ListEmployeeComponents.jsx │ ├── UpdateEmployeeComponent.jsx │ └── ViewEmployeeComponent.jsx │ ├── index.css │ ├── index.js │ ├── logo.svg │ ├── reportWebVitals.js │ ├── serviceWorker.js │ ├── services │ └── EmployeeService.js │ └── setupTests.js ├── SpringBoot-React-Docker-API └── fullstack │ ├── backend │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── urunov │ │ │ │ └── backend │ │ │ │ ├── BackendApplication.java │ │ │ │ ├── UserController.java │ │ │ │ ├── Users.java │ │ │ │ └── UsersRespository.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── urunov │ │ └── backend │ │ └── BackendApplicationTests.java │ └── frontend │ ├── README.md │ ├── package-lock.json │ ├── package.json │ ├── public │ ├── favicon.ico │ ├── index.html │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── robots.txt │ └── src │ ├── App.css │ ├── App.js │ ├── App.test.js │ ├── index.css │ ├── index.html │ ├── index.js │ ├── logo.svg │ ├── serviceWorker.js │ └── setupTests.js ├── SpringBoot-React-ShoppingMall └── fullstack │ └── backend │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── urunov │ │ │ ├── ShoppingApplication.java │ │ │ ├── configure │ │ │ ├── JpaConfig.java │ │ │ └── SwaggerConfig.java │ │ │ ├── controller │ │ │ ├── CatalogueController.java │ │ │ ├── OrderController.java │ │ │ └── UserController.java │ │ │ ├── exception │ │ │ ├── AppException.java │ │ │ ├── BadRequestException.java │ │ │ └── ResourceNotFoundException.java │ │ │ ├── kafkaService │ │ │ ├── Consumer.java │ │ │ └── Producer.java │ │ │ ├── model │ │ │ ├── Good.java │ │ │ ├── Offer.java │ │ │ ├── OrderDetails.java │ │ │ ├── Orders.java │ │ │ ├── Role.java │ │ │ ├── User.java │ │ │ ├── audit │ │ │ │ ├── DateAudit.java │ │ │ │ └── UserDateAudit.java │ │ │ ├── enumdto │ │ │ │ ├── GoodChangeable.java │ │ │ │ ├── OrderStatus.java │ │ │ │ └── RoleName.java │ │ │ ├── gson │ │ │ │ └── bitMasterApi │ │ │ │ │ ├── driverInfo │ │ │ │ │ ├── Account.java │ │ │ │ │ ├── Data.java │ │ │ │ │ ├── DriverInfo.java │ │ │ │ │ └── Phone.java │ │ │ │ │ └── orderState │ │ │ │ │ ├── Data.java │ │ │ │ │ └── OrderState.java │ │ │ ├── retailer │ │ │ │ └── Retailer.java │ │ │ └── taxi │ │ │ │ └── TaxiProperties.java │ │ │ ├── payload │ │ │ ├── ApiResponse.java │ │ │ ├── PagedResponse.java │ │ │ ├── SmsResponse.java │ │ │ ├── UserIdentityAvailability.java │ │ │ ├── UserProfile.java │ │ │ ├── UserSummary.java │ │ │ ├── good │ │ │ │ ├── GoodListResponse.java │ │ │ │ ├── GoodOrderDetailsResponse.java │ │ │ │ ├── GoodQuantityResponse.java │ │ │ │ ├── GoodResponse.java │ │ │ │ └── GoodResponseForRetailer.java │ │ │ ├── order │ │ │ │ ├── DeliveryPriceResponse.java │ │ │ │ ├── OrderKafkaResponse.java │ │ │ │ ├── OrderRequest.java │ │ │ │ └── OrderResponse.java │ │ │ ├── payment │ │ │ │ ├── CKassaRequestProperties.java │ │ │ │ ├── PaymentBtnResponse.java │ │ │ │ ├── PaymentResponse.java │ │ │ │ └── PaymentStatusResponse.java │ │ │ └── user │ │ │ │ └── UserResponse.java │ │ │ ├── repository │ │ │ ├── GoodRepository.java │ │ │ ├── GoodsRepository.java │ │ │ ├── OfferRepository.java │ │ │ ├── OrderDetailsRepository.java │ │ │ ├── OrderRepository.java │ │ │ ├── RetailerRepository.java │ │ │ └── UserRepository.java │ │ │ ├── schedule │ │ │ └── OrderStatusRequester.java │ │ │ ├── security │ │ │ ├── CurrentUser.java │ │ │ └── UserPrincipal.java │ │ │ ├── service │ │ │ ├── CataloguesService.java │ │ │ ├── GoodConsumeService.java │ │ │ ├── OrderDetailsService.java │ │ │ ├── RetailerService.java │ │ │ ├── UserService.java │ │ │ ├── order │ │ │ │ ├── OrderService.java │ │ │ │ └── payment │ │ │ │ │ ├── CKassaApi.java │ │ │ │ │ └── PaymentService.java │ │ │ └── taxiMaster │ │ │ │ ├── Address.java │ │ │ │ ├── AddressParser.java │ │ │ │ ├── SSLUtilities.java │ │ │ │ ├── StringSimilarity.java │ │ │ │ ├── TMApi.java │ │ │ │ ├── TaxiOrderProcess.java │ │ │ │ └── utils │ │ │ │ └── AddressUtils.java │ │ │ └── utils │ │ │ ├── AppConstants.java │ │ │ ├── DateFormats.java │ │ │ ├── DateUtils.java │ │ │ ├── OfferUnits.java │ │ │ ├── StringUtils.java │ │ │ ├── UserUtils.java │ │ │ └── date │ │ │ └── formats │ │ │ ├── PaymentDateFormat.java │ │ │ └── RussianDateFormat.java │ └── resources │ │ ├── application.properties │ │ ├── kafka.properties │ │ └── log4j2.xml │ └── test │ └── java │ └── com │ └── urunov │ └── ShoppingApplicationTests.java ├── Springboot-ReactJS-Ecommerce-Shopping-Backend ├── model │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── urunov │ │ │ ├── ModelApplication.java │ │ │ ├── config │ │ │ ├── AppConfig.java │ │ │ ├── CorsConfig.java │ │ │ ├── DevRedisConfig.java │ │ │ └── ProdRedisConfig.java │ │ │ ├── configureAPI │ │ │ └── modelAPI.java │ │ │ ├── controller │ │ │ └── CommonDataController.java │ │ │ ├── dao │ │ │ └── sql │ │ │ │ ├── categories │ │ │ │ ├── ApparelCategoryRepository.java │ │ │ │ ├── GenderCategoryRepository.java │ │ │ │ ├── PriceRangeCategoryRepository.java │ │ │ │ ├── ProductBrandCategoryRepository.java │ │ │ │ └── SortByCategoryRepository.java │ │ │ │ ├── images │ │ │ │ ├── ApparelImagesRepository.java │ │ │ │ ├── BrandImagesRepository.java │ │ │ │ └── CarouselImagesRepository.java │ │ │ │ └── info │ │ │ │ ├── AddressInfoRepository.java │ │ │ │ ├── BankInfoRepository.java │ │ │ │ ├── ContactInfoRepository.java │ │ │ │ ├── OrderInfoRepository.java │ │ │ │ ├── ProductInfoRepository.java │ │ │ │ ├── impl │ │ │ │ └── ProductInfoRepositoryImpl.java │ │ │ │ └── queryhelpers │ │ │ │ ├── ProductQueryHelper.java │ │ │ │ └── context │ │ │ │ └── ParamsToQueryContext.java │ │ │ ├── dto │ │ │ ├── ApparelDTO.java │ │ │ ├── ApparelImagesDTO.java │ │ │ ├── BrandCategoryDTO.java │ │ │ ├── BrandImageDTO.java │ │ │ ├── BrandsAndApparelsDTO.java │ │ │ ├── CarouselImagesDTO.java │ │ │ ├── CustomerDTO.java │ │ │ ├── FilterAttributesDTO.java │ │ │ ├── FilterAttributesWithTotalltemsDTO.java │ │ │ ├── GenderDTO.java │ │ │ ├── ProductInfoDTO.java │ │ │ ├── SearchSuggestionForThreeAttrDTO.java │ │ │ └── SearchSuggestionForTwoAttrDTO.java │ │ │ ├── entity │ │ │ ├── categories │ │ │ │ ├── ApparelCategory.java │ │ │ │ ├── GenderCategory.java │ │ │ │ ├── PriceRangeCategory.java │ │ │ │ ├── ProductBrandCategory.java │ │ │ │ └── SortByCategory.java │ │ │ ├── customer │ │ │ │ └── Customer.java │ │ │ ├── images │ │ │ │ ├── ApparelImages.java │ │ │ │ ├── BrandImages.java │ │ │ │ └── CarouselImages.java │ │ │ └── info │ │ │ │ ├── AddressInfo.java │ │ │ │ ├── BankInfo.java │ │ │ │ ├── ContactInfo.java │ │ │ │ ├── OrderInfo.java │ │ │ │ └── ProductInfo.java │ │ │ ├── entityResponse │ │ │ ├── FilterAttributesResponse.java │ │ │ ├── HomeTabsDataResponse.java │ │ │ ├── MainScreenResponse.java │ │ │ └── SearchSuggestionResponse.java │ │ │ ├── service │ │ │ ├── CommonDataServiceImpl.java │ │ │ ├── LoadFakeDataServiceImpl.java │ │ │ └── interfaces │ │ │ │ ├── CommonDataService.java │ │ │ │ └── LoadFakeDataService.java │ │ │ └── util │ │ │ └── resulttransformers │ │ │ ├── IListResultTransformer.java │ │ │ └── ListResultTransformer.java │ │ └── resources │ │ ├── application-dev.properties │ │ ├── application-prod.properties │ │ ├── application.properties │ │ └── fake_data │ │ ├── main-screen-data.txt │ │ ├── price-range-data.txt │ │ ├── sortby-data.txt │ │ └── web-data.txt ├── payment │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── urunov │ │ │ └── payment │ │ │ └── PaymentApplication.java │ │ └── resources │ │ └── application.properties ├── search-system │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── urunov │ │ │ └── SearchApplication.java │ │ └── resources │ │ └── application.properties ├── security │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── urunov │ │ │ └── security │ │ │ └── SecurityApplication.java │ │ └── resources │ │ └── application.properties └── seller-account │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── com │ │ └── urunov │ │ └── SellerAccountApplication.java │ └── resources │ └── application.properties ├── Springboot-ReactJS-Ecommerce-Shopping-FrontEnd ├── package-lock.json ├── package.json ├── public │ ├── favicon.ico │ ├── index.html │ ├── logo192.png │ ├── logo512.png │ └── manifest.json └── src │ ├── App.css │ ├── App.js │ ├── index.css │ ├── index.js │ └── logo.svg ├── _config.yml ├── contribute.py ├── full-stack-react-and-spring-boot ├── backend │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── in │ │ │ │ └── alanbinu │ │ │ │ └── springbootrestapi │ │ │ │ ├── SpringbootrestapiApplication.java │ │ │ │ ├── controller │ │ │ │ └── EmployeeController.java │ │ │ │ ├── entity │ │ │ │ └── Employee.java │ │ │ │ └── repository │ │ │ │ └── EmployeeRepository.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── in │ │ └── alanbinu │ │ └── springbootrestapi │ │ └── SpringbootrestapiApplicationTests.java └── frontend │ ├── README.md │ ├── package-lock.json │ ├── package.json │ ├── public │ ├── favicon.ico │ ├── index.html │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── robots.txt │ └── src │ ├── App.css │ ├── App.js │ ├── App.test.js │ ├── components │ ├── AddEmployee.js │ ├── EmployeesList.js │ └── NotFound.js │ ├── http-common.js │ ├── index.css │ ├── index.js │ ├── logo.svg │ ├── reportWebVitals.js │ ├── services │ └── employee.service.js │ └── setupTests.js ├── spring-boot-react-cors-cross-origin-csrf ├── backend │ ├── .gitignore │ ├── pom.xml │ └── src │ │ └── main │ │ └── resources │ │ └── application.properties └── frontend │ ├── .gitignore │ ├── README.md │ ├── package-lock.json │ ├── package.json │ ├── public │ ├── favicon.ico │ ├── index.html │ └── manifest.json │ └── src │ ├── App.css │ ├── App.js │ ├── App.test.js │ ├── component │ ├── ListCoursesComponent.jsx │ └── SecurityAppComponent.jsx │ ├── index.css │ ├── index.js │ ├── logo.svg │ ├── service │ └── CourseDataService.js │ └── serviceWorker.js ├── spring-boot-react-crud-full-stack-with-maven ├── backend │ ├── .gitignore │ ├── pom.xml │ └── src │ │ └── main │ │ └── resources │ │ └── application.properties └── frontend │ ├── .gitignore │ ├── README.md │ ├── package-lock.json │ ├── package.json │ ├── public │ ├── favicon.ico │ ├── index.html │ └── manifest.json │ └── src │ ├── App.css │ ├── App.js │ ├── App.test.js │ ├── component │ ├── CourseComponent.jsx │ ├── InstructorApp.jsx │ └── ListCoursesComponent.jsx │ ├── index.css │ ├── index.js │ ├── logo.svg │ ├── service │ └── CourseDataService.js │ └── serviceWorker.js ├── spring-boot-react-employee-curd ├── react-frontend │ ├── .gitignore │ ├── README.md │ ├── package-lock.json │ ├── package.json │ ├── public │ │ ├── favicon.ico │ │ └── index.html │ └── src │ │ ├── App.css │ │ ├── App.js │ │ ├── components │ │ ├── CreateEmployeeComponent.jsx │ │ ├── FooterComponent.jsx │ │ ├── HeaderComponent.js │ │ ├── ListEmployeeComponent.jsx │ │ ├── UpdateEmployeeComponent.jsx │ │ └── ViewEmployeeComponent.jsx │ │ ├── index.css │ │ ├── index.js │ │ ├── logo.svg │ │ ├── serviceWorker.js │ │ ├── services │ │ └── EmployeeService.js │ │ └── setupTests.js └── springboot-backend │ ├── .gitignore │ ├── .mvn │ └── wrapper │ │ ├── MavenWrapperDownloader.java │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ ├── main │ ├── java │ │ └── net │ │ │ └── alanbinu │ │ │ └── springboot │ │ │ ├── SpringbootBackendApplication.java │ │ │ ├── controller │ │ │ └── EmployeeController.java │ │ │ ├── exception │ │ │ └── ResourceNotFoundException.java │ │ │ ├── model │ │ │ └── Employee.java │ │ │ └── repository │ │ │ └── EmployeeRepository.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── net │ └── alanbinu │ └── springboot │ └── SpringbootBackendApplicationTests.java ├── spring-boot-react-hello-world-with-routing ├── backend │ ├── .gitignore │ ├── pom.xml │ └── src │ │ └── main │ │ └── resources │ │ └── application.properties └── frontend │ ├── .gitignore │ ├── README.md │ ├── package-lock.json │ ├── package.json │ ├── public │ ├── favicon.ico │ ├── index.html │ └── manifest.json │ └── src │ ├── App.css │ ├── App.js │ ├── App.test.js │ ├── component │ ├── HelloWorldApp.js │ ├── HelloWorldBeanComponent.js │ ├── HelloWorldStringComponent.js │ └── MenuComponent.js │ ├── index.css │ ├── index.js │ ├── logo.svg │ ├── service │ └── HelloWorldService.js │ └── serviceWorker.js ├── spring-boot-react-jpa-hibernate-with-h2-full-stack ├── backend │ ├── .gitignore │ ├── pom.xml │ └── src │ │ └── main │ │ └── resources │ │ ├── application.properties │ │ └── data.sql └── frontend │ ├── .gitignore │ ├── README.md │ ├── package-lock.json │ ├── package.json │ ├── public │ ├── favicon.ico │ ├── index.html │ └── manifest.json │ └── src │ ├── App.css │ ├── App.js │ ├── App.test.js │ ├── index.css │ ├── index.js │ ├── logo.svg │ └── serviceWorker.js └── spring-boot-react-jwt-auth-login-logout ├── backend ├── .gitignore ├── pom.xml └── src │ └── main │ └── resources │ └── application.properties └── frontend ├── .gitignore ├── README.md ├── package-lock.json ├── package.json ├── public ├── favicon.ico ├── index.html └── manifest.json └── src ├── App.css ├── App.js ├── App.test.js ├── index.css ├── index.js ├── logo.svg └── serviceWorker.js /Adding-Props-To-Counter-PropTypes-And-Defaults/frontend/todo-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "todo-app", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "react": "^16.8.4", 7 | "react-dom": "^16.8.4", 8 | "react-scripts": "2.1.8" 9 | }, 10 | "scripts": { 11 | "start": "react-scripts start", 12 | "build": "react-scripts build", 13 | "test": "react-scripts test", 14 | "eject": "react-scripts eject" 15 | }, 16 | "eslintConfig": { 17 | "extends": "react-app" 18 | }, 19 | "browserslist": [ 20 | ">0.2%", 21 | "not dead", 22 | "not ie <= 11", 23 | "not op_mini all" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /Adding-Props-To-Counter-PropTypes-And-Defaults/frontend/todo-app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/Adding-Props-To-Counter-PropTypes-And-Defaults/frontend/todo-app/public/favicon.ico -------------------------------------------------------------------------------- /Adding-Props-To-Counter-PropTypes-And-Defaults/frontend/todo-app/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /Adding-Props-To-Counter-PropTypes-And-Defaults/frontend/todo-app/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | animation: App-logo-spin infinite 20s linear; 7 | height: 40vmin; 8 | pointer-events: none; 9 | } 10 | 11 | .App-header { 12 | background-color: #282c34; 13 | min-height: 100vh; 14 | display: flex; 15 | flex-direction: column; 16 | align-items: center; 17 | justify-content: center; 18 | font-size: calc(10px + 2vmin); 19 | color: white; 20 | } 21 | 22 | .App-link { 23 | color: #61dafb; 24 | } 25 | 26 | @keyframes App-logo-spin { 27 | from { 28 | transform: rotate(0deg); 29 | } 30 | to { 31 | transform: rotate(360deg); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Adding-Props-To-Counter-PropTypes-And-Defaults/frontend/todo-app/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | 5 | it('renders without crashing', () => { 6 | const div = document.createElement('div'); 7 | ReactDOM.render(, div); 8 | ReactDOM.unmountComponentAtNode(div); 9 | }); 10 | -------------------------------------------------------------------------------- /Adding-Props-To-Counter-PropTypes-And-Defaults/frontend/todo-app/src/components/counter/Counter.css: -------------------------------------------------------------------------------- 1 | button { 2 | background-color: green; 3 | font-size : 16px; 4 | padding : 15px 30px; 5 | color : white; 6 | width : 100px; 7 | } 8 | 9 | .count { 10 | font-size : 50px; 11 | padding : 15px 30px; 12 | } -------------------------------------------------------------------------------- /Adding-Props-To-Counter-PropTypes-And-Defaults/frontend/todo-app/src/components/learning-examples/FirstComponent.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | 3 | //Class Component 4 | class FirstComponent extends Component { 5 | render() { 6 | return ( 7 |
8 | FirstComponent 9 |
10 | ) 11 | } 12 | } 13 | 14 | export default FirstComponent -------------------------------------------------------------------------------- /Adding-Props-To-Counter-PropTypes-And-Defaults/frontend/todo-app/src/components/learning-examples/SecondComponent.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | 3 | class SecondComponent extends Component { 4 | render() { 5 | return ( 6 |
7 | Second Component 8 |
9 | ) 10 | } 11 | } 12 | 13 | export default SecondComponent -------------------------------------------------------------------------------- /Adding-Props-To-Counter-PropTypes-And-Defaults/frontend/todo-app/src/components/learning-examples/ThirdComponent.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function ThirdComponent() { 4 | return ( 5 |
6 | Third Component 7 |
8 | ) 9 | } 10 | 11 | export default ThirdComponent -------------------------------------------------------------------------------- /Adding-Props-To-Counter-PropTypes-And-Defaults/frontend/todo-app/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", 5 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", 6 | sans-serif; 7 | -webkit-font-smoothing: antialiased; 8 | -moz-osx-font-smoothing: grayscale; 9 | } 10 | 11 | code { 12 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", 13 | monospace; 14 | } 15 | -------------------------------------------------------------------------------- /Adding-Props-To-Counter-PropTypes-And-Defaults/frontend/todo-app/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import * as serviceWorker from './serviceWorker'; 6 | 7 | ReactDOM.render(, document.getElementById('root')); 8 | 9 | // If you want your app to work offline and load faster, you can change 10 | // unregister() to register() below. Note this comes with some pitfalls. 11 | // Learn more about service workers: https://bit.ly/CRA-PWA 12 | serviceWorker.unregister(); 13 | -------------------------------------------------------------------------------- /Chapter01/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /Chapter01/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/Chapter01/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /Chapter01/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.3/apache-maven-3.5.3-bin.zip 2 | -------------------------------------------------------------------------------- /Chapter01/src/main/java/com/alan/binu/CardatabaseApplication.java: -------------------------------------------------------------------------------- 1 | package com.alan.binu; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class CardatabaseApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(CardatabaseApplication.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Chapter01/src/main/resources/application.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/Chapter01/src/main/resources/application.properties -------------------------------------------------------------------------------- /Chapter01/src/test/java/com/alan/binu/CardatabaseApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.alan.binu; 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 CardatabaseApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Chapter02/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/Chapter02/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /Chapter02/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.3/apache-maven-3.5.3-bin.zip 2 | -------------------------------------------------------------------------------- /Chapter02/src/main/java/com/alan/binu/domain/CarRepository.java: -------------------------------------------------------------------------------- 1 | package com.alan.binu.domain; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.repository.CrudRepository; 6 | 7 | public interface CarRepository extends CrudRepository { 8 | // Fetch cars by brand and sort by year 9 | List findByBrandOrderByYearAsc(String brand); 10 | } 11 | -------------------------------------------------------------------------------- /Chapter02/src/main/java/com/alan/binu/domain/OwnerRepository.java: -------------------------------------------------------------------------------- 1 | package com.alan.binu.domain; 2 | 3 | import org.springframework.data.repository.CrudRepository; 4 | 5 | public interface OwnerRepository extends CrudRepository { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /Chapter02/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.datasource.url=jdbc:mariadb://localhost:3306/cardb 2 | spring.datasource.username=root 3 | spring.datasource.password=sako09 4 | spring.datasource.driver-class-name=org.mariadb.jdbc.Driver 5 | 6 | spring.jpa.generate-ddl=true 7 | spring.jpa.hibernate.ddl-auto=create-drop 8 | 9 | spring.jpa.show-sql=true -------------------------------------------------------------------------------- /Chapter02/src/test/java/com/alan/binu/CardatabaseApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.alan.binu; 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 CardatabaseApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | 18 | -------------------------------------------------------------------------------- /Chapter03/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /Chapter03/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/Chapter03/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /Chapter03/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.3/apache-maven-3.5.3-bin.zip 2 | -------------------------------------------------------------------------------- /Chapter03/src/main/java/com/alan/binu/domain/CarRepository.java: -------------------------------------------------------------------------------- 1 | package com.alan.binu.domain; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.repository.CrudRepository; 6 | import org.springframework.data.repository.query.Param; 7 | import org.springframework.data.rest.core.annotation.RepositoryRestResource; 8 | 9 | @RepositoryRestResource 10 | public interface CarRepository extends CrudRepository { 11 | // Fetch cars by brand 12 | List findByBrand(@Param("brand") String brand); 13 | 14 | // Fetch cars by color 15 | List findByColor(@Param("color") String color); 16 | } 17 | -------------------------------------------------------------------------------- /Chapter03/src/main/java/com/alan/binu/domain/OwnerRepository.java: -------------------------------------------------------------------------------- 1 | package com.alan.binu.domain; 2 | 3 | import org.springframework.data.repository.CrudRepository; 4 | 5 | public interface OwnerRepository extends CrudRepository { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /Chapter03/src/main/java/com/alan/binu/web/CarController.java: -------------------------------------------------------------------------------- 1 | package com.alan.binu.web; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | import org.springframework.web.bind.annotation.RestController; 6 | 7 | import com.alan.binu.domain.Car; 8 | import com.alan.binu.domain.CarRepository; 9 | 10 | @RestController 11 | public class CarController { 12 | @Autowired 13 | private CarRepository repository; 14 | 15 | @RequestMapping("/cars") 16 | public Iterable getCars() { 17 | return repository.findAll(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Chapter03/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.datasource.url=jdbc:mariadb://localhost:3306/cardb 2 | spring.datasource.username=root 3 | spring.datasource.password=YOUR_MARIADB_ROOT_PASSWORD 4 | spring.datasource.driver-class-name=org.mariadb.jdbc.Driver 5 | 6 | spring.jpa.generate-ddl=true 7 | spring.jpa.hibernate.ddl-auto=create-drop 8 | 9 | spring.jpa.show-sql=true 10 | 11 | spring.data.rest.basePath=/api 12 | -------------------------------------------------------------------------------- /Chapter03/src/test/java/com/alan/binu/CardatabaseApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.alan.binu; 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 CardatabaseApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Chapter04/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /Chapter04/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/Chapter04/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /Chapter04/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.3/apache-maven-3.5.3-bin.zip 2 | -------------------------------------------------------------------------------- /Chapter04/src/main/java/com/alan/binu/domain/AccountCredentials.java: -------------------------------------------------------------------------------- 1 | package com.alan.binu.domain; 2 | 3 | public class AccountCredentials { 4 | private String username; 5 | private String password; 6 | 7 | public String getUsername() { 8 | return username; 9 | } 10 | public void setUsername(String username) { 11 | this.username = username; 12 | } 13 | public String getPassword() { 14 | return password; 15 | } 16 | public void setPassword(String password) { 17 | this.password = password; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Chapter04/src/main/java/com/alan/binu/domain/CarRepository.java: -------------------------------------------------------------------------------- 1 | package com.alan.binu.domain; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.repository.CrudRepository; 6 | import org.springframework.data.repository.query.Param; 7 | import org.springframework.data.rest.core.annotation.RepositoryRestResource; 8 | 9 | @RepositoryRestResource 10 | public interface CarRepository extends CrudRepository { 11 | // Fetch cars by brand 12 | List findByBrand(@Param("brand") String brand); 13 | 14 | // Fetch cars by color 15 | List findByColor(@Param("color") String color); 16 | } 17 | -------------------------------------------------------------------------------- /Chapter04/src/main/java/com/alan/binu/domain/OwnerRepository.java: -------------------------------------------------------------------------------- 1 | package com.alan.binu.domain; 2 | 3 | import org.springframework.data.repository.CrudRepository; 4 | 5 | public interface OwnerRepository extends CrudRepository { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /Chapter04/src/main/java/com/alan/binu/domain/UserRepository.java: -------------------------------------------------------------------------------- 1 | package com.alan.binu.domain; 2 | 3 | import org.springframework.data.repository.CrudRepository; 4 | import org.springframework.stereotype.Repository; 5 | 6 | @Repository 7 | public interface UserRepository extends CrudRepository { 8 | User findByUsername(String username); 9 | } -------------------------------------------------------------------------------- /Chapter04/src/main/java/com/alan/binu/web/CarController.java: -------------------------------------------------------------------------------- 1 | package com.alan.binu.web; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | import org.springframework.web.bind.annotation.RestController; 6 | 7 | import com.alan.binu.domain.Car; 8 | import com.alan.binu.domain.CarRepository; 9 | 10 | @RestController 11 | public class CarController { 12 | @Autowired 13 | private CarRepository repository; 14 | 15 | @RequestMapping("/cars") 16 | public Iterable getCars() { 17 | return repository.findAll(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Chapter04/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.datasource.url=jdbc:mariadb://localhost:3306/cardb 2 | spring.datasource.username=root 3 | spring.datasource.password=your_password 4 | spring.datasource.driver-class-name=org.mariadb.jdbc.Driver 5 | 6 | spring.jpa.generate-ddl=true 7 | spring.jpa.hibernate.ddl-auto=create-drop 8 | 9 | spring.jpa.show-sql=true 10 | 11 | spring.data.rest.basePath=/api 12 | -------------------------------------------------------------------------------- /Chapter04/src/test/java/com/alan/binu/CardatabaseApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.alan.binu; 2 | 3 | import static org.assertj.core.api.Assertions.assertThat; 4 | 5 | import org.junit.Test; 6 | import org.junit.runner.RunWith; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.boot.test.context.SpringBootTest; 9 | import org.springframework.test.context.junit4.SpringRunner; 10 | 11 | import com.alan.binu.web.CarController; 12 | 13 | @RunWith(SpringRunner.class) 14 | @SpringBootTest 15 | public class CardatabaseApplicationTests { 16 | @Autowired 17 | private CarController controller; 18 | 19 | @Test 20 | public void contextLoads() { 21 | assertThat(controller).isNotNull(); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /Chapter08/ReactRouter/Contact.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | 3 | class Contact extends Component { 4 | render() { 5 | return ( 6 |
7 |

Contact.js

8 |
9 | ); 10 | } 11 | } 12 | 13 | export default Contact; -------------------------------------------------------------------------------- /Chapter08/ReactRouter/Home.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | 3 | class Home extends Component { 4 | render() { 5 | return ( 6 |
7 |

Home.js

8 |
9 | ); 10 | } 11 | } 12 | 13 | export default Home; -------------------------------------------------------------------------------- /Chapter08/ShoppingList/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import {List, ListItem} from 'material-ui/List'; 3 | 4 | import './App.css'; 5 | import AddItem from './AddItem'; 6 | 7 | class App extends Component { 8 | constructor(props) { 9 | super(props); 10 | this.state={ items: [] }; 11 | } 12 | 13 | addItem = (item) => { 14 | this.setState({items: [item, ...this.state.items]}); 15 | } 16 | 17 | render() { 18 | const listItems = this.state.items.map((item, index) => 19 | {item.product}) 20 | return ( 21 |
22 |

Shopping list

23 | 24 | {listItems} 25 |
26 | ); 27 | } 28 | } 29 | 30 | export default App; 31 | -------------------------------------------------------------------------------- /Chapter10/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | -------------------------------------------------------------------------------- /Chapter10/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "carfront", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "react": "^16.3.2", 7 | "react-confirm-alert": "^2.0.2", 8 | "react-csv": "^1.0.14", 9 | "react-dom": "^16.3.2", 10 | "react-scripts": "1.1.4", 11 | "react-skylight": "^0.5.1", 12 | "react-table": "^6.8.2", 13 | "react-toastify": "^4.0.1" 14 | }, 15 | "scripts": { 16 | "start": "react-scripts start", 17 | "build": "react-scripts build", 18 | "test": "react-scripts test --env=jsdom", 19 | "eject": "react-scripts eject" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Chapter10/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/Chapter10/public/favicon.ico -------------------------------------------------------------------------------- /Chapter10/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /Chapter10/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | animation: App-logo-spin infinite 20s linear; 7 | height: 80px; 8 | } 9 | 10 | .App-header { 11 | background-color:lightblue; 12 | height: 50px; 13 | padding: 20px; 14 | color: white; 15 | } 16 | 17 | .App-title { 18 | font-size: 1.5em; 19 | } 20 | 21 | .App-intro { 22 | font-size: large; 23 | } 24 | 25 | @keyframes App-logo-spin { 26 | from { transform: rotate(0deg); } 27 | to { transform: rotate(360deg); } 28 | } 29 | -------------------------------------------------------------------------------- /Chapter10/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import './App.css'; 3 | import Carlist from './components/Carlist'; 4 | 5 | class App extends Component { 6 | render() { 7 | return ( 8 |
9 |
10 |

CarList

11 |
12 | 13 |
14 | ); 15 | } 16 | } 17 | 18 | export default App; 19 | -------------------------------------------------------------------------------- /Chapter10/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | 5 | it('renders without crashing', () => { 6 | const div = document.createElement('div'); 7 | ReactDOM.render(, div); 8 | ReactDOM.unmountComponentAtNode(div); 9 | }); 10 | -------------------------------------------------------------------------------- /Chapter10/src/constants.js: -------------------------------------------------------------------------------- 1 | export const SERVER_URL = 'http://localhost:8080/' -------------------------------------------------------------------------------- /Chapter10/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: sans-serif; 5 | } 6 | -------------------------------------------------------------------------------- /Chapter10/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import registerServiceWorker from './registerServiceWorker'; 6 | 7 | ReactDOM.render(, document.getElementById('root')); 8 | registerServiceWorker(); 9 | -------------------------------------------------------------------------------- /Chapter11/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | -------------------------------------------------------------------------------- /Chapter11/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "carfront", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@material-ui/core": "^1.0.0", 7 | "@material-ui/icons": "^1.0.0", 8 | "material-ui": "^0.20.1", 9 | "react": "^16.3.2", 10 | "react-confirm-alert": "^2.0.2", 11 | "react-csv": "^1.0.14", 12 | "react-dom": "^16.3.2", 13 | "react-scripts": "1.1.4", 14 | "react-skylight": "^0.5.1", 15 | "react-table": "^6.8.2" 16 | }, 17 | "scripts": { 18 | "start": "react-scripts start", 19 | "build": "react-scripts build", 20 | "test": "react-scripts test --env=jsdom", 21 | "eject": "react-scripts eject" 22 | }, 23 | "devDependencies": { 24 | "enzyme": "^3.3.0", 25 | "jest-enzyme": "^6.0.0" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Chapter11/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/Chapter11/public/favicon.ico -------------------------------------------------------------------------------- /Chapter11/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /Chapter11/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | animation: App-logo-spin infinite 20s linear; 7 | height: 80px; 8 | } 9 | 10 | .App-header { 11 | background-color:lightblue; 12 | height: 50px; 13 | padding: 20px; 14 | color: white; 15 | } 16 | 17 | .App-title { 18 | font-size: 1.5em; 19 | } 20 | 21 | .App-intro { 22 | font-size: large; 23 | } 24 | 25 | @keyframes App-logo-spin { 26 | from { transform: rotate(0deg); } 27 | to { transform: rotate(360deg); } 28 | } 29 | -------------------------------------------------------------------------------- /Chapter11/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import './App.css'; 3 | import Carlist from './components/Carlist'; 4 | import AppBar from '@material-ui/core/AppBar'; 5 | import Toolbar from '@material-ui/core/Toolbar'; 6 | 7 | class App extends Component { 8 | render() { 9 | return ( 10 |
11 | 12 | CarList 13 | 14 | 15 |
16 | ); 17 | } 18 | } 19 | 20 | export default App; 21 | -------------------------------------------------------------------------------- /Chapter11/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | 5 | it('renders without crashing', () => { 6 | const div = document.createElement('div'); 7 | ReactDOM.render(, div); 8 | ReactDOM.unmountComponentAtNode(div); 9 | }); 10 | -------------------------------------------------------------------------------- /Chapter11/src/components/Carlist.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/Chapter11/src/components/Carlist.test.js -------------------------------------------------------------------------------- /Chapter11/src/constants.js: -------------------------------------------------------------------------------- 1 | export const SERVER_URL = 'http://localhost:8080/' -------------------------------------------------------------------------------- /Chapter11/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: sans-serif; 5 | } 6 | -------------------------------------------------------------------------------- /Chapter11/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import registerServiceWorker from './registerServiceWorker'; 6 | 7 | ReactDOM.render(, document.getElementById('root')); 8 | registerServiceWorker(); 9 | -------------------------------------------------------------------------------- /Chapter12/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | -------------------------------------------------------------------------------- /Chapter12/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "carfront", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@material-ui/core": "^1.0.0", 7 | "@material-ui/icons": "^1.0.0", 8 | "material-ui": "^0.20.1", 9 | "react": "^16.3.2", 10 | "react-confirm-alert": "^2.0.2", 11 | "react-csv": "^1.0.14", 12 | "react-dom": "^16.3.2", 13 | "react-scripts": "1.1.4", 14 | "react-skylight": "^0.5.1", 15 | "react-table": "^6.8.2" 16 | }, 17 | "scripts": { 18 | "start": "react-scripts start", 19 | "build": "react-scripts build", 20 | "test": "react-scripts test --env=jsdom", 21 | "eject": "react-scripts eject" 22 | }, 23 | "devDependencies": { 24 | "enzyme": "^3.3.0", 25 | "enzyme-adapter-react-16": "^1.1.1", 26 | "jest-enzyme": "^6.0.0", 27 | "react-test-renderer": "^16.3.2" 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /Chapter12/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/Chapter12/public/favicon.ico -------------------------------------------------------------------------------- /Chapter12/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /Chapter12/src/AddCar.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import AddCar from './components/AddCar'; 3 | import Enzyme, { shallow } from 'enzyme'; 4 | import Adapter from 'enzyme-adapter-react-16'; 5 | 6 | Enzyme.configure({ adapter: new Adapter() }); 7 | 8 | describe('', () => { 9 | it('renders five components', () => { 10 | const wrapper = shallow(); 11 | expect(wrapper.find('TextField')).toHaveLength(5); 12 | }); 13 | }); -------------------------------------------------------------------------------- /Chapter12/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | animation: App-logo-spin infinite 20s linear; 7 | height: 80px; 8 | } 9 | 10 | .App-header { 11 | background-color:lightblue; 12 | height: 50px; 13 | padding: 20px; 14 | color: white; 15 | } 16 | 17 | .App-title { 18 | font-size: 1.5em; 19 | } 20 | 21 | .App-intro { 22 | font-size: large; 23 | } 24 | 25 | @keyframes App-logo-spin { 26 | from { transform: rotate(0deg); } 27 | to { transform: rotate(360deg); } 28 | } 29 | -------------------------------------------------------------------------------- /Chapter12/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import './App.css'; 3 | import Carlist from './components/Carlist'; 4 | import AppBar from '@material-ui/core/AppBar'; 5 | import Toolbar from '@material-ui/core/Toolbar'; 6 | 7 | class App extends Component { 8 | render() { 9 | return ( 10 |
11 | 12 | CarList 13 | 14 | 15 |
16 | ); 17 | } 18 | } 19 | 20 | export default App; 21 | -------------------------------------------------------------------------------- /Chapter12/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | import AddCar from './components/AddCar'; 5 | import renderer from 'react-test-renderer' 6 | 7 | it('renders without crashing', () => { 8 | const div = document.createElement('div'); 9 | ReactDOM.render(, div); 10 | ReactDOM.unmountComponentAtNode(div); 11 | }); 12 | 13 | it('renders a snapshot', () => { 14 | const tree = renderer.create().toJSON(); 15 | expect(tree).toMatchSnapshot(); 16 | }); -------------------------------------------------------------------------------- /Chapter12/src/components/getCars.js: -------------------------------------------------------------------------------- 1 | // Fetch all cars 2 | const getCars = (url) => { 3 | fetch(url + 'api/cars') 4 | .then((response) => response.json()) 5 | .then((result) => {return result;}) 6 | } 7 | 8 | export {getCars} 9 | -------------------------------------------------------------------------------- /Chapter12/src/constants.js: -------------------------------------------------------------------------------- 1 | export const SERVER_URL = 'http://localhost:8080/' -------------------------------------------------------------------------------- /Chapter12/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: sans-serif; 5 | } 6 | -------------------------------------------------------------------------------- /Chapter12/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import registerServiceWorker from './registerServiceWorker'; 6 | 7 | ReactDOM.render(, document.getElementById('root')); 8 | registerServiceWorker(); 9 | -------------------------------------------------------------------------------- /Chapter13/back end/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /Chapter13/back end/src/main/java/com/alan/binu/domain/AccountCredentials.java: -------------------------------------------------------------------------------- 1 | package com.alan.binu.domain; 2 | 3 | public class AccountCredentials { 4 | private String username; 5 | private String password; 6 | 7 | public String getUsername() { 8 | return username; 9 | } 10 | public void setUsername(String username) { 11 | this.username = username; 12 | } 13 | public String getPassword() { 14 | return password; 15 | } 16 | public void setPassword(String password) { 17 | this.password = password; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Chapter13/back end/src/main/java/com/alan/binu/domain/CarRepository.java: -------------------------------------------------------------------------------- 1 | package com.alan.binu.domain; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.repository.CrudRepository; 6 | import org.springframework.data.repository.query.Param; 7 | import org.springframework.data.rest.core.annotation.RepositoryRestResource; 8 | 9 | @RepositoryRestResource 10 | public interface CarRepository extends CrudRepository { 11 | // Fetch cars by brand 12 | List findByBrand(@Param("brand") String brand); 13 | 14 | // Fetch cars by color 15 | List findByColor(@Param("color") String color); 16 | } 17 | -------------------------------------------------------------------------------- /Chapter13/back end/src/main/java/com/alan/binu/domain/OwnerRepository.java: -------------------------------------------------------------------------------- 1 | package com.alan.binu.domain; 2 | 3 | import org.springframework.data.repository.CrudRepository; 4 | 5 | public interface OwnerRepository extends CrudRepository { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /Chapter13/back end/src/main/java/com/alan/binu/domain/UserRepository.java: -------------------------------------------------------------------------------- 1 | package com.alan.binu.domain; 2 | 3 | import org.springframework.data.repository.CrudRepository; 4 | import org.springframework.stereotype.Repository; 5 | 6 | @Repository 7 | public interface UserRepository extends CrudRepository { 8 | User findByUsername(String username); 9 | } -------------------------------------------------------------------------------- /Chapter13/back end/src/main/java/com/alan/binu/web/CarController.java: -------------------------------------------------------------------------------- 1 | package com.alan.binu.web; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | import org.springframework.web.bind.annotation.RestController; 6 | 7 | import com.alan.binu.domain.Car; 8 | import com.alan.binu.domain.CarRepository; 9 | 10 | @RestController 11 | public class CarController { 12 | @Autowired 13 | private CarRepository repository; 14 | 15 | @RequestMapping("/cars") 16 | public Iterable getCars() { 17 | return repository.findAll(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Chapter13/back end/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.datasource.url=jdbc:mariadb://localhost:3306/cardb 2 | spring.datasource.username=root 3 | spring.datasource.password=YOUR_PASSWORD 4 | 5 | spring.datasource.driver-class-name=org.mariadb.jdbc.Driver 6 | 7 | spring.jpa.generate-ddl=true 8 | spring.jpa.hibernate.ddl-auto=create-drop 9 | 10 | spring.jpa.show-sql=true 11 | 12 | spring.data.rest.basePath=/api 13 | -------------------------------------------------------------------------------- /Chapter13/back end/src/test/java/com/alan/binu/CardatabaseApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.alan.binu; 2 | 3 | import static org.assertj.core.api.Assertions.assertThat; 4 | 5 | import org.junit.Test; 6 | import org.junit.runner.RunWith; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.boot.test.context.SpringBootTest; 9 | import org.springframework.test.context.junit4.SpringRunner; 10 | 11 | import com.alan.binu.web.CarController; 12 | 13 | @RunWith(SpringRunner.class) 14 | @SpringBootTest 15 | public class CardatabaseApplicationTests { 16 | @Autowired 17 | private CarController controller; 18 | 19 | @Test 20 | public void contextLoads() { 21 | assertThat(controller).isNotNull(); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /Chapter13/front end/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | -------------------------------------------------------------------------------- /Chapter13/front end/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/Chapter13/front end/public/favicon.ico -------------------------------------------------------------------------------- /Chapter13/front end/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /Chapter13/front end/src/AddCar.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import AddCar from './components/AddCar'; 3 | import Enzyme, { shallow } from 'enzyme'; 4 | import Adapter from 'enzyme-adapter-react-16'; 5 | 6 | Enzyme.configure({ adapter: new Adapter() }); 7 | 8 | describe('', () => { 9 | it('renders five components', () => { 10 | const wrapper = shallow(); 11 | expect(wrapper.find('TextField')).toHaveLength(5); 12 | }); 13 | }); -------------------------------------------------------------------------------- /Chapter13/front end/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | animation: App-logo-spin infinite 20s linear; 7 | height: 80px; 8 | } 9 | 10 | .App-header { 11 | background-color:lightblue; 12 | height: 50px; 13 | padding: 20px; 14 | color: white; 15 | } 16 | 17 | .App-title { 18 | font-size: 1.5em; 19 | } 20 | 21 | .App-intro { 22 | font-size: large; 23 | } 24 | 25 | @keyframes App-logo-spin { 26 | from { transform: rotate(0deg); } 27 | to { transform: rotate(360deg); } 28 | } 29 | -------------------------------------------------------------------------------- /Chapter13/front end/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import './App.css'; 3 | import Login from './components/Login'; 4 | import AppBar from '@material-ui/core/AppBar'; 5 | import Toolbar from '@material-ui/core/Toolbar'; 6 | 7 | class App extends Component { 8 | render() { 9 | return ( 10 |
11 | 12 | CarList 13 | 14 | 15 |
16 | ); 17 | } 18 | } 19 | 20 | export default App; 21 | -------------------------------------------------------------------------------- /Chapter13/front end/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | import AddCar from './components/AddCar'; 5 | import renderer from 'react-test-renderer' 6 | 7 | it('renders without crashing', () => { 8 | const div = document.createElement('div'); 9 | ReactDOM.render(, div); 10 | ReactDOM.unmountComponentAtNode(div); 11 | }); 12 | 13 | it('renders a snapshot', () => { 14 | const tree = renderer.create().toJSON(); 15 | expect(tree).toMatchSnapshot(); 16 | }); -------------------------------------------------------------------------------- /Chapter13/front end/src/constants.js: -------------------------------------------------------------------------------- 1 | export const SERVER_URL = 'http://localhost:8080/' -------------------------------------------------------------------------------- /Chapter13/front end/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: sans-serif; 5 | } 6 | -------------------------------------------------------------------------------- /Chapter13/front end/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import registerServiceWorker from './registerServiceWorker'; 6 | 7 | ReactDOM.render(, document.getElementById('root')); 8 | registerServiceWorker(); 9 | -------------------------------------------------------------------------------- /Counter-Pre-Final-Step/frontend/todo-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "todo-app", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "react": "^16.8.4", 7 | "react-dom": "^16.8.4", 8 | "react-scripts": "2.1.8" 9 | }, 10 | "scripts": { 11 | "start": "react-scripts start", 12 | "build": "react-scripts build", 13 | "test": "react-scripts test", 14 | "eject": "react-scripts eject" 15 | }, 16 | "eslintConfig": { 17 | "extends": "react-app" 18 | }, 19 | "browserslist": [ 20 | ">0.2%", 21 | "not dead", 22 | "not ie <= 11", 23 | "not op_mini all" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /Counter-Pre-Final-Step/frontend/todo-app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/Counter-Pre-Final-Step/frontend/todo-app/public/favicon.ico -------------------------------------------------------------------------------- /Counter-Pre-Final-Step/frontend/todo-app/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /Counter-Pre-Final-Step/frontend/todo-app/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | animation: App-logo-spin infinite 20s linear; 7 | height: 40vmin; 8 | pointer-events: none; 9 | } 10 | 11 | .App-header { 12 | background-color: #282c34; 13 | min-height: 100vh; 14 | display: flex; 15 | flex-direction: column; 16 | align-items: center; 17 | justify-content: center; 18 | font-size: calc(10px + 2vmin); 19 | color: white; 20 | } 21 | 22 | .App-link { 23 | color: #61dafb; 24 | } 25 | 26 | @keyframes App-logo-spin { 27 | from { 28 | transform: rotate(0deg); 29 | } 30 | to { 31 | transform: rotate(360deg); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Counter-Pre-Final-Step/frontend/todo-app/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | 5 | it('renders without crashing', () => { 6 | const div = document.createElement('div'); 7 | ReactDOM.render(, div); 8 | ReactDOM.unmountComponentAtNode(div); 9 | }); 10 | -------------------------------------------------------------------------------- /Counter-Pre-Final-Step/frontend/todo-app/src/components/counter/Counter.css: -------------------------------------------------------------------------------- 1 | button { 2 | background-color: green; 3 | font-size : 16px; 4 | padding : 15px 30px; 5 | color : white; 6 | width : 100px; 7 | } 8 | 9 | .count { 10 | font-size : 50px; 11 | padding : 15px 30px; 12 | } 13 | 14 | .reset { 15 | background-color: red; 16 | width : 200px; 17 | } 18 | 19 | body { 20 | padding : 15px 30px; 21 | } -------------------------------------------------------------------------------- /Counter-Pre-Final-Step/frontend/todo-app/src/components/learning-examples/FirstComponent.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | 3 | //Class Component 4 | class FirstComponent extends Component { 5 | render() { 6 | return ( 7 |
8 | FirstComponent 9 |
10 | ) 11 | } 12 | } 13 | 14 | export default FirstComponent -------------------------------------------------------------------------------- /Counter-Pre-Final-Step/frontend/todo-app/src/components/learning-examples/SecondComponent.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | 3 | class SecondComponent extends Component { 4 | render() { 5 | return ( 6 |
7 | Second Component 8 |
9 | ) 10 | } 11 | } 12 | 13 | export default SecondComponent -------------------------------------------------------------------------------- /Counter-Pre-Final-Step/frontend/todo-app/src/components/learning-examples/ThirdComponent.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function ThirdComponent() { 4 | return ( 5 |
6 | Third Component 7 |
8 | ) 9 | } 10 | 11 | export default ThirdComponent -------------------------------------------------------------------------------- /Counter-Pre-Final-Step/frontend/todo-app/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", 5 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", 6 | sans-serif; 7 | -webkit-font-smoothing: antialiased; 8 | -moz-osx-font-smoothing: grayscale; 9 | } 10 | 11 | code { 12 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", 13 | monospace; 14 | } 15 | -------------------------------------------------------------------------------- /Counter-Pre-Final-Step/frontend/todo-app/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import * as serviceWorker from './serviceWorker'; 6 | 7 | ReactDOM.render(, document.getElementById('root')); 8 | 9 | // If you want your app to work offline and load faster, you can change 10 | // unregister() to register() below. Note this comes with some pitfalls. 11 | // Learn more about service workers: https://bit.ly/CRA-PWA 12 | serviceWorker.unregister(); 13 | -------------------------------------------------------------------------------- /Error-Handling/frontend/todo-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "todo-app", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "axios": "^0.18.0", 7 | "react": "^16.8.4", 8 | "react-dom": "^16.8.4", 9 | "react-router-dom": "^4.3.1", 10 | "react-scripts": "2.1.8" 11 | }, 12 | "scripts": { 13 | "start": "PORT=4200 react-scripts start", 14 | "build": "react-scripts build", 15 | "test": "react-scripts test", 16 | "eject": "react-scripts eject" 17 | }, 18 | "eslintConfig": { 19 | "extends": "react-app" 20 | }, 21 | "browserslist": [ 22 | ">0.2%", 23 | "not dead", 24 | "not ie <= 11", 25 | "not op_mini all" 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /Error-Handling/frontend/todo-app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/Error-Handling/frontend/todo-app/public/favicon.ico -------------------------------------------------------------------------------- /Error-Handling/frontend/todo-app/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /Error-Handling/frontend/todo-app/src/App.css: -------------------------------------------------------------------------------- 1 | .footer { 2 | position: absolute; 3 | bottom: 0; 4 | width: 100%; 5 | height: 40px; 6 | background-color: #222222; 7 | } 8 | 9 | .App { 10 | text-align: center; 11 | } 12 | 13 | .App-logo { 14 | animation: App-logo-spin infinite 20s linear; 15 | height: 40vmin; 16 | pointer-events: none; 17 | } 18 | 19 | .App-header { 20 | background-color: #282c34; 21 | min-height: 100vh; 22 | display: flex; 23 | flex-direction: column; 24 | align-items: center; 25 | justify-content: center; 26 | font-size: calc(10px + 2vmin); 27 | color: white; 28 | } 29 | 30 | .App-link { 31 | color: #61dafb; 32 | } 33 | 34 | @keyframes App-logo-spin { 35 | from { 36 | transform: rotate(0deg); 37 | } 38 | to { 39 | transform: rotate(360deg); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Error-Handling/frontend/todo-app/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | 5 | it('renders without crashing', () => { 6 | const div = document.createElement('div'); 7 | ReactDOM.render(, div); 8 | ReactDOM.unmountComponentAtNode(div); 9 | }); 10 | -------------------------------------------------------------------------------- /Error-Handling/frontend/todo-app/src/api/todo/HelloWorldService.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | 3 | class HelloWorldService { 4 | 5 | executeHelloWorldService() { 6 | //console.log('executed service') 7 | return axios.get('http://localhost:8080/hello-world'); 8 | } 9 | 10 | executeHelloWorldBeanService() { 11 | //console.log('executed service') 12 | return axios.get('http://localhost:8080/hello-world-bean'); 13 | } 14 | 15 | executeHelloWorldPathVariableService(name) { 16 | //console.log('executed service') 17 | return axios.get(`http://localhost:8080/hello-world/path-variable/${name}`); 18 | } 19 | } 20 | 21 | export default new HelloWorldService() -------------------------------------------------------------------------------- /Error-Handling/frontend/todo-app/src/bootstrap.css: -------------------------------------------------------------------------------- 1 | @import url(https://unpkg.com/bootstrap@4.1.0/dist/css/bootstrap.min.css) -------------------------------------------------------------------------------- /Error-Handling/frontend/todo-app/src/components/counter/Counter.css: -------------------------------------------------------------------------------- 1 | /* 2 | button { 3 | background-color: green; 4 | font-size : 16px; 5 | padding : 15px 30px; 6 | color : white; 7 | width : 100px; 8 | } 9 | 10 | .count { 11 | font-size : 50px; 12 | padding : 15px 30px; 13 | } 14 | 15 | .reset { 16 | background-color: red; 17 | width : 200px; 18 | } 19 | 20 | body { 21 | padding : 15px 30px; 22 | } 23 | */ -------------------------------------------------------------------------------- /Error-Handling/frontend/todo-app/src/components/learning-examples/FirstComponent.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | 3 | //Class Component 4 | class FirstComponent extends Component { 5 | render() { 6 | return ( 7 |
8 | FirstComponent 9 |
10 | ) 11 | } 12 | } 13 | 14 | export default FirstComponent -------------------------------------------------------------------------------- /Error-Handling/frontend/todo-app/src/components/learning-examples/SecondComponent.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | 3 | class SecondComponent extends Component { 4 | render() { 5 | return ( 6 |
7 | Second Component 8 |
9 | ) 10 | } 11 | } 12 | 13 | export default SecondComponent -------------------------------------------------------------------------------- /Error-Handling/frontend/todo-app/src/components/learning-examples/ThirdComponent.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function ThirdComponent() { 4 | return ( 5 |
6 | Third Component 7 |
8 | ) 9 | } 10 | 11 | export default ThirdComponent -------------------------------------------------------------------------------- /Error-Handling/frontend/todo-app/src/components/todo/AuthenticatedRoute.jsx: -------------------------------------------------------------------------------- 1 | import React, {Component} from 'react' 2 | import {Route, Redirect} from 'react-router-dom' 3 | import AuthenticationService from './AuthenticationService.js' 4 | 5 | class AuthenticatedRoute extends Component { 6 | render() { 7 | if(AuthenticationService.isUserLoggedIn()) { 8 | return 9 | } else { 10 | return 11 | } 12 | 13 | } 14 | } 15 | 16 | export default AuthenticatedRoute -------------------------------------------------------------------------------- /Error-Handling/frontend/todo-app/src/components/todo/AuthenticationService.js: -------------------------------------------------------------------------------- 1 | class AuthenticationService { 2 | 3 | registerSuccessfulLogin(username,password){ 4 | console.log('registerSuccessfulLogin') 5 | sessionStorage.setItem('authenticatedUser', username); 6 | } 7 | 8 | logout() { 9 | sessionStorage.removeItem('authenticatedUser'); 10 | } 11 | 12 | isUserLoggedIn() { 13 | let user = sessionStorage.getItem('authenticatedUser') 14 | if(user===null) return false 15 | return true 16 | } 17 | } 18 | 19 | export default new AuthenticationService() -------------------------------------------------------------------------------- /Error-Handling/frontend/todo-app/src/components/todo/ErrorComponent.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function ErrorComponent() { 4 | return
An Error Occurred. I don't know what to do! Contact support at abcd-efgh-ijkl
5 | } 6 | 7 | export default ErrorComponent -------------------------------------------------------------------------------- /Error-Handling/frontend/todo-app/src/components/todo/FooterComponent.jsx: -------------------------------------------------------------------------------- 1 | import React, {Component} from 'react' 2 | 3 | class FooterComponent extends Component { 4 | render() { 5 | return ( 6 |
7 | All Rights Reserved 2018 @in28minutes 8 |
9 | ) 10 | } 11 | } 12 | 13 | export default FooterComponent -------------------------------------------------------------------------------- /Error-Handling/frontend/todo-app/src/components/todo/LogoutComponent.jsx: -------------------------------------------------------------------------------- 1 | import React, {Component} from 'react' 2 | 3 | class LogoutComponent extends Component { 4 | render() { 5 | return ( 6 | <> 7 |

You are logged out

8 |
9 | Thank You for Using Our Application. 10 |
11 | 12 | ) 13 | } 14 | } 15 | 16 | export default LogoutComponent -------------------------------------------------------------------------------- /Error-Handling/frontend/todo-app/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", 5 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", 6 | sans-serif; 7 | -webkit-font-smoothing: antialiased; 8 | -moz-osx-font-smoothing: grayscale; 9 | } 10 | 11 | code { 12 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", 13 | monospace; 14 | } 15 | -------------------------------------------------------------------------------- /Error-Handling/frontend/todo-app/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import * as serviceWorker from './serviceWorker'; 6 | 7 | ReactDOM.render(, document.getElementById('root')); 8 | 9 | // If you want your app to work offline and load faster, you can change 10 | // unregister() to register() below. Note this comes with some pitfalls. 11 | // Learn more about service workers: https://bit.ly/CRA-PWA 12 | serviceWorker.unregister(); 13 | -------------------------------------------------------------------------------- /Error-Handling/restful-web-services/src/main/java/com/in28minutes/rest/webservices/restfulwebservices/HelloWorldBean.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.rest.webservices.restfulwebservices; 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 | -------------------------------------------------------------------------------- /Error-Handling/restful-web-services/src/main/java/com/in28minutes/rest/webservices/restfulwebservices/RestfulWebServicesApplication.java: -------------------------------------------------------------------------------- 1 | package com.in28minutes.rest.webservices.restfulwebservices; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class RestfulWebServicesApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(RestfulWebServicesApplication.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Error-Handling/restful-web-services/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | logging.level.org.springframework = info -------------------------------------------------------------------------------- /Error-Handling/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 | -------------------------------------------------------------------------------- /First-Component-And-Second-Component/frontend/todo-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "todo-app", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "react": "^16.8.4", 7 | "react-dom": "^16.8.4", 8 | "react-scripts": "2.1.8" 9 | }, 10 | "scripts": { 11 | "start": "react-scripts start", 12 | "build": "react-scripts build", 13 | "test": "react-scripts test", 14 | "eject": "react-scripts eject" 15 | }, 16 | "eslintConfig": { 17 | "extends": "react-app" 18 | }, 19 | "browserslist": [ 20 | ">0.2%", 21 | "not dead", 22 | "not ie <= 11", 23 | "not op_mini all" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /First-Component-And-Second-Component/frontend/todo-app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/First-Component-And-Second-Component/frontend/todo-app/public/favicon.ico -------------------------------------------------------------------------------- /First-Component-And-Second-Component/frontend/todo-app/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /First-Component-And-Second-Component/frontend/todo-app/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | animation: App-logo-spin infinite 20s linear; 7 | height: 40vmin; 8 | pointer-events: none; 9 | } 10 | 11 | .App-header { 12 | background-color: #282c34; 13 | min-height: 100vh; 14 | display: flex; 15 | flex-direction: column; 16 | align-items: center; 17 | justify-content: center; 18 | font-size: calc(10px + 2vmin); 19 | color: white; 20 | } 21 | 22 | .App-link { 23 | color: #61dafb; 24 | } 25 | 26 | @keyframes App-logo-spin { 27 | from { 28 | transform: rotate(0deg); 29 | } 30 | to { 31 | transform: rotate(360deg); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /First-Component-And-Second-Component/frontend/todo-app/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | 5 | it('renders without crashing', () => { 6 | const div = document.createElement('div'); 7 | ReactDOM.render(, div); 8 | ReactDOM.unmountComponentAtNode(div); 9 | }); 10 | -------------------------------------------------------------------------------- /First-Component-And-Second-Component/frontend/todo-app/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", 5 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", 6 | sans-serif; 7 | -webkit-font-smoothing: antialiased; 8 | -moz-osx-font-smoothing: grayscale; 9 | } 10 | 11 | code { 12 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", 13 | monospace; 14 | } 15 | -------------------------------------------------------------------------------- /First-Component-And-Second-Component/frontend/todo-app/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import * as serviceWorker from './serviceWorker'; 6 | 7 | ReactDOM.render(, document.getElementById('root')); 8 | 9 | // If you want your app to work offline and load faster, you can change 10 | // unregister() to register() below. Note this comes with some pitfalls. 11 | // Learn more about service workers: https://bit.ly/CRA-PWA 12 | serviceWorker.unregister(); 13 | -------------------------------------------------------------------------------- /ListTodo-Component-Created/frontend/todo-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "todo-app", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "react": "^16.8.4", 7 | "react-dom": "^16.8.4", 8 | "react-router-dom": "^4.3.1", 9 | "react-scripts": "2.1.8" 10 | }, 11 | "scripts": { 12 | "start": "react-scripts start", 13 | "build": "react-scripts build", 14 | "test": "react-scripts test", 15 | "eject": "react-scripts eject" 16 | }, 17 | "eslintConfig": { 18 | "extends": "react-app" 19 | }, 20 | "browserslist": [ 21 | ">0.2%", 22 | "not dead", 23 | "not ie <= 11", 24 | "not op_mini all" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /ListTodo-Component-Created/frontend/todo-app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/ListTodo-Component-Created/frontend/todo-app/public/favicon.ico -------------------------------------------------------------------------------- /ListTodo-Component-Created/frontend/todo-app/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /ListTodo-Component-Created/frontend/todo-app/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | animation: App-logo-spin infinite 20s linear; 7 | height: 40vmin; 8 | pointer-events: none; 9 | } 10 | 11 | .App-header { 12 | background-color: #282c34; 13 | min-height: 100vh; 14 | display: flex; 15 | flex-direction: column; 16 | align-items: center; 17 | justify-content: center; 18 | font-size: calc(10px + 2vmin); 19 | color: white; 20 | } 21 | 22 | .App-link { 23 | color: #61dafb; 24 | } 25 | 26 | @keyframes App-logo-spin { 27 | from { 28 | transform: rotate(0deg); 29 | } 30 | to { 31 | transform: rotate(360deg); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /ListTodo-Component-Created/frontend/todo-app/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | 5 | it('renders without crashing', () => { 6 | const div = document.createElement('div'); 7 | ReactDOM.render(, div); 8 | ReactDOM.unmountComponentAtNode(div); 9 | }); 10 | -------------------------------------------------------------------------------- /ListTodo-Component-Created/frontend/todo-app/src/components/counter/Counter.css: -------------------------------------------------------------------------------- 1 | button { 2 | background-color: green; 3 | font-size : 16px; 4 | padding : 15px 30px; 5 | color : white; 6 | width : 100px; 7 | } 8 | 9 | .count { 10 | font-size : 50px; 11 | padding : 15px 30px; 12 | } 13 | 14 | .reset { 15 | background-color: red; 16 | width : 200px; 17 | } 18 | 19 | body { 20 | padding : 15px 30px; 21 | } -------------------------------------------------------------------------------- /ListTodo-Component-Created/frontend/todo-app/src/components/learning-examples/FirstComponent.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | 3 | //Class Component 4 | class FirstComponent extends Component { 5 | render() { 6 | return ( 7 |
8 | FirstComponent 9 |
10 | ) 11 | } 12 | } 13 | 14 | export default FirstComponent -------------------------------------------------------------------------------- /ListTodo-Component-Created/frontend/todo-app/src/components/learning-examples/SecondComponent.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | 3 | class SecondComponent extends Component { 4 | render() { 5 | return ( 6 |
7 | Second Component 8 |
9 | ) 10 | } 11 | } 12 | 13 | export default SecondComponent -------------------------------------------------------------------------------- /ListTodo-Component-Created/frontend/todo-app/src/components/learning-examples/ThirdComponent.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function ThirdComponent() { 4 | return ( 5 |
6 | Third Component 7 |
8 | ) 9 | } 10 | 11 | export default ThirdComponent -------------------------------------------------------------------------------- /ListTodo-Component-Created/frontend/todo-app/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", 5 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", 6 | sans-serif; 7 | -webkit-font-smoothing: antialiased; 8 | -moz-osx-font-smoothing: grayscale; 9 | } 10 | 11 | code { 12 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", 13 | monospace; 14 | } 15 | -------------------------------------------------------------------------------- /ListTodo-Component-Created/frontend/todo-app/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import * as serviceWorker from './serviceWorker'; 6 | 7 | ReactDOM.render(, document.getElementById('root')); 8 | 9 | // If you want your app to work offline and load faster, you can change 10 | // unregister() to register() below. Note this comes with some pitfalls. 11 | // Learn more about service workers: https://bit.ly/CRA-PWA 12 | serviceWorker.unregister(); 13 | -------------------------------------------------------------------------------- /Moving-State-Up/frontend/todo-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "todo-app", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "react": "^16.8.4", 7 | "react-dom": "^16.8.4", 8 | "react-scripts": "2.1.8" 9 | }, 10 | "scripts": { 11 | "start": "react-scripts start", 12 | "build": "react-scripts build", 13 | "test": "react-scripts test", 14 | "eject": "react-scripts eject" 15 | }, 16 | "eslintConfig": { 17 | "extends": "react-app" 18 | }, 19 | "browserslist": [ 20 | ">0.2%", 21 | "not dead", 22 | "not ie <= 11", 23 | "not op_mini all" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /Moving-State-Up/frontend/todo-app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/Moving-State-Up/frontend/todo-app/public/favicon.ico -------------------------------------------------------------------------------- /Moving-State-Up/frontend/todo-app/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /Moving-State-Up/frontend/todo-app/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | animation: App-logo-spin infinite 20s linear; 7 | height: 40vmin; 8 | pointer-events: none; 9 | } 10 | 11 | .App-header { 12 | background-color: #282c34; 13 | min-height: 100vh; 14 | display: flex; 15 | flex-direction: column; 16 | align-items: center; 17 | justify-content: center; 18 | font-size: calc(10px + 2vmin); 19 | color: white; 20 | } 21 | 22 | .App-link { 23 | color: #61dafb; 24 | } 25 | 26 | @keyframes App-logo-spin { 27 | from { 28 | transform: rotate(0deg); 29 | } 30 | to { 31 | transform: rotate(360deg); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Moving-State-Up/frontend/todo-app/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | 5 | it('renders without crashing', () => { 6 | const div = document.createElement('div'); 7 | ReactDOM.render(, div); 8 | ReactDOM.unmountComponentAtNode(div); 9 | }); 10 | -------------------------------------------------------------------------------- /Moving-State-Up/frontend/todo-app/src/components/counter/Counter.css: -------------------------------------------------------------------------------- 1 | button { 2 | background-color: green; 3 | font-size : 16px; 4 | padding : 15px 30px; 5 | color : white; 6 | width : 100px; 7 | } 8 | 9 | .count { 10 | font-size : 50px; 11 | padding : 15px 30px; 12 | } -------------------------------------------------------------------------------- /Moving-State-Up/frontend/todo-app/src/components/learning-examples/FirstComponent.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | 3 | //Class Component 4 | class FirstComponent extends Component { 5 | render() { 6 | return ( 7 |
8 | FirstComponent 9 |
10 | ) 11 | } 12 | } 13 | 14 | export default FirstComponent -------------------------------------------------------------------------------- /Moving-State-Up/frontend/todo-app/src/components/learning-examples/SecondComponent.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | 3 | class SecondComponent extends Component { 4 | render() { 5 | return ( 6 |
7 | Second Component 8 |
9 | ) 10 | } 11 | } 12 | 13 | export default SecondComponent -------------------------------------------------------------------------------- /Moving-State-Up/frontend/todo-app/src/components/learning-examples/ThirdComponent.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function ThirdComponent() { 4 | return ( 5 |
6 | Third Component 7 |
8 | ) 9 | } 10 | 11 | export default ThirdComponent -------------------------------------------------------------------------------- /Moving-State-Up/frontend/todo-app/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", 5 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", 6 | sans-serif; 7 | -webkit-font-smoothing: antialiased; 8 | -moz-osx-font-smoothing: grayscale; 9 | } 10 | 11 | code { 12 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", 13 | monospace; 14 | } 15 | -------------------------------------------------------------------------------- /Moving-State-Up/frontend/todo-app/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import * as serviceWorker from './serviceWorker'; 6 | 7 | ReactDOM.render(, document.getElementById('root')); 8 | 9 | // If you want your app to work offline and load faster, you can change 10 | // unregister() to register() below. Note this comes with some pitfalls. 11 | // Learn more about service workers: https://bit.ly/CRA-PWA 12 | serviceWorker.unregister(); 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Full Stack Employee Management Application Using ReactJS and Spring Boot 3 | 4 | 5 | ## Tech We Used 6 | 7 | - ReactJs 8 | - Spring Boot 9 | - MySql Database 10 | - Spring Security 11 | - REST API 12 | 13 | ## Features 14 | 15 | - Login and Logout 16 | - CURD Operations 17 | - Data are stored in MySql database 18 | - Neat and clean UI 19 | 20 | ## Steps to run in your machine 21 | 22 | #### Run the following commands 23 | ``` 24 | 25 | Clone the rep 26 | 27 | cd react-frontend 28 | npm i 29 | npm run start 30 | 31 | cd springboot-backend 32 | Run as Spring Boot 33 | ``` 34 | 35 | 36 | 37 | 38 | #### Hope you liked this project, dont forget to ⭐ the repo. 39 | -------------------------------------------------------------------------------- /React-Project-Counter-And-Counter-Buttons-With-State/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "todo-app", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "react": "^16.8.4", 7 | "react-dom": "^16.8.4", 8 | "react-scripts": "2.1.8" 9 | }, 10 | "scripts": { 11 | "start": "react-scripts start", 12 | "build": "react-scripts build", 13 | "test": "react-scripts test", 14 | "eject": "react-scripts eject" 15 | }, 16 | "eslintConfig": { 17 | "extends": "react-app" 18 | }, 19 | "browserslist": [ 20 | ">0.2%", 21 | "not dead", 22 | "not ie <= 11", 23 | "not op_mini all" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /React-Project-Counter-And-Counter-Buttons-With-State/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/React-Project-Counter-And-Counter-Buttons-With-State/public/favicon.ico -------------------------------------------------------------------------------- /React-Project-Counter-And-Counter-Buttons-With-State/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /SpringBoot-React-CRUD/fullstack/backend/src/main/java/com/urunov/FullstackApplication.java: -------------------------------------------------------------------------------- 1 | package com.urunov; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.web.bind.annotation.CrossOrigin; 6 | 7 | 8 | @SpringBootApplication 9 | //@EnableSwagger2 10 | @CrossOrigin 11 | public class FullstackApplication { 12 | 13 | public static void main(String[] args) { 14 | SpringApplication.run(FullstackApplication.class, args); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /SpringBoot-React-CRUD/fullstack/backend/src/main/java/com/urunov/exception/ResourceNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.urunov.exception; 2 | 3 | import org.springframework.http.HttpStatus; 4 | import org.springframework.web.bind.annotation.ResponseStatus; 5 | 6 | /** 7 | * Created by: 8 | * User: hamdamboy 9 | * Project: IntelliJ IDEA 10 | * Github: @urunov 11 | */ 12 | 13 | @ResponseStatus(value = HttpStatus.NOT_FOUND) 14 | public class ResourceNotFoundException extends RuntimeException{ 15 | 16 | private static final long serialVersionUID = 1L; 17 | public ResourceNotFoundException(String message){ 18 | super(message); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /SpringBoot-React-CRUD/fullstack/backend/src/main/java/com/urunov/model/Employee.java: -------------------------------------------------------------------------------- 1 | package com.urunov.model; 2 | 3 | import lombok.*; 4 | 5 | import javax.persistence.Entity; 6 | import javax.persistence.GeneratedValue; 7 | import javax.persistence.GenerationType; 8 | import javax.persistence.Id; 9 | 10 | /** 11 | * Created by: 12 | * User: hamdamboy 13 | * Project: IntelliJ IDEA 14 | * Github: @urunov 15 | */ 16 | 17 | @Data 18 | @Getter 19 | @Setter 20 | @ToString 21 | @NoArgsConstructor 22 | @AllArgsConstructor 23 | @Entity 24 | public class Employee { 25 | 26 | @Id 27 | @GeneratedValue(strategy = GenerationType.IDENTITY) 28 | private Long id; 29 | 30 | private String firstName; 31 | private String lastName; 32 | private String emailId; 33 | } 34 | -------------------------------------------------------------------------------- /SpringBoot-React-CRUD/fullstack/backend/src/main/java/com/urunov/repository/EmployeeRepository.java: -------------------------------------------------------------------------------- 1 | package com.urunov.repository; 2 | 3 | import com.urunov.model.Employee; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.stereotype.Repository; 6 | 7 | /** 8 | * Created by: 9 | * User: hamdamboy 10 | * Project: IntelliJ IDEA 11 | * Github: @urunov 12 | */ 13 | 14 | @Repository 15 | public interface EmployeeRepository extends JpaRepository { 16 | } 17 | -------------------------------------------------------------------------------- /SpringBoot-React-CRUD/fullstack/backend/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | #datasource 3 | spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver 4 | # //------------- MYSQL DB -------------------- 5 | 6 | spring.datasource.url = jdbc:mysql://localhost:3306/employeecrud?useSSL=false&serverTimezone=UTC&AllowPublicKeyRetrieval=True 7 | spring.datasource.username=root 8 | spring.datasource.password=posilka2020 9 | 10 | #The SQL dialect makes Hibernate generate better SQL for the chosen database 11 | 12 | spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect 13 | spring.jpa.hibernate.ddl-auto=update 14 | logging.level.org.hibernate.sql = DEBUG 15 | logging.level.org.hibernate.type = TRACE 16 | 17 | server.port=8080 -------------------------------------------------------------------------------- /SpringBoot-React-CRUD/fullstack/backend/src/test/java/com/uruov/FullstackApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.uruov; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class FullstackApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /SpringBoot-React-CRUD/fullstack/backendSwagger/src/main/java/com/urunov/FullstackApplication.java: -------------------------------------------------------------------------------- 1 | package com.urunov; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.web.bind.annotation.CrossOrigin; 6 | import springfox.documentation.swagger2.annotations.EnableSwagger2; 7 | 8 | 9 | @SpringBootApplication 10 | @EnableSwagger2 11 | @CrossOrigin 12 | public class FullstackApplication { 13 | 14 | public static void main(String[] args) { 15 | SpringApplication.run(FullstackApplication.class, args); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /SpringBoot-React-CRUD/fullstack/backendSwagger/src/main/java/com/urunov/exception/ResourceNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.urunov.exception; 2 | 3 | import org.springframework.http.HttpStatus; 4 | import org.springframework.web.bind.annotation.ResponseStatus; 5 | 6 | /** 7 | * Created by: 8 | * User: hamdamboy 9 | * Project: IntelliJ IDEA 10 | * Github: @urunov 11 | */ 12 | 13 | @ResponseStatus(value = HttpStatus.NOT_FOUND) 14 | public class ResourceNotFoundException extends RuntimeException{ 15 | 16 | private static final long serialVersionUID = 1L; 17 | public ResourceNotFoundException(String message){ 18 | super(message); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /SpringBoot-React-CRUD/fullstack/backendSwagger/src/main/java/com/urunov/model/Employee.java: -------------------------------------------------------------------------------- 1 | package com.urunov.model; 2 | 3 | import lombok.*; 4 | 5 | import javax.persistence.Entity; 6 | import javax.persistence.GeneratedValue; 7 | import javax.persistence.GenerationType; 8 | import javax.persistence.Id; 9 | 10 | /** 11 | * Created by: 12 | * User: hamdamboy 13 | * Project: IntelliJ IDEA 14 | * Github: @urunov 15 | */ 16 | 17 | @Data 18 | @Getter 19 | @Setter 20 | @ToString 21 | @NoArgsConstructor 22 | @AllArgsConstructor 23 | @Entity 24 | public class Employee { 25 | 26 | @Id 27 | @GeneratedValue(strategy = GenerationType.IDENTITY) 28 | private Long id; 29 | 30 | private String firstName; 31 | private String lastName; 32 | private String emailId; 33 | } 34 | -------------------------------------------------------------------------------- /SpringBoot-React-CRUD/fullstack/backendSwagger/src/main/java/com/urunov/repository/EmployeeRepository.java: -------------------------------------------------------------------------------- 1 | package com.urunov.repository; 2 | 3 | import com.urunov.model.Employee; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.stereotype.Repository; 6 | 7 | /** 8 | * Created by: 9 | * User: hamdamboy 10 | * Project: IntelliJ IDEA 11 | * Github: @urunov 12 | */ 13 | 14 | @Repository 15 | public interface EmployeeRepository extends JpaRepository { 16 | } 17 | -------------------------------------------------------------------------------- /SpringBoot-React-CRUD/fullstack/backendSwagger/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | #datasource 3 | spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver 4 | # //------------- MYSQL DB -------------------- 5 | 6 | spring.datasource.url = jdbc:mysql://localhost:3306/employeecrud?useSSL=false&serverTimezone=UTC&AllowPublicKeyRetrieval=True 7 | spring.datasource.username=root 8 | spring.datasource.password=posilka2020 9 | 10 | #The SQL dialect makes Hibernate generate better SQL for the chosen database 11 | 12 | spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect 13 | spring.jpa.hibernate.ddl-auto=update 14 | logging.level.org.hibernate.sql = DEBUG 15 | logging.level.org.hibernate.type = TRACE 16 | 17 | server.port=8080 -------------------------------------------------------------------------------- /SpringBoot-React-CRUD/fullstack/backendSwagger/src/test/java/com/uruov/FullstackApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.uruov; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class FullstackApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /SpringBoot-React-CRUD/fullstack/frontend/react-frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/SpringBoot-React-CRUD/fullstack/frontend/react-frontend/public/favicon.ico -------------------------------------------------------------------------------- /SpringBoot-React-CRUD/fullstack/frontend/react-frontend/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/SpringBoot-React-CRUD/fullstack/frontend/react-frontend/public/logo192.png -------------------------------------------------------------------------------- /SpringBoot-React-CRUD/fullstack/frontend/react-frontend/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/SpringBoot-React-CRUD/fullstack/frontend/react-frontend/public/logo512.png -------------------------------------------------------------------------------- /SpringBoot-React-CRUD/fullstack/frontend/react-frontend/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /SpringBoot-React-CRUD/fullstack/frontend/react-frontend/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /SpringBoot-React-CRUD/fullstack/frontend/react-frontend/src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /SpringBoot-React-CRUD/fullstack/frontend/react-frontend/src/components/FooterComponents.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | 3 | 4 | 5 | class FooterComponents extends Component { 6 | 7 | constructor(props){ 8 | super(props) 9 | 10 | this.state={ 11 | 12 | } 13 | } 14 | 15 | render() { 16 | return ( 17 |
18 |
19 | All Rights Reserved 2020 @Urunov Corporation 20 |
21 |
22 | ); 23 | } 24 | } 25 | 26 | export default FooterComponents; -------------------------------------------------------------------------------- /SpringBoot-React-CRUD/fullstack/frontend/react-frontend/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /SpringBoot-React-CRUD/fullstack/frontend/react-frontend/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | //import reportWebVitals from './reportWebVitals'; 6 | import 'bootstrap/dist/css/bootstrap.min.css'; 7 | import *as serviceWorker from './serviceWorker'; 8 | 9 | 10 | ReactDOM.render( 11 | 12 | 13 | , 14 | document.getElementById('root') 15 | ); 16 | 17 | // If you want to start measuring performance in your app, pass a function 18 | // to log results (for example: reportWebVitals(console.log)) 19 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 20 | 21 | //reportWebVitals(); 22 | 23 | serviceWorker.unregister(); 24 | -------------------------------------------------------------------------------- /SpringBoot-React-CRUD/fullstack/frontend/react-frontend/src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /SpringBoot-React-CRUD/fullstack/frontend/react-frontend/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /SpringBoot-React-Docker-API/fullstack/backend/src/main/java/com/urunov/backend/BackendApplication.java: -------------------------------------------------------------------------------- 1 | package com.urunov.backend; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | import springfox.documentation.swagger2.annotations.EnableSwagger2; 7 | 8 | @SpringBootApplication 9 | @EnableSwagger2 10 | public class BackendApplication { 11 | 12 | public static void main(String[] args) { 13 | SpringApplication.run(BackendApplication.class, args); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /SpringBoot-React-Docker-API/fullstack/backend/src/main/java/com/urunov/backend/Users.java: -------------------------------------------------------------------------------- 1 | package com.urunov.backend; 2 | 3 | import javax.persistence.Entity; 4 | import javax.persistence.GeneratedValue; 5 | import javax.persistence.GenerationType; 6 | import javax.persistence.Id; 7 | 8 | import lombok.AllArgsConstructor; 9 | import lombok.Data; 10 | import lombok.Getter; 11 | import lombok.NoArgsConstructor; 12 | import lombok.Setter; 13 | import lombok.ToString; 14 | 15 | @Data 16 | @Getter 17 | @Setter 18 | @AllArgsConstructor 19 | @NoArgsConstructor 20 | @ToString 21 | @Entity 22 | public class Users { 23 | 24 | @Id 25 | @GeneratedValue(strategy = GenerationType.IDENTITY) 26 | private Integer id; 27 | private String Name; 28 | private String Email; 29 | private String Password; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /SpringBoot-React-Docker-API/fullstack/backend/src/main/java/com/urunov/backend/UsersRespository.java: -------------------------------------------------------------------------------- 1 | package com.urunov.backend; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | import org.springframework.stereotype.Repository; 5 | 6 | @Repository 7 | public interface UsersRespository extends JpaRepository { 8 | 9 | } 10 | 11 | 12 | -------------------------------------------------------------------------------- /SpringBoot-React-Docker-API/fullstack/backend/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver 2 | # //------------- MYSQL DB -------------------- 3 | 4 | spring.datasource.url = jdbc:mysql://localhost:3306/onlinemarket?useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=false 5 | spring.datasource.username=urunov 6 | spring.datasource.password=posilka2020 7 | #The SQL dialect makes Hibernate generate better SQL for the chosen database 8 | 9 | spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect 10 | spring.jpa.hibernate.ddl-auto=update 11 | # logging.level.org.hibernate.sql = DEBUG 12 | # logging.level.org.hibernate.type = TRACE 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /SpringBoot-React-Docker-API/fullstack/backend/src/test/java/com/urunov/backend/BackendApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.urunov.backend; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class BackendApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /SpringBoot-React-Docker-API/fullstack/frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/SpringBoot-React-Docker-API/fullstack/frontend/public/favicon.ico -------------------------------------------------------------------------------- /SpringBoot-React-Docker-API/fullstack/frontend/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/SpringBoot-React-Docker-API/fullstack/frontend/public/logo192.png -------------------------------------------------------------------------------- /SpringBoot-React-Docker-API/fullstack/frontend/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/SpringBoot-React-Docker-API/fullstack/frontend/public/logo512.png -------------------------------------------------------------------------------- /SpringBoot-React-Docker-API/fullstack/frontend/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /SpringBoot-React-Docker-API/fullstack/frontend/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /SpringBoot-React-Docker-API/fullstack/frontend/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /SpringBoot-React-Docker-API/fullstack/frontend/src/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import logo from './logo.svg'; 3 | import './App.css'; 4 | 5 | function App() { 6 | return ( 7 |
8 |
9 | logo 10 |

11 | Edit src/App.js and save to reload. 12 |

13 | 19 | Learn React 20 | 21 |
22 |
23 | ); 24 | } 25 | 26 | export default App; 27 | -------------------------------------------------------------------------------- /SpringBoot-React-Docker-API/fullstack/frontend/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { render } from '@testing-library/react'; 3 | import App from './App'; 4 | 5 | test('renders learn react link', () => { 6 | const { getByText } = render(); 7 | const linkElement = getByText(/learn react/i); 8 | expect(linkElement).toBeInTheDocument(); 9 | }); 10 | -------------------------------------------------------------------------------- /SpringBoot-React-Docker-API/fullstack/frontend/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /SpringBoot-React-Docker-API/fullstack/frontend/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Document 7 | 8 | 9 | sdf 10 | 11 | -------------------------------------------------------------------------------- /SpringBoot-React-Docker-API/fullstack/frontend/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import React from 'react'; 5 | import ReactDOM from 'react-dom'; 6 | 7 | import * as serviceWorker from './serviceWorker'; 8 | 9 | ReactDOM.render( 10 | 11 | 12 | 13 | , 14 | document.getElementById('root') 15 | ); 16 | 17 | -------------------------------------------------------------------------------- /SpringBoot-React-Docker-API/fullstack/frontend/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom/extend-expect'; 6 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/exception/AppException.java: -------------------------------------------------------------------------------- 1 | package com.urunov.exception; 2 | 3 | import org.springframework.http.HttpStatus; 4 | import org.springframework.web.bind.annotation.ResponseStatus; 5 | 6 | /** 7 | * Created by: 8 | * User: hamdamboy 9 | * Project: IntelliJ IDEA 10 | * Github: @urunov 11 | */ 12 | @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) 13 | public class AppException extends RuntimeException 14 | { 15 | public AppException(String message){ 16 | super(message); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/exception/BadRequestException.java: -------------------------------------------------------------------------------- 1 | package com.urunov.exception; 2 | 3 | import org.springframework.http.HttpStatus; 4 | import org.springframework.web.bind.annotation.ResponseStatus; 5 | 6 | /** 7 | * Created by: 8 | * User: hamdamboy 9 | * Project: IntelliJ IDEA 10 | * Github: @urunov 11 | */ 12 | 13 | @ResponseStatus(HttpStatus.BAD_REQUEST) 14 | public class BadRequestException extends RuntimeException{ 15 | 16 | public BadRequestException(String message){ 17 | super(message); 18 | } 19 | 20 | public BadRequestException(String message, Throwable cause){ 21 | super(message, cause); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/kafkaService/Consumer.java: -------------------------------------------------------------------------------- 1 | package com.urunov.kafkaService; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | /** 9 | * Created by: 10 | * User: hamdamboy 11 | * Project: IntelliJ IDEA 12 | * Github: @urunov 13 | */ 14 | @Service 15 | public class Consumer { 16 | 17 | private final Logger LOG = LoggerFactory.getLogger(Consumer.class); 18 | 19 | // @Autowired 20 | // private GoodConsumerService goodConsumerService; 21 | } 22 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/model/Role.java: -------------------------------------------------------------------------------- 1 | package com.urunov.model; 2 | 3 | import com.urunov.model.enumdto.RoleName; 4 | import lombok.*; 5 | import org.hibernate.annotations.NaturalId; 6 | 7 | import javax.persistence.*; 8 | 9 | /** 10 | * Created by: 11 | * User: hamdamboy 12 | * Project: IntelliJ IDEA 13 | * Github: @urunov 14 | */ 15 | 16 | @Data 17 | @Getter 18 | @Setter 19 | @NoArgsConstructor 20 | @AllArgsConstructor 21 | @Entity 22 | @Table(name = "roles") 23 | public class Role { 24 | 25 | @Id 26 | @GeneratedValue(strategy = GenerationType.IDENTITY) 27 | private Long id; 28 | 29 | @Enumerated(EnumType.STRING) 30 | @NaturalId 31 | @Column(length = 60) 32 | private RoleName name; 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/model/enumdto/GoodChangeable.java: -------------------------------------------------------------------------------- 1 | package com.urunov.model.enumdto; 2 | 3 | import lombok.Data; 4 | import lombok.RequiredArgsConstructor; 5 | import lombok.ToString; 6 | 7 | /** 8 | * Created by: 9 | * User: hamdamboy 10 | * Project: IntelliJ IDEA 11 | * Github: @urunov 12 | */ 13 | 14 | 15 | 16 | @RequiredArgsConstructor 17 | @ToString 18 | public enum GoodChangeable { 19 | 20 | CHANGEABLE("Можно обменять / changeable"), UNCHANGEABLE("Нельзя обменять / unchangeable"); 21 | 22 | GoodChangeable(String title){ 23 | this.title = title; 24 | } 25 | private String title; 26 | } 27 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/model/enumdto/RoleName.java: -------------------------------------------------------------------------------- 1 | package com.urunov.model.enumdto; 2 | 3 | /** 4 | * Created by: 5 | * User: hamdamboy 6 | * Project: IntelliJ IDEA 7 | * Github: @urunov 8 | */ 9 | 10 | public enum RoleName { 11 | 12 | ROLE_NAME, 13 | ROLE_ADMIN 14 | } 15 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/model/gson/bitMasterApi/driverInfo/Account.java: -------------------------------------------------------------------------------- 1 | package com.urunov.model.gson.bitMasterApi.driverInfo; 2 | 3 | import com.google.gson.annotations.Expose; 4 | import com.google.gson.annotations.SerializedName; 5 | import lombok.Data; 6 | import lombok.Getter; 7 | import lombok.Setter; 8 | 9 | /** 10 | * Created by: 11 | * User: hamdamboy 12 | * Project: IntelliJ IDEA 13 | * Github: @urunov 14 | */ 15 | @Data 16 | @Getter 17 | @Setter 18 | public class Account { 19 | 20 | @SerializedName("account_kind") 21 | @Expose 22 | private Integer accountKind; 23 | 24 | @SerializedName("balance") 25 | @Expose 26 | private Float balance; 27 | } 28 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/model/gson/bitMasterApi/driverInfo/DriverInfo.java: -------------------------------------------------------------------------------- 1 | package com.urunov.model.gson.bitMasterApi.driverInfo; 2 | 3 | import com.google.gson.annotations.Expose; 4 | import com.google.gson.annotations.SerializedName; 5 | import lombok.Getter; 6 | import lombok.Setter; 7 | 8 | /** 9 | * Created by: 10 | * User: hamdamboy 11 | * Project: IntelliJ IDEA 12 | * Github: @urunov 13 | */ 14 | 15 | @Getter 16 | @Setter 17 | public class DriverInfo { 18 | 19 | @SerializedName("code") 20 | @Expose 21 | private Integer code; 22 | 23 | @SerializedName("descr") 24 | @Expose 25 | private String descr; 26 | 27 | @SerializedName("data") 28 | @Expose 29 | private Data data; 30 | } 31 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/model/gson/bitMasterApi/orderState/OrderState.java: -------------------------------------------------------------------------------- 1 | package com.urunov.model.gson.bitMasterApi.orderState; 2 | 3 | import com.google.gson.annotations.Expose; 4 | import com.google.gson.annotations.SerializedName; 5 | import lombok.Getter; 6 | import lombok.RequiredArgsConstructor; 7 | import lombok.Setter; 8 | 9 | /** 10 | * Created by: 11 | * User: hamdamboy 12 | * Project: IntelliJ IDEA 13 | * Github: @urunov 14 | */ 15 | @Getter 16 | @Setter 17 | @RequiredArgsConstructor 18 | public class OrderState { 19 | 20 | @SerializedName("code") 21 | @Expose 22 | private Integer code; 23 | 24 | @SerializedName("descr") 25 | @Expose 26 | private String descr; 27 | 28 | @SerializedName("data") 29 | @Expose 30 | private Data data; 31 | } 32 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/payload/ApiResponse.java: -------------------------------------------------------------------------------- 1 | package com.urunov.payload; 2 | 3 | import lombok.*; 4 | 5 | import java.util.Date; 6 | 7 | /** 8 | * Created by: 9 | * User: hamdamboy 10 | * Project: IntelliJ IDEA 11 | * Github: @urunov 12 | */ 13 | @Data 14 | @Getter 15 | @Setter 16 | @AllArgsConstructor 17 | @RequiredArgsConstructor 18 | public class ApiResponse { 19 | 20 | private Boolean success; 21 | private String message; 22 | private Date date; 23 | private Object object; 24 | 25 | 26 | public ApiResponse(boolean success, String message) { 27 | this.success = success; 28 | this.message = message; 29 | } 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/payload/SmsResponse.java: -------------------------------------------------------------------------------- 1 | package com.urunov.payload; 2 | 3 | import lombok.*; 4 | 5 | import javax.validation.constraints.NotBlank; 6 | 7 | /** 8 | * User: hamdamboy 9 | * Project: Shopping 10 | * Github: @urunov 11 | */ 12 | @Data 13 | @Getter 14 | @Setter 15 | @AllArgsConstructor 16 | @NoArgsConstructor 17 | public class SmsResponse { 18 | 19 | @NotBlank 20 | private String phone; 21 | 22 | private String smsCode; 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/payload/UserIdentityAvailability.java: -------------------------------------------------------------------------------- 1 | package com.urunov.payload; 2 | 3 | import lombok.Data; 4 | import lombok.Getter; 5 | import lombok.Setter; 6 | 7 | /** 8 | * Created by: 9 | * User: hamdamboy 10 | * Project: IntelliJ IDEA 11 | * Github: @urunov 12 | */ 13 | @Data 14 | @Getter 15 | @Setter 16 | public class UserIdentityAvailability { 17 | 18 | private Boolean available; 19 | 20 | public UserIdentityAvailability(Boolean available) { 21 | this.available = available; 22 | } 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/payload/good/GoodListResponse.java: -------------------------------------------------------------------------------- 1 | package com.urunov.payload.good; 2 | 3 | import lombok.*; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Created by: 9 | * User: hamdamboy 10 | * Project: IntelliJ IDEA 11 | * Github: @urunov 12 | */ 13 | @Data 14 | @AllArgsConstructor 15 | @NoArgsConstructor 16 | @Getter 17 | @Setter 18 | public class GoodListResponse 19 | { 20 | 21 | List goodList; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/payload/good/GoodQuantityResponse.java: -------------------------------------------------------------------------------- 1 | package com.urunov.payload.good; 2 | 3 | import lombok.*; 4 | 5 | /** 6 | * User: hamdamboy 7 | * Project: Shopping 8 | * Github: @urunov 9 | */ 10 | @Data 11 | @Getter 12 | @Setter 13 | @AllArgsConstructor 14 | @NoArgsConstructor 15 | public class GoodQuantityResponse { 16 | 17 | private Long goodId; 18 | 19 | private String eventType; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/payload/order/OrderRequest.java: -------------------------------------------------------------------------------- 1 | package com.urunov.payload.order; 2 | 3 | import com.urunov.payload.good.GoodOrderDetailsResponse; 4 | import lombok.*; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * User: hamdamboy 10 | * Project: Shopping 11 | * Github: @urunov 12 | */ 13 | @Data 14 | @Getter 15 | @Setter 16 | @NoArgsConstructor 17 | @AllArgsConstructor 18 | public class OrderRequest { 19 | 20 | private String email; 21 | 22 | private String additionalPhone; 23 | 24 | private String address; 25 | 26 | private String name; 27 | 28 | private String comment; 29 | 30 | private Float deliveryPrice; 31 | 32 | private List goods; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/payload/payment/CKassaRequestProperties.java: -------------------------------------------------------------------------------- 1 | package com.urunov.payload.payment; 2 | 3 | import lombok.*; 4 | 5 | /** 6 | * User: hamdamboy 7 | * Project: Shopping 8 | * Github: @urunov 9 | */ 10 | 11 | @Data 12 | @Setter 13 | @Getter 14 | @AllArgsConstructor 15 | @NoArgsConstructor 16 | public class CKassaRequestProperties { 17 | 18 | private String name; 19 | 20 | private String value; 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/payload/payment/PaymentBtnResponse.java: -------------------------------------------------------------------------------- 1 | package com.urunov.payload.payment; 2 | 3 | import lombok.*; 4 | import org.springframework.messaging.handler.annotation.SendTo; 5 | 6 | /** 7 | * User: hamdamboy 8 | * Project: Shopping 9 | * Github: @urunov 10 | */ 11 | 12 | @Data 13 | @Getter 14 | @Setter 15 | @ToString 16 | @NoArgsConstructor 17 | @AllArgsConstructor 18 | public class PaymentBtnResponse { 19 | 20 | public String sign; 21 | 22 | public String shopToken; 23 | 24 | public String regPayNum; 25 | 26 | public String payUrl; 27 | 28 | public String code; 29 | 30 | public String userMessage; 31 | } 32 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/repository/OfferRepository.java: -------------------------------------------------------------------------------- 1 | package com.urunov.repository; 2 | 3 | import com.urunov.model.Offer; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | /** 7 | * Created by: 8 | * User: hamdamboy 9 | * Project: IntelliJ IDEA 10 | * Github: @urunov 11 | */ 12 | public interface OfferRepository extends JpaRepository 13 | { 14 | Offer findOfferById(Long id); 15 | } 16 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/repository/OrderDetailsRepository.java: -------------------------------------------------------------------------------- 1 | package com.urunov.repository; 2 | 3 | import com.urunov.model.Good; 4 | import com.urunov.model.OrderDetails; 5 | import com.urunov.model.Orders; 6 | import org.springframework.data.jpa.repository.JpaRepository; 7 | import org.springframework.stereotype.Repository; 8 | 9 | import java.util.List; 10 | import java.util.Optional; 11 | 12 | /** 13 | * Created by: 14 | * User: hamdamboy 15 | * Project: IntelliJ IDEA 16 | * Github: @urunov 17 | */ 18 | @Repository 19 | public interface OrderDetailsRepository extends JpaRepository { 20 | 21 | List findAllByOrder(Orders orders); 22 | 23 | Optional findByGoodAndOrder(Good good, Orders order); 24 | } 25 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/security/CurrentUser.java: -------------------------------------------------------------------------------- 1 | package com.urunov.security; 2 | 3 | import org.springframework.security.core.annotation.AuthenticationPrincipal; 4 | 5 | import java.lang.annotation.*; 6 | 7 | /** 8 | * Created by: 9 | * User: hamdamboy 10 | * Project: IntelliJ IDEA 11 | * Github: @urunov 12 | */ 13 | @Target({ElementType.PARAMETER, ElementType.TYPE}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Documented 16 | @AuthenticationPrincipal 17 | public @interface CurrentUser { 18 | 19 | } 20 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/service/RetailerService.java: -------------------------------------------------------------------------------- 1 | package com.urunov.service; 2 | 3 | /** 4 | * Created by: 5 | * User: hamdamboy 6 | * Project: IntelliJ IDEA 7 | * Github: @urunov 8 | */ 9 | public class RetailerService { 10 | } 11 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/service/taxiMaster/utils/AddressUtils.java: -------------------------------------------------------------------------------- 1 | package com.urunov.service.taxiMaster.utils; 2 | 3 | import org.springframework.stereotype.Service; 4 | 5 | /** 6 | * Created by: 7 | * User: hamdamboy 8 | * Project: IntelliJ IDEA 9 | * Github: @urunov 10 | */ 11 | @Service 12 | public class AddressUtils { 13 | 14 | public String cleanAddress(String address, String city){ 15 | 16 | // String pattern1 17 | 18 | String pattern1 = "�*\\.*\\s*" + city + ",*"; // 19 | String pattern2 = "\\s*" + city + ",*"; // 20 | 21 | return address 22 | .trim() 23 | .replaceAll(pattern1, "") 24 | .replaceAll(pattern2, "") 25 | .trim(); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/utils/AppConstants.java: -------------------------------------------------------------------------------- 1 | package com.urunov.utils; 2 | 3 | /** 4 | * Created by: 5 | * User: hamdamboy 6 | * Project: IntelliJ IDEA 7 | * Github: @urunov 8 | */ 9 | public interface AppConstants { 10 | 11 | public static final String DEFAULT_PAGE_NUMBER = "0"; 12 | public static final String DEFAULT_PAGE_SIZE = "10"; 13 | 14 | public static final Integer MAX_PAGE_SIZE = 50; 15 | } 16 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/utils/OfferUnits.java: -------------------------------------------------------------------------------- 1 | package com.urunov.utils; 2 | 3 | import com.urunov.model.Offer; 4 | import org.apache.tomcat.util.codec.binary.Base64; 5 | 6 | import java.nio.charset.StandardCharsets; 7 | import java.util.List; 8 | 9 | /** 10 | * User: hamdamboy 11 | * Project: Shopping 12 | * Github: @urunov 13 | */ 14 | public class OfferUnits { 15 | 16 | public void initOfferImages(List offerList) 17 | { 18 | for (Offer offer : offerList) 19 | { 20 | if (offer.getImage() != null) 21 | offer.setImageUrl(new String(Base64.decodeBase64(offer.getImage()), StandardCharsets.UTF_8)); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/utils/StringUtils.java: -------------------------------------------------------------------------------- 1 | package com.urunov.utils; 2 | 3 | import org.springframework.stereotype.Component; 4 | 5 | /** 6 | * Created by: 7 | * User: hamdamboy 8 | * Project: IntelliJ IDEA 9 | * Github: @urunov 10 | */ 11 | 12 | @Component 13 | public class StringUtils { 14 | 15 | public String removeUseless(String value) 16 | { 17 | if(value==null) 18 | return null; 19 | String result = value.replaceAll("(\r\n|\n) +", ""); 20 | return result.trim(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/utils/UserUtils.java: -------------------------------------------------------------------------------- 1 | package com.urunov.utils; 2 | 3 | import com.urunov.model.User; 4 | import com.urunov.payload.UserProfile; 5 | import org.apache.tomcat.util.codec.binary.Base64; 6 | import org.springframework.stereotype.Component; 7 | 8 | import java.nio.charset.StandardCharsets; 9 | 10 | /** 11 | * Created by: 12 | * User: hamdamboy 13 | * Project: IntelliJ IDEA 14 | * Github: @urunov 15 | */ 16 | @Component 17 | public class UserUtils 18 | { 19 | 20 | public void initUserAvatar(UserProfile userProfile, User user){ 21 | 22 | if(user.getAvatar() !=null){ 23 | userProfile.setAvatarImgUrl(new String(Base64.decodeBase64(user.getAvatar()), StandardCharsets.UTF_8)); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/utils/date/formats/PaymentDateFormat.java: -------------------------------------------------------------------------------- 1 | package com.urunov.utils.date.formats; 2 | 3 | import java.text.DateFormatSymbols; 4 | import java.text.SimpleDateFormat; 5 | import java.util.Locale; 6 | 7 | /** 8 | * User: hamdamboy 9 | * Project: Shopping 10 | * Github: @urunov 11 | */ 12 | public class PaymentDateFormat extends SimpleDateFormat { 13 | 14 | public PaymentDateFormat() 15 | { 16 | super("dd.MM.YYYY HH:mm", new Locale("ru", "RU")); 17 | DateFormatSymbols russSymbol = new DateFormatSymbols(new Locale("ru", "RU")); 18 | setDateFormatSymbols(russSymbol); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/utils/date/formats/RussianDateFormat.java: -------------------------------------------------------------------------------- 1 | package com.urunov.utils.date.formats; 2 | 3 | import java.text.DateFormatSymbols; 4 | import java.text.SimpleDateFormat; 5 | import java.util.Locale; 6 | 7 | /** 8 | * User: hamdamboy 9 | * Project: Shopping 10 | * Github: @urunov 11 | */ 12 | public class RussianDateFormat extends SimpleDateFormat { 13 | 14 | private static final long serialVersionUID = 3578411123793165937L; 15 | 16 | public RussianDateFormat() 17 | { 18 | super("YYYYMMddhhmmss", new Locale("ru", "RU")); 19 | DateFormatSymbols russSymbol = new DateFormatSymbols(new Locale("ru", "RU")); 20 | setDateFormatSymbols(russSymbol); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/main/resources/kafka.properties: -------------------------------------------------------------------------------- 1 | spring.kafka.bootstrap-servers=localhost:9092 2 | message.topic.requestsms=RequestSms 3 | message.topic.portal_orders=esdPortalOrders 4 | message.topic.requestGoods=RequestGoods 5 | message.topic.requestTaxiSettings=esdShopperDeliveryService 6 | message.topic.requestRetailers=RetailerSettings 7 | message.topic.requestOrders=esdShopperOrders 8 | group.id=deliverylinegroup -------------------------------------------------------------------------------- /SpringBoot-React-ShoppingMall/fullstack/backend/src/test/java/com/urunov/ShoppingApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.urunov; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class ShoppingApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/ModelApplication.java: -------------------------------------------------------------------------------- 1 | package com.urunov; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; 6 | import org.springframework.cache.annotation.EnableCaching; 7 | import org.springframework.context.annotation.ComponentScan; 8 | import org.springframework.context.annotation.Configuration; 9 | 10 | @SpringBootApplication 11 | public class ModelApplication { 12 | 13 | public static void main(String[] args) { 14 | SpringApplication.run(ModelApplication.class, args); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/config/AppConfig.java: -------------------------------------------------------------------------------- 1 | package com.urunov.config; 2 | 3 | import org.modelmapper.ModelMapper; 4 | import org.modelmapper.convention.MatchingStrategies; 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.context.annotation.Configuration; 7 | 8 | /** 9 | * User: hamdamboy 10 | * Project: model 11 | * Github: @urunov 12 | */ 13 | @Configuration 14 | public class AppConfig { 15 | 16 | @Bean 17 | public ModelMapper modelMapper() { 18 | 19 | ModelMapper modelMapper = new ModelMapper(); 20 | modelMapper.getConfiguration().setMatchingStrategy(MatchingStrategies.LOOSE); 21 | return modelMapper; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/config/CorsConfig.java: -------------------------------------------------------------------------------- 1 | package com.urunov.config; 2 | 3 | import org.springframework.context.annotation.Configuration; 4 | import org.springframework.web.servlet.config.annotation.CorsRegistry; 5 | import org.springframework.web.servlet.config.annotation.EnableWebMvc; 6 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 7 | 8 | /** 9 | * User: hamdamboy 10 | * Project: model 11 | * Github: @urunov 12 | */ 13 | @Configuration 14 | @EnableWebMvc 15 | public class CorsConfig implements WebMvcConfigurer { 16 | 17 | @Override 18 | public void addCorsMappings(CorsRegistry registry) { 19 | registry.addMapping("/**").allowedOrigins(System.getenv("REACT_CLIENT_URL")) 20 | .allowedMethods("GET", "POST"); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/dao/sql/categories/GenderCategoryRepository.java: -------------------------------------------------------------------------------- 1 | //package com.urunov.dao.sql.categories; 2 | // 3 | //import com.urunov.entity.categories.GenderCategory; 4 | //import org.springframework.data.jpa.repository.JpaRepository; 5 | // 6 | ///** 7 | // * User: hamdamboy 8 | // * Project: model 9 | // * Github: @urunov 10 | // */ 11 | //public interface GenderCategoryRepository extends JpaRepository { 12 | // 13 | //// @Query(value = "SELECT g FROM GenderCategory g") 14 | //// List getAllData(); 15 | // 16 | // GenderCategory findByType(String gender); 17 | //} 18 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/dao/sql/categories/PriceRangeCategoryRepository.java: -------------------------------------------------------------------------------- 1 | //package com.urunov.dao.sql.categories; 2 | // 3 | //import com.urunov.entity.categories.PriceRangeCategory; 4 | //import org.springframework.data.jpa.repository.JpaRepository; 5 | // 6 | ///** 7 | // * User: hamdamboy 8 | // * Project: model 9 | // * Github: @urunov 10 | // */ 11 | //public interface PriceRangeCategoryRepository extends JpaRepository { 12 | // 13 | //// @Query(value = "SELECT g from GenderCategory g") 14 | //// List getAllData(); 15 | // 16 | // PriceRangeCategory findByType(String type); 17 | //} 18 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/dao/sql/categories/ProductBrandCategoryRepository.java: -------------------------------------------------------------------------------- 1 | //package com.urunov.dao.sql.categories; 2 | // 3 | //import com.urunov.entity.categories.ProductBrandCategory; 4 | //import org.springframework.data.jpa.repository.JpaRepository; 5 | // 6 | ///** 7 | // * User: hamdamboy 8 | // * Project: model 9 | // * Github: @urunov 10 | // */ 11 | //public interface ProductBrandCategoryRepository extends JpaRepository { 12 | // 13 | //// @Query(value = "SELECT p from ProductBrandCategory p") 14 | //// List getAllData(); 15 | // 16 | // ProductBrandCategory findByType(String brandName); 17 | //} 18 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/dao/sql/categories/SortByCategoryRepository.java: -------------------------------------------------------------------------------- 1 | //package com.urunov.dao.sql.categories; 2 | // 3 | //import com.urunov.entity.categories.SortByCategory; 4 | //import org.springframework.data.jpa.repository.JpaRepository; 5 | // 6 | ///** 7 | // * User: hamdamboy 8 | // * Project: model 9 | // * Github: @urunov 10 | // */ 11 | //public interface SortByCategoryRepository extends JpaRepository { 12 | // 13 | //// @Query(value = "SELECT s FROM SortByCategory s") 14 | //// List getAllData(); 15 | // 16 | // // SortByCategory findByType(String type); 17 | // 18 | //} 19 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/dao/sql/images/ApparelImagesRepository.java: -------------------------------------------------------------------------------- 1 | //package com.urunov.dao.sql.images; 2 | // 3 | //import com.urunov.entity.images.ApparelImages; 4 | //import org.springframework.data.jpa.repository.JpaRepository; 5 | // 6 | //import java.util.List; 7 | // 8 | ///** 9 | // * User: hamdamboy 10 | // * Project: model 11 | // * Github: @urunov 12 | // */ 13 | //public interface ApparelImagesRepository extends JpaRepository { 14 | // 15 | //// @Query(value = "SELECT DISTINCT c FROM ApparelImages c") 16 | // // List getAllData(); 17 | //} 18 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/dao/sql/images/BrandImagesRepository.java: -------------------------------------------------------------------------------- 1 | //package com.urunov.dao.sql.images; 2 | // 3 | //import com.urunov.entity.images.BrandImages; 4 | //import org.springframework.data.jpa.repository.JpaRepository; 5 | //import org.springframework.data.jpa.repository.Query; 6 | // 7 | //import java.util.List; 8 | // 9 | ///** 10 | // * User: hamdamboy 11 | // * Project: model 12 | // * Github: @urunov 13 | // */ 14 | //public interface BrandImagesRepository extends JpaRepository { 15 | // 16 | // @Query(value = "SELECT DISTINCT b FROM BrandImages b") 17 | // List getAllData(); 18 | //} 19 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/dao/sql/images/CarouselImagesRepository.java: -------------------------------------------------------------------------------- 1 | //package com.urunov.dao.sql.images; 2 | // 3 | //import com.urunov.entity.images.CarouselImages; 4 | //import org.springframework.data.jpa.repository.JpaRepository; 5 | //import org.springframework.data.jpa.repository.Query; 6 | // 7 | //import java.util.List; 8 | // 9 | ///** 10 | // * User: hamdamboy 11 | // * Project: model 12 | // * Github: @urunov 13 | // */ 14 | //public interface CarouselImagesRepository extends JpaRepository { 15 | // 16 | //// @Query(value = "SELECT DISTINCT c FROM CarouselImages c") 17 | //// List getAllData(); 18 | //} 19 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/dao/sql/info/AddressInfoRepository.java: -------------------------------------------------------------------------------- 1 | package com.urunov.dao.sql.info; 2 | 3 | import com.urunov.entity.info.AddressInfo; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | /** 7 | * User: hamdamboy 8 | * Project: model 9 | * Github: @urunov 10 | */ 11 | public interface AddressInfoRepository extends JpaRepository { 12 | } 13 | 14 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/dao/sql/info/BankInfoRepository.java: -------------------------------------------------------------------------------- 1 | package com.urunov.dao.sql.info; 2 | 3 | 4 | import com.urunov.entity.info.BankInfo; 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | /** 8 | * User: hamdamboy 9 | * Project: model 10 | * Github: @urunov 11 | */ 12 | public interface BankInfoRepository extends JpaRepository { 13 | } 14 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/dao/sql/info/ContactInfoRepository.java: -------------------------------------------------------------------------------- 1 | package com.urunov.dao.sql.info; 2 | 3 | import com.urunov.entity.info.ContactInfo; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | /** 7 | * User: hamdamboy 8 | * Project: model 9 | * Github: @urunov 10 | */ 11 | public interface ContactInfoRepository extends JpaRepository { 12 | } 13 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/dao/sql/info/OrderInfoRepository.java: -------------------------------------------------------------------------------- 1 | package com.urunov.dao.sql.info; 2 | 3 | import com.urunov.entity.info.OrderInfo; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | /** 7 | * User: hamdamboy 8 | * Project: model 9 | * Github: @urunov 10 | */ 11 | public interface OrderInfoRepository extends JpaRepository { 12 | } 13 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/dao/sql/info/impl/ProductInfoRepositoryImpl.java: -------------------------------------------------------------------------------- 1 | package com.urunov.dao.sql.info.impl; 2 | 3 | /** 4 | * User: hamdamboy 5 | * Project: model 6 | * Github: @urunov 7 | */ 8 | public class ProductInfoRepositoryImpl { 9 | } 10 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/dao/sql/info/queryhelpers/ProductQueryHelper.java: -------------------------------------------------------------------------------- 1 | package com.urunov.dao.sql.info.queryhelpers; 2 | 3 | /** 4 | * User: hamdamboy 5 | * Project: model 6 | * Github: @urunov 7 | */ 8 | public class ProductQueryHelper { 9 | } 10 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/dao/sql/info/queryhelpers/context/ParamsToQueryContext.java: -------------------------------------------------------------------------------- 1 | package com.urunov.dao.sql.info.queryhelpers.context; 2 | 3 | /** 4 | * User: hamdamboy 5 | * Project: model 6 | * Github: @urunov 7 | */ 8 | public class ParamsToQueryContext { 9 | } 10 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/dto/ApparelDTO.java: -------------------------------------------------------------------------------- 1 | package com.urunov.dto; 2 | 3 | import lombok.*; 4 | 5 | import java.io.Serializable; 6 | 7 | /** 8 | * User: hamdamboy 9 | * Project: model 10 | * Github: @urunov 11 | */ 12 | 13 | @Getter 14 | @Setter 15 | @NoArgsConstructor 16 | @AllArgsConstructor 17 | @ToString 18 | public class ApparelDTO implements Serializable { 19 | 20 | private int id; 21 | } 22 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/dto/ApparelImagesDTO.java: -------------------------------------------------------------------------------- 1 | package com.urunov.dto; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * User: hamdamboy 7 | * Project: security 8 | * Github: @urunov 9 | */ 10 | public class ApparelImagesDTO implements Serializable { 11 | 12 | private String title; 13 | private String imageLocalPath; 14 | private String imageUrl; 15 | 16 | private ApparelDTO apparelDTO; 17 | 18 | private GenderDTO genderInfo; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/dto/BrandCategoryDTO.java: -------------------------------------------------------------------------------- 1 | package com.urunov.dto; 2 | 3 | import lombok.*; 4 | 5 | import java.io.Serializable; 6 | 7 | /** 8 | * User: hamdamboy 9 | * Project: model 10 | * Github: @urunov 11 | */ 12 | 13 | @Data 14 | @Getter 15 | @Setter 16 | @NoArgsConstructor 17 | @AllArgsConstructor 18 | public class BrandCategoryDTO implements Serializable { 19 | 20 | private int id; 21 | } 22 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/dto/BrandImageDTO.java: -------------------------------------------------------------------------------- 1 | package com.urunov.dto; 2 | 3 | import jdk.jfr.DataAmount; 4 | import lombok.*; 5 | 6 | import java.io.Serializable; 7 | 8 | /** 9 | * User: hamdamboy 10 | * Project: security 11 | * Github: @urunov 12 | */ 13 | @Data 14 | @Getter 15 | @Setter 16 | @NoArgsConstructor 17 | @AllArgsConstructor 18 | @ToString 19 | public class BrandImageDTO implements Serializable { 20 | 21 | private String title; 22 | 23 | private String imageLocalPath; 24 | 25 | private String imageURL; 26 | 27 | private BrandCategoryDTO brandInfo; 28 | } 29 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/dto/BrandsAndApparelsDTO.java: -------------------------------------------------------------------------------- 1 | package com.urunov.dto; 2 | 3 | import lombok.*; 4 | 5 | import java.io.Serializable; 6 | import java.util.List; 7 | 8 | /** 9 | * User: hamdamboy 10 | * Project: model 11 | * Github: @urunov 12 | */ 13 | @Data 14 | @Getter 15 | @Setter 16 | @NoArgsConstructor 17 | @AllArgsConstructor 18 | @ToString 19 | public class BrandsAndApparelsDTO implements Serializable { 20 | 21 | List brands; 22 | List apparels; 23 | } 24 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/dto/CarouselImagesDTO.java: -------------------------------------------------------------------------------- 1 | package com.urunov.dto; 2 | 3 | import lombok.*; 4 | 5 | import java.io.Serializable; 6 | 7 | @AllArgsConstructor 8 | @NoArgsConstructor 9 | @Getter 10 | @Setter 11 | @ToString 12 | public class CarouselImagesDTO implements Serializable { 13 | 14 | private int id; 15 | private String name; 16 | private String title; 17 | 18 | private String imageLocalPath; 19 | 20 | private String imageURL; 21 | 22 | } 23 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/dto/CustomerDTO.java: -------------------------------------------------------------------------------- 1 | package com.urunov.dto; 2 | 3 | import lombok.*; 4 | 5 | import java.io.Serializable; 6 | 7 | @Data 8 | @Getter 9 | @Setter 10 | @NoArgsConstructor 11 | @AllArgsConstructor 12 | @ToString 13 | public class CustomerDTO implements Serializable { 14 | 15 | private int totalCustomer; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/dto/FilterAttributesDTO.java: -------------------------------------------------------------------------------- 1 | package com.urunov.dto; 2 | 3 | import lombok.*; 4 | 5 | import java.io.Serializable; 6 | 7 | /** 8 | * User: hamdamboy 9 | * Project: model 10 | * Github: @urunov 11 | */ 12 | @Getter 13 | @Setter 14 | @NoArgsConstructor 15 | @AllArgsConstructor 16 | @ToString 17 | public class FilterAttributesDTO implements Serializable { 18 | 19 | Integer id; 20 | String value; 21 | } 22 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/dto/FilterAttributesWithTotalltemsDTO.java: -------------------------------------------------------------------------------- 1 | package com.urunov.dto; 2 | 3 | import lombok.*; 4 | 5 | /** 6 | * User: hamdamboy 7 | * Project: model 8 | * Github: @urunov 9 | */ 10 | @Data 11 | @Getter 12 | @Setter 13 | @ToString 14 | @NoArgsConstructor 15 | @AllArgsConstructor 16 | public class FilterAttributesWithTotalltemsDTO { 17 | 18 | Integer id; 19 | String value; 20 | Long totalItems; 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/dto/GenderDTO.java: -------------------------------------------------------------------------------- 1 | package com.urunov.dto; 2 | 3 | import lombok.*; 4 | 5 | import java.io.Serializable; 6 | 7 | /** 8 | * User: hamdamboy 9 | * Project: model 10 | * Github: @urunov 11 | */ 12 | 13 | @Data 14 | @Getter 15 | @Setter 16 | @NoArgsConstructor 17 | @AllArgsConstructor 18 | @ToString 19 | public class GenderDTO implements Serializable { 20 | 21 | private int id; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/dto/ProductInfoDTO.java: -------------------------------------------------------------------------------- 1 | package com.urunov.dto; 2 | 3 | import com.urunov.entity.info.ProductInfo; 4 | import lombok.*; 5 | 6 | import java.io.Serializable; 7 | import java.util.List; 8 | 9 | /** 10 | * User: hamdamboy 11 | * Project: model 12 | * Github: @urunov 13 | */ 14 | 15 | @Data 16 | @Getter 17 | @Setter 18 | @NoArgsConstructor 19 | @AllArgsConstructor 20 | @ToString 21 | public class ProductInfoDTO implements Serializable { 22 | 23 | private Long totalCount; 24 | private List products; 25 | } 26 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/dto/SearchSuggestionForThreeAttrDTO.java: -------------------------------------------------------------------------------- 1 | package com.urunov.dto; 2 | 3 | import lombok.*; 4 | 5 | import java.io.Serializable; 6 | 7 | /** 8 | * User: hamdamboy 9 | * Project: security 10 | * Github: @urunov 11 | */ 12 | 13 | 14 | @Data 15 | @Getter 16 | @Setter 17 | @NoArgsConstructor 18 | @AllArgsConstructor 19 | @ToString 20 | public class SearchSuggestionForThreeAttrDTO implements Serializable { 21 | 22 | Integer attr1_id; 23 | String attr1_type; 24 | Integer attr2_id; 25 | String attr2_type; 26 | Integer attr3_id; 27 | String attr3_type; 28 | } 29 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/dto/SearchSuggestionForTwoAttrDTO.java: -------------------------------------------------------------------------------- 1 | package com.urunov.dto; 2 | 3 | import lombok.*; 4 | 5 | import java.io.Serializable; 6 | 7 | /** 8 | * User: hamdamboy 9 | * Project: security 10 | * Github: @urunov 11 | */ 12 | @Data 13 | @Getter 14 | @Setter 15 | @AllArgsConstructor 16 | @NoArgsConstructor 17 | @ToString 18 | public class SearchSuggestionForTwoAttrDTO implements Serializable { 19 | 20 | Integer attr1_id; 21 | String attr1_type; 22 | Integer attr2_id; 23 | String attr2_type; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/entity/categories/SortByCategory.java: -------------------------------------------------------------------------------- 1 | package com.urunov.entity.categories; 2 | 3 | import lombok.*; 4 | 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import java.io.Serializable; 9 | 10 | /** 11 | * User: hamdamboy 12 | * Project: model 13 | * Github: @urunov 14 | */ 15 | 16 | @Getter 17 | @Setter 18 | @AllArgsConstructor 19 | @NoArgsConstructor 20 | @ToString 21 | public class SortByCategory implements Serializable { 22 | 23 | @Id 24 | @GeneratedValue(strategy = GenerationType.IDENTITY) 25 | private int id; 26 | 27 | private String type; 28 | } 29 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/entityResponse/HomeTabsDataResponse.java: -------------------------------------------------------------------------------- 1 | package com.urunov.model; 2 | 3 | import com.urunov.dto.BrandsAndApparelsDTO; 4 | import lombok.*; 5 | 6 | import java.io.Serializable; 7 | 8 | /** 9 | * User: hamdamboy 10 | * Project: model 11 | * Github: @urunov 12 | */ 13 | 14 | @Data 15 | @Getter 16 | @Setter 17 | @NoArgsConstructor 18 | @AllArgsConstructor 19 | @ToString 20 | public class HomeTabsDataResponse implements Serializable { 21 | 22 | private BrandsAndApparelsDTO men; 23 | private BrandsAndApparelsDTO women; 24 | private BrandsAndApparelsDTO boys; 25 | private BrandsAndApparelsDTO girls; 26 | private BrandsAndApparelsDTO essentials; 27 | private BrandsAndApparelsDTO homeAndLiving; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/service/interfaces/LoadFakeDataService.java: -------------------------------------------------------------------------------- 1 | package com.urunov.service.interfaces; 2 | 3 | import org.springframework.context.annotation.Configuration; 4 | 5 | /** 6 | * User: hamdamboy 7 | * Project: model 8 | * Github: @urunov 9 | */ 10 | @Configuration 11 | public interface LoadFakeDataService { 12 | 13 | boolean loadTestData(); 14 | } 15 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/java/com/urunov/util/resulttransformers/IListResultTransformer.java: -------------------------------------------------------------------------------- 1 | //package com.urunov.util.resulttransformers; 2 | // 3 | //import org.hibernate.transform.ResultTransformer; 4 | // 5 | //import java.util.List; 6 | // 7 | ///** 8 | // * User: hamdamboy 9 | // * Project: security 10 | // * Github: @urunov 11 | // */ 12 | //@FunctionalInterface 13 | //public interface IListResultTransformer extends ResultTransformer { 14 | // 15 | // 16 | // @Override 17 | // default List transformTuple(List tuples) { 18 | // 19 | // return tuples; 20 | // } 21 | //} 22 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/resources/application-dev.properties: -------------------------------------------------------------------------------- 1 | spring.jpa.generate-ddl=true 2 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver 3 | spring.data.redis.repositories.enabled=false -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/resources/application-prod.properties: -------------------------------------------------------------------------------- 1 | spring.jpa.database-platform=org.hibernate.dialect.MySQL5Dialect -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/resources/fake_data/price-range-data.txt: -------------------------------------------------------------------------------- 1 | 1|Under $50 2 | 2|$50-$100 3 | 3|$100-$200 4 | 4|$200-$300 5 | 5|$300-$400 6 | 6|Above $400 -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/model/src/main/resources/fake_data/sortby-data.txt: -------------------------------------------------------------------------------- 1 | 1|What's New 2 | 2|Popularity 3 | 3|Price: Low To High 4 | 4|Price: High To Low -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/payment/src/main/java/com/urunov/payment/PaymentApplication.java: -------------------------------------------------------------------------------- 1 | package com.urunov.payment; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class PaymentApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(PaymentApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/payment/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/search-system/src/main/java/com/urunov/SearchApplication.java: -------------------------------------------------------------------------------- 1 | package com.urunov; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SearchApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SearchApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/search-system/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/security/src/main/java/com/urunov/security/SecurityApplication.java: -------------------------------------------------------------------------------- 1 | package com.urunov.security; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SecurityApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SecurityApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/security/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/seller-account/src/main/java/com/urunov/SellerAccountApplication.java: -------------------------------------------------------------------------------- 1 | package com.urunov; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SellerAccountApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SellerAccountApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-Backend/seller-account/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-FrontEnd/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/Springboot-ReactJS-Ecommerce-Shopping-FrontEnd/public/favicon.ico -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-FrontEnd/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/Springboot-ReactJS-Ecommerce-Shopping-FrontEnd/public/logo192.png -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-FrontEnd/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/Springboot-ReactJS-Ecommerce-Shopping-FrontEnd/public/logo512.png -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-FrontEnd/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-FrontEnd/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-FrontEnd/src/App.js: -------------------------------------------------------------------------------- 1 | import logo from './logo.svg'; 2 | import './App.css'; 3 | 4 | function App() { 5 | return ( 6 |
7 |
8 | logo 9 |

10 | Edit src/App.js and save to reload. 11 |

12 | 18 | Learn React 19 | 20 |
21 |
22 | ); 23 | } 24 | 25 | export default App; 26 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-FrontEnd/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /Springboot-ReactJS-Ecommerce-Shopping-FrontEnd/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import reportWebVitals from './reportWebVitals'; 6 | 7 | ReactDOM.render( 8 | 9 | 10 | , 11 | document.getElementById('root') 12 | ); 13 | 14 | // If you want to start measuring performance in your app, pass a function 15 | // to log results (for example: reportWebVitals(console.log)) 16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 17 | reportWebVitals(); 18 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /full-stack-react-and-spring-boot/backend/src/main/java/in/alanbinu/springbootrestapi/SpringbootrestapiApplication.java: -------------------------------------------------------------------------------- 1 | package in.alanbinu.springbootrestapi; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringbootrestapiApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringbootrestapiApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /full-stack-react-and-spring-boot/backend/src/main/java/in/alanbinu/springbootrestapi/entity/Employee.java: -------------------------------------------------------------------------------- 1 | package in.alanbinu.springbootrestapi.entity; 2 | 3 | import javax.persistence.Entity; 4 | import javax.persistence.GeneratedValue; 5 | import javax.persistence.GenerationType; 6 | import javax.persistence.Id; 7 | import javax.persistence.Table; 8 | 9 | import lombok.AllArgsConstructor; 10 | import lombok.Data; 11 | import lombok.NoArgsConstructor; 12 | 13 | @Entity 14 | @Table(name = "tbl_employees") 15 | @Data 16 | @AllArgsConstructor 17 | @NoArgsConstructor 18 | public class Employee { 19 | 20 | @Id 21 | @GeneratedValue(strategy = GenerationType.IDENTITY) 22 | private Long id; 23 | 24 | private String name; 25 | 26 | private String location; 27 | 28 | private String department; 29 | } 30 | -------------------------------------------------------------------------------- /full-stack-react-and-spring-boot/backend/src/main/java/in/alanbinu/springbootrestapi/repository/EmployeeRepository.java: -------------------------------------------------------------------------------- 1 | package in.alanbinu.springbootrestapi.repository; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | import org.springframework.stereotype.Repository; 5 | 6 | import in.alanbinu.springbootrestapi.entity.Employee; 7 | 8 | @Repository 9 | public interface EmployeeRepository extends JpaRepository{ 10 | 11 | } 12 | -------------------------------------------------------------------------------- /full-stack-react-and-spring-boot/backend/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.datasource.url=jdbc:mysql://localhost:3306/employeeportal 2 | spring.datasource.username=root 3 | spring.datasource.password=scbushan05 4 | 5 | spring.jpa.hibernate.ddl-auto=update 6 | -------------------------------------------------------------------------------- /full-stack-react-and-spring-boot/backend/src/test/java/in/alanbinu/springbootrestapi/SpringbootrestapiApplicationTests.java: -------------------------------------------------------------------------------- 1 | package in.alanbinu.springbootrestapi; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringbootrestapiApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /full-stack-react-and-spring-boot/frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/full-stack-react-and-spring-boot/frontend/public/favicon.ico -------------------------------------------------------------------------------- /full-stack-react-and-spring-boot/frontend/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/full-stack-react-and-spring-boot/frontend/public/logo192.png -------------------------------------------------------------------------------- /full-stack-react-and-spring-boot/frontend/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/full-stack-react-and-spring-boot/frontend/public/logo512.png -------------------------------------------------------------------------------- /full-stack-react-and-spring-boot/frontend/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /full-stack-react-and-spring-boot/frontend/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /full-stack-react-and-spring-boot/frontend/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /full-stack-react-and-spring-boot/frontend/src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /full-stack-react-and-spring-boot/frontend/src/components/NotFound.js: -------------------------------------------------------------------------------- 1 | const NotFound = () => { 2 | return ( 3 |
4 |

The page you are looking is not yet developed.

5 |
6 | ); 7 | } 8 | 9 | export default NotFound; -------------------------------------------------------------------------------- /full-stack-react-and-spring-boot/frontend/src/http-common.js: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | 3 | export default axios.create({ 4 | baseURL: 'http://localhost:8080/api/v1', 5 | headers: { 6 | 'Content-Type': 'application/json' 7 | } 8 | }); -------------------------------------------------------------------------------- /full-stack-react-and-spring-boot/frontend/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /full-stack-react-and-spring-boot/frontend/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import reportWebVitals from './reportWebVitals'; 6 | 7 | ReactDOM.render( 8 | 9 | 10 | , 11 | document.getElementById('root') 12 | ); 13 | 14 | // If you want to start measuring performance in your app, pass a function 15 | // to log results (for example: reportWebVitals(console.log)) 16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 17 | reportWebVitals(); 18 | -------------------------------------------------------------------------------- /full-stack-react-and-spring-boot/frontend/src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /full-stack-react-and-spring-boot/frontend/src/services/employee.service.js: -------------------------------------------------------------------------------- 1 | import httpClient from "../http-common"; 2 | 3 | const getAll = () => { 4 | return httpClient.get('/employees'); 5 | } 6 | 7 | const create = data => { 8 | return httpClient.post("/employees", data); 9 | } 10 | 11 | const get = id => { 12 | return httpClient.get(`/employees/${id}`); 13 | } 14 | 15 | const update = data => { 16 | return httpClient.put('/employees', data); 17 | } 18 | 19 | const remove = id => { 20 | return httpClient.delete(`/employees/${id}`); 21 | } 22 | export default { getAll, create, get, update, remove }; -------------------------------------------------------------------------------- /full-stack-react-and-spring-boot/frontend/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /spring-boot-react-cors-cross-origin-csrf/backend/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | /target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | 5 | ### STS ### 6 | .apt_generated 7 | .classpath 8 | .factorypath 9 | .project 10 | .settings 11 | .springBeans 12 | .sts4-cache 13 | 14 | ### IntelliJ IDEA ### 15 | .idea 16 | *.iws 17 | *.iml 18 | *.ipr 19 | 20 | ### NetBeans ### 21 | /nbproject/private/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ 26 | /build/ 27 | 28 | ### VS Code ### 29 | .vscode/ 30 | -------------------------------------------------------------------------------- /spring-boot-react-cors-cross-origin-csrf/backend/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.security.user.name=alanbinu 2 | spring.security.user.password=dummy 3 | -------------------------------------------------------------------------------- /spring-boot-react-cors-cross-origin-csrf/frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /spring-boot-react-cors-cross-origin-csrf/frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "spring-boot-react-cors-cross-origin-csrf", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "axios": "^0.18.0", 7 | "react": "^16.8.5", 8 | "react-dom": "^16.8.5", 9 | "react-scripts": "2.1.8" 10 | }, 11 | "scripts": { 12 | "start": "react-scripts start", 13 | "build": "react-scripts build", 14 | "test": "react-scripts test", 15 | "eject": "react-scripts eject" 16 | }, 17 | "eslintConfig": { 18 | "extends": "react-app" 19 | }, 20 | "browserslist": [ 21 | ">0.2%", 22 | "not dead", 23 | "not ie <= 11", 24 | "not op_mini all" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /spring-boot-react-cors-cross-origin-csrf/frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/spring-boot-react-cors-cross-origin-csrf/frontend/public/favicon.ico -------------------------------------------------------------------------------- /spring-boot-react-cors-cross-origin-csrf/frontend/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-react-cors-cross-origin-csrf/frontend/src/App.css: -------------------------------------------------------------------------------- 1 | @import url(https://unpkg.com/bootstrap@4.1.0/dist/css/bootstrap.min.css) -------------------------------------------------------------------------------- /spring-boot-react-cors-cross-origin-csrf/frontend/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import './App.css'; 3 | import SecurityApp from './component/SecurityAppComponent'; 4 | 5 | class App extends Component { 6 | render() { 7 | return ( 8 |
9 | 10 |
11 | ); 12 | } 13 | } 14 | 15 | export default App; 16 | -------------------------------------------------------------------------------- /spring-boot-react-cors-cross-origin-csrf/frontend/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | 5 | it('renders without crashing', () => { 6 | const div = document.createElement('div'); 7 | ReactDOM.render(, div); 8 | ReactDOM.unmountComponentAtNode(div); 9 | }); 10 | -------------------------------------------------------------------------------- /spring-boot-react-cors-cross-origin-csrf/frontend/src/component/SecurityAppComponent.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import ListCoursesComponent from './ListCoursesComponent'; 3 | 4 | class SecurityApp extends Component { 5 | 6 | render() { 7 | return ( 8 | <> 9 |

CORS (CROSS ORIGIN) - PRE FLIGHT Requests

10 |
11 | 12 |
13 | 14 | ); 15 | } 16 | } 17 | 18 | export default SecurityApp -------------------------------------------------------------------------------- /spring-boot-react-cors-cross-origin-csrf/frontend/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", 5 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", 6 | sans-serif; 7 | -webkit-font-smoothing: antialiased; 8 | -moz-osx-font-smoothing: grayscale; 9 | } 10 | 11 | code { 12 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", 13 | monospace; 14 | } 15 | -------------------------------------------------------------------------------- /spring-boot-react-cors-cross-origin-csrf/frontend/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import * as serviceWorker from './serviceWorker'; 6 | 7 | ReactDOM.render(, document.getElementById('root')); 8 | 9 | // If you want your app to work offline and load faster, you can change 10 | // unregister() to register() below. Note this comes with some pitfalls. 11 | // Learn more about service workers: https://bit.ly/CRA-PWA 12 | serviceWorker.unregister(); 13 | -------------------------------------------------------------------------------- /spring-boot-react-cors-cross-origin-csrf/frontend/src/service/CourseDataService.js: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | 3 | const INSTRUCTOR = "alanbinu"; 4 | const PASSWORD = "dummy"; 5 | const COURSE_API_URL = "http://localhost:8080"; 6 | const INSTRUCTOR_API_URL = `${COURSE_API_URL}/instructors/${INSTRUCTOR}`; 7 | 8 | class CourseDataService { 9 | retrieveAllCourses(name) { 10 | return axios.get(`${INSTRUCTOR_API_URL}/courses`, { 11 | headers: { 12 | authorization: "Basic " + window.btoa(INSTRUCTOR + ":" + PASSWORD), 13 | }, 14 | }); 15 | } 16 | } 17 | 18 | export default new CourseDataService(); 19 | -------------------------------------------------------------------------------- /spring-boot-react-crud-full-stack-with-maven/backend/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | /target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | 5 | ### STS ### 6 | .apt_generated 7 | .classpath 8 | .factorypath 9 | .project 10 | .settings 11 | .springBeans 12 | .sts4-cache 13 | 14 | ### IntelliJ IDEA ### 15 | .idea 16 | *.iws 17 | *.iml 18 | *.ipr 19 | 20 | ### NetBeans ### 21 | /nbproject/private/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ 26 | /build/ 27 | 28 | ### VS Code ### 29 | .vscode/ 30 | -------------------------------------------------------------------------------- /spring-boot-react-crud-full-stack-with-maven/backend/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-boot-react-crud-full-stack-with-maven/frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /spring-boot-react-crud-full-stack-with-maven/frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "spring-boot-react-crud-full-stack-with-maven", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "axios": "^0.18.0", 7 | "formik": "^1.5.1", 8 | "react": "^16.8.5", 9 | "react-dom": "^16.8.5", 10 | "react-router-dom": "^5.0.0", 11 | "react-scripts": "2.1.8" 12 | }, 13 | "scripts": { 14 | "start": "react-scripts start", 15 | "build": "react-scripts build", 16 | "test": "react-scripts test", 17 | "eject": "react-scripts eject" 18 | }, 19 | "eslintConfig": { 20 | "extends": "react-app" 21 | }, 22 | "browserslist": [ 23 | ">0.2%", 24 | "not dead", 25 | "not ie <= 11", 26 | "not op_mini all" 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /spring-boot-react-crud-full-stack-with-maven/frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/spring-boot-react-crud-full-stack-with-maven/frontend/public/favicon.ico -------------------------------------------------------------------------------- /spring-boot-react-crud-full-stack-with-maven/frontend/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-react-crud-full-stack-with-maven/frontend/src/App.css: -------------------------------------------------------------------------------- 1 | @import url(https://unpkg.com/bootstrap@4.1.0/dist/css/bootstrap.min.css) -------------------------------------------------------------------------------- /spring-boot-react-crud-full-stack-with-maven/frontend/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import './App.css'; 3 | import InstructorApp from './component/InstructorApp'; 4 | 5 | class App extends Component { 6 | render() { 7 | return ( 8 |
9 | 10 |
11 | ); 12 | } 13 | } 14 | 15 | export default App; 16 | -------------------------------------------------------------------------------- /spring-boot-react-crud-full-stack-with-maven/frontend/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | 5 | it('renders without crashing', () => { 6 | const div = document.createElement('div'); 7 | ReactDOM.render(, div); 8 | ReactDOM.unmountComponentAtNode(div); 9 | }); 10 | -------------------------------------------------------------------------------- /spring-boot-react-crud-full-stack-with-maven/frontend/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", 5 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", 6 | sans-serif; 7 | -webkit-font-smoothing: antialiased; 8 | -moz-osx-font-smoothing: grayscale; 9 | } 10 | 11 | code { 12 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", 13 | monospace; 14 | } 15 | -------------------------------------------------------------------------------- /spring-boot-react-crud-full-stack-with-maven/frontend/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import * as serviceWorker from './serviceWorker'; 6 | 7 | ReactDOM.render(, document.getElementById('root')); 8 | 9 | // If you want your app to work offline and load faster, you can change 10 | // unregister() to register() below. Note this comes with some pitfalls. 11 | // Learn more about service workers: https://bit.ly/CRA-PWA 12 | serviceWorker.unregister(); 13 | -------------------------------------------------------------------------------- /spring-boot-react-employee-curd/react-frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /spring-boot-react-employee-curd/react-frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/spring-boot-react-employee-curd/react-frontend/public/favicon.ico -------------------------------------------------------------------------------- /spring-boot-react-employee-curd/react-frontend/src/components/FooterComponent.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | 3 | class FooterComponent extends Component { 4 | constructor(props) { 5 | super(props) 6 | 7 | this.state = { 8 | 9 | } 10 | } 11 | 12 | render() { 13 | return ( 14 |
15 |
16 | Designed by Alan 17 |
18 |
19 | ) 20 | } 21 | } 22 | 23 | export default FooterComponent 24 | -------------------------------------------------------------------------------- /spring-boot-react-employee-curd/react-frontend/src/components/HeaderComponent.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from "react"; 2 | 3 | class HeaderComponent extends Component { 4 | constructor(props) { 5 | super(props); 6 | 7 | this.state = {}; 8 | } 9 | 10 | render() { 11 | return ( 12 |
13 |
14 | 17 |
18 |
19 | ); 20 | } 21 | } 22 | 23 | export default HeaderComponent; 24 | -------------------------------------------------------------------------------- /spring-boot-react-employee-curd/react-frontend/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-react-employee-curd/react-frontend/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import * as serviceWorker from './serviceWorker'; 6 | import 'bootstrap/dist/css/bootstrap.min.css'; 7 | 8 | ReactDOM.render( 9 | 10 | 11 | , 12 | document.getElementById('root') 13 | ); 14 | 15 | // If you want your app to work offline and load faster, you can change 16 | // unregister() to register() below. Note this comes with some pitfalls. 17 | // Learn more about service workers: https://bit.ly/CRA-PWA 18 | serviceWorker.unregister(); 19 | -------------------------------------------------------------------------------- /spring-boot-react-employee-curd/react-frontend/src/services/EmployeeService.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | 3 | const EMPLOYEE_API_BASE_URL = "http://localhost:8080/api/v1/employees"; 4 | 5 | class EmployeeService { 6 | 7 | getEmployees(){ 8 | return axios.get(EMPLOYEE_API_BASE_URL); 9 | } 10 | 11 | createEmployee(employee){ 12 | return axios.post(EMPLOYEE_API_BASE_URL, employee); 13 | } 14 | 15 | getEmployeeById(employeeId){ 16 | return axios.get(EMPLOYEE_API_BASE_URL + '/' + employeeId); 17 | } 18 | 19 | updateEmployee(employee, employeeId){ 20 | return axios.put(EMPLOYEE_API_BASE_URL + '/' + employeeId, employee); 21 | } 22 | 23 | deleteEmployee(employeeId){ 24 | return axios.delete(EMPLOYEE_API_BASE_URL + '/' + employeeId); 25 | } 26 | } 27 | 28 | export default new EmployeeService() -------------------------------------------------------------------------------- /spring-boot-react-employee-curd/react-frontend/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom/extend-expect'; 6 | -------------------------------------------------------------------------------- /spring-boot-react-employee-curd/springboot-backend/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /spring-boot-react-employee-curd/springboot-backend/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/spring-boot-react-employee-curd/springboot-backend/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-react-employee-curd/springboot-backend/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 3 | -------------------------------------------------------------------------------- /spring-boot-react-employee-curd/springboot-backend/src/main/java/net/alanbinu/springboot/SpringbootBackendApplication.java: -------------------------------------------------------------------------------- 1 | package net.alanbinu.springboot; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringbootBackendApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringbootBackendApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-react-employee-curd/springboot-backend/src/main/java/net/alanbinu/springboot/exception/ResourceNotFoundException.java: -------------------------------------------------------------------------------- 1 | package net.alanbinu.springboot.exception; 2 | 3 | import org.springframework.http.HttpStatus; 4 | import org.springframework.web.bind.annotation.ResponseStatus; 5 | 6 | @ResponseStatus(value = HttpStatus.NOT_FOUND) 7 | public class ResourceNotFoundException extends RuntimeException{ 8 | 9 | private static final long serialVersionUID = 1L; 10 | 11 | public ResourceNotFoundException(String message) { 12 | super(message); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /spring-boot-react-employee-curd/springboot-backend/src/main/java/net/alanbinu/springboot/repository/EmployeeRepository.java: -------------------------------------------------------------------------------- 1 | package net.alanbinu.springboot.repository; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | import org.springframework.stereotype.Repository; 5 | 6 | import net.alanbinu.springboot.model.Employee; 7 | 8 | @Repository 9 | public interface EmployeeRepository extends JpaRepository{ 10 | 11 | } 12 | -------------------------------------------------------------------------------- /spring-boot-react-employee-curd/springboot-backend/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | #Add MySql cof=ifg as per your system. This is sample model 2 | spring.datasource.url=jdbc:mysql://localhost:3306/employee_management_system?useSSL=false 3 | spring.datasource.username=root 4 | spring.datasource.password=root 5 | 6 | spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect 7 | 8 | spring.jpa.hibernate.ddl-auto = update 9 | -------------------------------------------------------------------------------- /spring-boot-react-employee-curd/springboot-backend/src/test/java/net/alanbinu/springboot/SpringbootBackendApplicationTests.java: -------------------------------------------------------------------------------- 1 | package net.alanbinu.springboot; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringbootBackendApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-react-hello-world-with-routing/backend/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | /target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | 5 | ### STS ### 6 | .apt_generated 7 | .classpath 8 | .factorypath 9 | .project 10 | .settings 11 | .springBeans 12 | .sts4-cache 13 | 14 | ### IntelliJ IDEA ### 15 | .idea 16 | *.iws 17 | *.iml 18 | *.ipr 19 | 20 | ### NetBeans ### 21 | /nbproject/private/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ 26 | /build/ 27 | 28 | ### VS Code ### 29 | .vscode/ 30 | -------------------------------------------------------------------------------- /spring-boot-react-hello-world-with-routing/backend/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-boot-react-hello-world-with-routing/frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /spring-boot-react-hello-world-with-routing/frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "spring-boot-react-hello-world-with-routing", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "axios": "^0.18.0", 7 | "react": "^16.8.5", 8 | "react-dom": "^16.8.5", 9 | "react-router-dom": "^5.0.0", 10 | "react-scripts": "2.1.8" 11 | }, 12 | "scripts": { 13 | "start": "react-scripts start", 14 | "build": "react-scripts build", 15 | "test": "react-scripts test", 16 | "eject": "react-scripts eject" 17 | }, 18 | "eslintConfig": { 19 | "extends": "react-app" 20 | }, 21 | "browserslist": [ 22 | ">0.2%", 23 | "not dead", 24 | "not ie <= 11", 25 | "not op_mini all" 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /spring-boot-react-hello-world-with-routing/frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/spring-boot-react-hello-world-with-routing/frontend/public/favicon.ico -------------------------------------------------------------------------------- /spring-boot-react-hello-world-with-routing/frontend/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-react-hello-world-with-routing/frontend/src/App.css: -------------------------------------------------------------------------------- 1 | @import url(https://unpkg.com/bootstrap@4.1.0/dist/css/bootstrap.min.css) -------------------------------------------------------------------------------- /spring-boot-react-hello-world-with-routing/frontend/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import logo from './logo.svg'; 3 | import './App.css'; 4 | import HelloWorldApp from './component/HelloWorldApp'; 5 | 6 | class App extends Component { 7 | render() { 8 | return ( 9 |
10 | 11 |
12 | ); 13 | } 14 | } 15 | 16 | export default App; 17 | -------------------------------------------------------------------------------- /spring-boot-react-hello-world-with-routing/frontend/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | 5 | it('renders without crashing', () => { 6 | const div = document.createElement('div'); 7 | ReactDOM.render(, div); 8 | ReactDOM.unmountComponentAtNode(div); 9 | }); 10 | -------------------------------------------------------------------------------- /spring-boot-react-hello-world-with-routing/frontend/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", 5 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", 6 | sans-serif; 7 | -webkit-font-smoothing: antialiased; 8 | -moz-osx-font-smoothing: grayscale; 9 | } 10 | 11 | code { 12 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", 13 | monospace; 14 | } 15 | -------------------------------------------------------------------------------- /spring-boot-react-hello-world-with-routing/frontend/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import * as serviceWorker from './serviceWorker'; 6 | 7 | ReactDOM.render(, document.getElementById('root')); 8 | 9 | // If you want your app to work offline and load faster, you can change 10 | // unregister() to register() below. Note this comes with some pitfalls. 11 | // Learn more about service workers: https://bit.ly/CRA-PWA 12 | serviceWorker.unregister(); 13 | -------------------------------------------------------------------------------- /spring-boot-react-hello-world-with-routing/frontend/src/service/HelloWorldService.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | 3 | class HelloWorldService { 4 | 5 | //here http://localhost:8080/ replace it whith your spring boot address 6 | 7 | executeHelloWorldService() { 8 | return axios.get('http://localhost:8080/hello-world'); 9 | } 10 | 11 | executeHelloWorldBeanService() { 12 | return axios.get('http://localhost:8080/hello-world-bean'); 13 | } 14 | 15 | executeHelloWorldPathVariableService(name) { 16 | return axios.get(`http://localhost:8080/hello-world/path-variable/${name}`); 17 | } 18 | 19 | } 20 | 21 | export default new HelloWorldService() 22 | -------------------------------------------------------------------------------- /spring-boot-react-jpa-hibernate-with-h2-full-stack/backend/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | /target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | 5 | ### STS ### 6 | .apt_generated 7 | .classpath 8 | .factorypath 9 | .project 10 | .settings 11 | .springBeans 12 | .sts4-cache 13 | 14 | ### IntelliJ IDEA ### 15 | .idea 16 | *.iws 17 | *.iml 18 | *.ipr 19 | 20 | ### NetBeans ### 21 | /nbproject/private/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ 26 | /build/ 27 | 28 | ### VS Code ### 29 | .vscode/ 30 | -------------------------------------------------------------------------------- /spring-boot-react-jpa-hibernate-with-h2-full-stack/backend/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-boot-react-jpa-hibernate-with-h2-full-stack/backend/src/main/resources/data.sql: -------------------------------------------------------------------------------- 1 | insert into course(id, username,description) 2 | values(10001, 'alanbinu', 'Learn JPA'); 3 | 4 | insert into course(id, username,description) 5 | values(10002, 'alanbinu', 'Learn Data JPA'); 6 | 7 | insert into course(id, username,description) 8 | values(10003, 'alanbinu', 'Learn Microservices'); -------------------------------------------------------------------------------- /spring-boot-react-jpa-hibernate-with-h2-full-stack/frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /spring-boot-react-jpa-hibernate-with-h2-full-stack/frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "spring-boot-react-jpa-hibernate-with-h2-full-stack", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "react": "^16.8.5", 7 | "react-dom": "^16.8.5", 8 | "react-scripts": "2.1.8" 9 | }, 10 | "scripts": { 11 | "start": "react-scripts start", 12 | "build": "react-scripts build", 13 | "test": "react-scripts test", 14 | "eject": "react-scripts eject" 15 | }, 16 | "eslintConfig": { 17 | "extends": "react-app" 18 | }, 19 | "browserslist": [ 20 | ">0.2%", 21 | "not dead", 22 | "not ie <= 11", 23 | "not op_mini all" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /spring-boot-react-jpa-hibernate-with-h2-full-stack/frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/spring-boot-react-jpa-hibernate-with-h2-full-stack/frontend/public/favicon.ico -------------------------------------------------------------------------------- /spring-boot-react-jpa-hibernate-with-h2-full-stack/frontend/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-react-jpa-hibernate-with-h2-full-stack/frontend/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | animation: App-logo-spin infinite 20s linear; 7 | height: 40vmin; 8 | pointer-events: none; 9 | } 10 | 11 | .App-header { 12 | background-color: #282c34; 13 | min-height: 100vh; 14 | display: flex; 15 | flex-direction: column; 16 | align-items: center; 17 | justify-content: center; 18 | font-size: calc(10px + 2vmin); 19 | color: white; 20 | } 21 | 22 | .App-link { 23 | color: #61dafb; 24 | } 25 | 26 | @keyframes App-logo-spin { 27 | from { 28 | transform: rotate(0deg); 29 | } 30 | to { 31 | transform: rotate(360deg); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /spring-boot-react-jpa-hibernate-with-h2-full-stack/frontend/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import logo from './logo.svg'; 3 | import './App.css'; 4 | 5 | class App extends Component { 6 | render() { 7 | return ( 8 |
9 |
10 | logo 11 |

12 | Edit src/App.js and save to reload. 13 |

14 | 20 | Learn React 21 | 22 |
23 |
24 | ); 25 | } 26 | } 27 | 28 | export default App; 29 | -------------------------------------------------------------------------------- /spring-boot-react-jpa-hibernate-with-h2-full-stack/frontend/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | 5 | it('renders without crashing', () => { 6 | const div = document.createElement('div'); 7 | ReactDOM.render(, div); 8 | ReactDOM.unmountComponentAtNode(div); 9 | }); 10 | -------------------------------------------------------------------------------- /spring-boot-react-jpa-hibernate-with-h2-full-stack/frontend/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", 5 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", 6 | sans-serif; 7 | -webkit-font-smoothing: antialiased; 8 | -moz-osx-font-smoothing: grayscale; 9 | } 10 | 11 | code { 12 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", 13 | monospace; 14 | } 15 | -------------------------------------------------------------------------------- /spring-boot-react-jpa-hibernate-with-h2-full-stack/frontend/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import * as serviceWorker from './serviceWorker'; 6 | 7 | ReactDOM.render(, document.getElementById('root')); 8 | 9 | // If you want your app to work offline and load faster, you can change 10 | // unregister() to register() below. Note this comes with some pitfalls. 11 | // Learn more about service workers: https://bit.ly/CRA-PWA 12 | serviceWorker.unregister(); 13 | -------------------------------------------------------------------------------- /spring-boot-react-jwt-auth-login-logout/backend/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | /target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | 5 | ### STS ### 6 | .apt_generated 7 | .classpath 8 | .factorypath 9 | .project 10 | .settings 11 | .springBeans 12 | .sts4-cache 13 | 14 | ### IntelliJ IDEA ### 15 | .idea 16 | *.iws 17 | *.iml 18 | *.ipr 19 | 20 | ### NetBeans ### 21 | /nbproject/private/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ 26 | /build/ 27 | 28 | ### VS Code ### 29 | .vscode/ 30 | -------------------------------------------------------------------------------- /spring-boot-react-jwt-auth-login-logout/backend/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | jwt.signing.key.secret=mySecret 2 | jwt.get.token.uri=/authenticate 3 | jwt.refresh.token.uri=/refresh 4 | jwt.http.request.header=Authorization 5 | jwt.token.expiration.in.seconds=604800 -------------------------------------------------------------------------------- /spring-boot-react-jwt-auth-login-logout/frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /spring-boot-react-jwt-auth-login-logout/frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "spring-boot-react-jwt-auth-login-logout", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "react": "^16.8.5", 7 | "react-dom": "^16.8.5", 8 | "react-scripts": "2.1.8" 9 | }, 10 | "scripts": { 11 | "start": "react-scripts start", 12 | "build": "react-scripts build", 13 | "test": "react-scripts test", 14 | "eject": "react-scripts eject" 15 | }, 16 | "eslintConfig": { 17 | "extends": "react-app" 18 | }, 19 | "browserslist": [ 20 | ">0.2%", 21 | "not dead", 22 | "not ie <= 11", 23 | "not op_mini all" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /spring-boot-react-jwt-auth-login-logout/frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlanBinu007/ReactJs-SpringBoot-Full-Stack-Development/995b51f4e5f0467c3d92fd09cf4d83270a6bb420/spring-boot-react-jwt-auth-login-logout/frontend/public/favicon.ico -------------------------------------------------------------------------------- /spring-boot-react-jwt-auth-login-logout/frontend/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-react-jwt-auth-login-logout/frontend/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | animation: App-logo-spin infinite 20s linear; 7 | height: 40vmin; 8 | pointer-events: none; 9 | } 10 | 11 | .App-header { 12 | background-color: #282c34; 13 | min-height: 100vh; 14 | display: flex; 15 | flex-direction: column; 16 | align-items: center; 17 | justify-content: center; 18 | font-size: calc(10px + 2vmin); 19 | color: white; 20 | } 21 | 22 | .App-link { 23 | color: #61dafb; 24 | } 25 | 26 | @keyframes App-logo-spin { 27 | from { 28 | transform: rotate(0deg); 29 | } 30 | to { 31 | transform: rotate(360deg); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /spring-boot-react-jwt-auth-login-logout/frontend/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import logo from './logo.svg'; 3 | import './App.css'; 4 | 5 | class App extends Component { 6 | render() { 7 | return ( 8 |
9 |
10 | logo 11 |

12 | Edit src/App.js and save to reload. 13 |

14 | 20 | Learn React 21 | 22 |
23 |
24 | ); 25 | } 26 | } 27 | 28 | export default App; 29 | -------------------------------------------------------------------------------- /spring-boot-react-jwt-auth-login-logout/frontend/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | 5 | it('renders without crashing', () => { 6 | const div = document.createElement('div'); 7 | ReactDOM.render(, div); 8 | ReactDOM.unmountComponentAtNode(div); 9 | }); 10 | -------------------------------------------------------------------------------- /spring-boot-react-jwt-auth-login-logout/frontend/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", 5 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", 6 | sans-serif; 7 | -webkit-font-smoothing: antialiased; 8 | -moz-osx-font-smoothing: grayscale; 9 | } 10 | 11 | code { 12 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", 13 | monospace; 14 | } 15 | -------------------------------------------------------------------------------- /spring-boot-react-jwt-auth-login-logout/frontend/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import * as serviceWorker from './serviceWorker'; 6 | 7 | ReactDOM.render(, document.getElementById('root')); 8 | 9 | // If you want your app to work offline and load faster, you can change 10 | // unregister() to register() below. Note this comes with some pitfalls. 11 | // Learn more about service workers: https://bit.ly/CRA-PWA 12 | serviceWorker.unregister(); 13 | --------------------------------------------------------------------------------