├── .gitignore ├── ai-demo ├── frontend │ ├── themes │ │ └── mytodo │ │ │ ├── styles.css │ │ │ └── theme.json │ └── index.html ├── .mvn │ └── wrapper │ │ └── maven-wrapper.jar ├── src │ └── main │ │ ├── resources │ │ ├── META-INF │ │ │ └── resources │ │ │ │ └── icons │ │ │ │ └── icon.png │ │ ├── banner.txt │ │ └── application.yaml │ │ └── java │ │ └── com │ │ └── example │ │ └── application │ │ └── Application.java └── .gitignore ├── kafka-demo ├── src │ ├── main │ │ ├── resources │ │ │ └── application.properties │ │ └── java │ │ │ └── com │ │ │ └── practice │ │ │ └── kafkademo │ │ │ ├── KafkaDemoApplication.java │ │ │ └── listener │ │ │ └── KafkaDemoListener.java │ └── test │ │ └── java │ │ └── com │ │ └── practice │ │ └── kafkademo │ │ └── KafkaDemoApplicationTests.java ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties └── .gitignore ├── grpc-server ├── src │ ├── main │ │ ├── resources │ │ │ └── application.properties │ │ ├── proto │ │ │ └── helloworld.proto │ │ └── java │ │ │ └── com │ │ │ └── himanshu │ │ │ └── grpcserver │ │ │ ├── GrpcServerApplication.java │ │ │ └── GreetingService.java │ └── test │ │ └── java │ │ └── com │ │ └── himanshu │ │ └── grpcserver │ │ └── GrpcServerApplicationTests.java ├── settings.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties └── .gitignore ├── grpcmaven ├── src │ ├── main │ │ ├── resources │ │ │ └── application.properties │ │ ├── proto │ │ │ └── helloworld.proto │ │ └── java │ │ │ └── com │ │ │ └── himanshu │ │ │ └── grpcmaven │ │ │ ├── GrpcmavenApplication.java │ │ │ └── GreetingService.java │ └── test │ │ └── java │ │ └── com │ │ └── himanshu │ │ └── grpcmaven │ │ └── GrpcmavenApplicationTests.java ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties └── .gitignore ├── hypermedia-rest ├── src │ ├── main │ │ ├── resources │ │ │ └── application.properties │ │ └── java │ │ │ └── com │ │ │ └── himanshu │ │ │ └── hypermediarest │ │ │ ├── HypermediaRestApplication.java │ │ │ └── domain │ │ │ └── User.java │ └── test │ │ └── java │ │ └── com │ │ └── himanshu │ │ └── hypermediarest │ │ └── HypermediaRestApplicationTests.java ├── settings.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── build.gradle ├── README.MD └── .gitignore ├── config-server ├── settings.gradle ├── src │ ├── main │ │ ├── resources │ │ │ ├── config │ │ │ │ ├── service-dev.yml │ │ │ │ └── service-prod.yml │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── himanshu │ │ │ └── configserver │ │ │ └── ConfigServerApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── himanshu │ │ └── configserver │ │ └── ConfigServerApplicationTests.java ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── .gitignore └── build.gradle ├── eureka-server ├── settings.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── src │ ├── main │ │ ├── resources │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── himanshu │ │ │ └── eurekaserver │ │ │ └── EurekaServerApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── himanshu │ │ └── eurekaserver │ │ └── EurekaServerApplicationTests.java ├── .gitignore └── build.gradle ├── graphql-client ├── settings.gradle ├── src │ ├── main │ │ ├── resources │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── himanshu │ │ │ └── graphqlclient │ │ │ └── GraphqlClientApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── himanshu │ │ └── graphqlclient │ │ └── GraphqlClientApplicationTests.java ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── .gitignore └── build.gradle ├── graphql-server ├── settings.gradle ├── src │ └── main │ │ ├── resources │ │ ├── application.yml │ │ └── schema │ │ │ └── schema.graphqls │ │ └── java │ │ └── com │ │ └── himanshu │ │ └── graphqlserver │ │ └── datastore │ │ └── PersonStore.java ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── .gitignore └── build.gradle ├── kc-gateway ├── .gitattributes ├── src │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── himanshu │ │ │ └── kc_gateway │ │ │ └── KcGatewayApplicationTests.java │ └── main │ │ ├── java │ │ └── com │ │ │ └── himanshu │ │ │ └── kc_gateway │ │ │ └── KcGatewayApplication.java │ │ └── resources │ │ └── application.yaml ├── .gitignore └── .mvn │ └── wrapper │ └── maven-wrapper.properties ├── phone-book ├── frontend │ ├── generated │ │ ├── flow │ │ │ └── generated-flow-imports.d.ts │ │ ├── jar-resources │ │ │ ├── index.d.ts │ │ │ ├── FlowClient.d.ts │ │ │ ├── index.js │ │ │ ├── FlowBootstrap.d.ts │ │ │ ├── vaadin-dev-tools │ │ │ │ ├── vaadin-dev-tools.test.d.ts │ │ │ │ ├── styles.d.ts │ │ │ │ ├── theme-editor │ │ │ │ │ ├── metadata │ │ │ │ │ │ ├── components │ │ │ │ │ │ │ ├── generic.d.ts │ │ │ │ │ │ │ └── presets.d.ts │ │ │ │ │ │ └── registry.d.ts │ │ │ │ │ ├── styles.d.ts │ │ │ │ │ ├── icons.d.ts │ │ │ │ │ ├── components │ │ │ │ │ │ ├── editors │ │ │ │ │ │ │ ├── text-property-editor.d.ts │ │ │ │ │ │ │ ├── checkbox-property-editor.d.ts │ │ │ │ │ │ │ ├── range-property-editor.d.ts │ │ │ │ │ │ │ └── color-property-editor.d.ts │ │ │ │ │ │ ├── class-name-editor.d.ts │ │ │ │ │ │ ├── scope-selector.d.ts │ │ │ │ │ │ ├── component-resolver.d.ts │ │ │ │ │ │ └── property-list.d.ts │ │ │ │ │ ├── detector.d.ts │ │ │ │ │ ├── preview.d.ts │ │ │ │ │ └── history.d.ts │ │ │ │ ├── live-reload-connection.d.ts │ │ │ │ ├── vaadin-dev-tools-log.d.ts │ │ │ │ ├── assets │ │ │ │ │ ├── vaadin-details-bf336660.js │ │ │ │ │ ├── vaadin-map-d40a0116.js │ │ │ │ │ ├── vaadin-icon-601f36ed.js │ │ │ │ │ ├── vaadin-scroller-35e68818.js │ │ │ │ │ ├── vaadin-tabsheet-dd99ed9a.js │ │ │ │ │ ├── vaadin-virtual-list-96896203.js │ │ │ │ │ ├── vaadin-form-layout-47744b1d.js │ │ │ │ │ ├── vaadin-spreadsheet-59d8c5ef.js │ │ │ │ │ ├── vaadin-vertical-layout-ad4174c4.js │ │ │ │ │ ├── vaadin-horizontal-layout-3193943f.js │ │ │ │ │ ├── vaadin-notification-bd6eb776.js │ │ │ │ │ ├── vaadin-progress-bar-309ecf1f.js │ │ │ │ │ ├── vaadin-cookie-consent-46c09f8b.js │ │ │ │ │ ├── vaadin-details-summary-351a1448.js │ │ │ │ │ ├── vaadin-board-828ebdea.js │ │ │ │ │ ├── vaadin-app-layout-e56de2e9.js │ │ │ │ │ ├── vaadin-avatar-7599297d.js │ │ │ │ │ ├── vaadin-split-layout-80c92131.js │ │ │ │ │ ├── vaadin-button-2511ad84.js │ │ │ │ │ ├── vaadin-custom-field-42c85b9e.js │ │ │ │ │ ├── vaadin-list-box-d7a8433b.js │ │ │ │ │ ├── vaadin-date-time-picker-c8c047a7.js │ │ │ │ │ ├── vaadin-board-row-c70d0c55.js │ │ │ │ │ ├── vaadin-accordion-eed3b794.js │ │ │ │ │ ├── vaadin-accordion-panel-616e55d6.js │ │ │ │ │ ├── vaadin-message-input-996ac37c.js │ │ │ │ │ ├── vaadin-dialog-53253a08.js │ │ │ │ │ ├── vaadin-accordion-heading-c0acdd6d.js │ │ │ │ │ ├── vaadin-crud-8d161a22.js │ │ │ │ │ ├── vaadin-tab-aaf32809.js │ │ │ │ │ ├── vaadin-text-area-83627ebc.js │ │ │ │ │ ├── vaadin-email-field-d7a35f04.js │ │ │ │ │ ├── vaadin-tabs-d9a5e24e.js │ │ │ │ │ ├── vaadin-big-decimal-field-e51def24.js │ │ │ │ │ └── vaadin-rich-text-editor-8cd892f2.js │ │ │ │ ├── vaadin-dev-tools-info.d.ts │ │ │ │ ├── component-util.d.ts │ │ │ │ ├── websocket-connection.d.ts │ │ │ │ ├── connection.d.ts │ │ │ │ ├── License.d.ts │ │ │ │ └── shim.d.ts │ │ │ ├── index.js.map │ │ │ ├── buttonFunctions.js │ │ │ └── tooltip.ts │ │ ├── vaadin.ts │ │ └── vaadin-featureflags.js │ └── index.html ├── src │ ├── main │ │ ├── resources │ │ │ └── application.yaml │ │ └── java │ │ │ └── com │ │ │ └── himanshu │ │ │ └── phonebook │ │ │ ├── model │ │ │ └── Person.java │ │ │ ├── config │ │ │ └── AppConfig.java │ │ │ └── PhoneBookApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── himanshu │ │ └── phonebook │ │ └── PhoneBookApplicationTests.java ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties └── .gitignore ├── springpractice ├── settings.gradle ├── src │ └── main │ │ ├── resources │ │ └── application.yml │ │ └── java │ │ └── com │ │ └── himanshu │ │ └── springpractice │ │ ├── service │ │ └── TestService.java │ │ ├── domain │ │ └── User.java │ │ └── SpringpracticeApplication.java ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── build.gradle ├── README.md └── .gitignore ├── websocket-client-server ├── src │ ├── main │ │ ├── resources │ │ │ └── application.properties │ │ └── java │ │ │ └── com │ │ │ └── himanshu │ │ │ └── websocketclientserver │ │ │ ├── WebsocketClientServerApplication.java │ │ │ └── server │ │ │ ├── IncomingMessage.java │ │ │ ├── OutgoingMessage.java │ │ │ └── ServerController.java │ └── test │ │ └── java │ │ └── com │ │ └── himanshu │ │ └── websocketclientserver │ │ └── WebsocketClientServerApplicationTests.java ├── settings.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── build.gradle └── .gitignore ├── modulith-demo ├── .gitattributes ├── src │ └── main │ │ ├── java │ │ └── com │ │ │ └── himanshu │ │ │ └── modulith_demo │ │ │ ├── module1 │ │ │ ├── exposed │ │ │ │ ├── ExposedData1.java │ │ │ │ ├── package-info.java │ │ │ │ └── TestEvent.java │ │ │ ├── submodule1 │ │ │ │ └── package-info.java │ │ │ └── Module1Api.java │ │ │ ├── module2 │ │ │ ├── internal │ │ │ │ └── InternalData2.java │ │ │ └── Module2Api.java │ │ │ ├── module3 │ │ │ └── package-info.java │ │ │ └── ModulithDemoApplication.java │ │ └── resources │ │ └── application.yaml └── .gitignore ├── spring-ai-demo ├── .gitattributes ├── .mvn │ └── wrapper │ │ └── maven-wrapper.properties ├── src │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── himanshu │ │ │ └── spring_ai_demo │ │ │ └── SpringAiDemoApplicationTests.java │ └── main │ │ └── resources │ │ └── application.yaml └── .gitignore ├── spring-ai-ollama ├── .gitattributes ├── src │ ├── main │ │ └── resources │ │ │ └── application.yaml │ └── test │ │ └── java │ │ └── com │ │ └── himanshu │ │ └── springaiollama │ │ └── SpringAiOllamaApplicationTests.java └── .gitignore ├── config-server-client ├── settings.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── src │ ├── main │ │ ├── resources │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── himanshu │ │ │ └── configserverclient │ │ │ ├── ConfigServerClientApplication.java │ │ │ └── controller │ │ │ └── TestController.java │ └── test │ │ └── java │ │ └── com │ │ └── himanshu │ │ └── configserverclient │ │ └── ConfigServerClientApplicationTests.java ├── .gitignore └── build.gradle ├── eureka-server-client ├── settings.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── src │ ├── main │ │ ├── resources │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── himanshu │ │ │ └── eurekaserverclient │ │ │ └── EurekaServerClientApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── himanshu │ │ └── eurekaserverclient │ │ └── EurekaServerClientApplicationTests.java ├── .gitignore └── build.gradle ├── kc-gateway-reactive ├── .gitattributes ├── src │ ├── main │ │ ├── resources │ │ │ ├── policy-enforcer.json │ │ │ └── application.yaml │ │ └── java │ │ │ └── com │ │ │ └── himanshu │ │ │ └── kc_gateway │ │ │ └── KcGatewayApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── himanshu │ │ └── kc_gateway │ │ └── KcGatewayApplicationTests.java └── .gitignore ├── mcp-demo ├── ai-client │ ├── .gitattributes │ ├── src │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── himanshu │ │ │ │ └── ai_client │ │ │ │ └── AiClientApplicationTests.java │ │ └── main │ │ │ └── resources │ │ │ └── application.yaml │ └── .gitignore └── mcp-server │ ├── .gitattributes │ ├── src │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── himanshu │ │ │ └── mcp_server │ │ │ └── McpServerApplicationTests.java │ └── main │ │ └── resources │ │ └── application.properties │ └── .gitignore ├── circuit-breaker-client ├── settings.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── src │ ├── main │ │ ├── resources │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── himanshu │ │ │ └── circuitbreakerclient │ │ │ └── CircuitBreakerClientApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── himanshu │ │ └── circuitbreakerclient │ │ └── CircuitBreakerClientApplicationTests.java ├── .gitignore └── build.gradle ├── ai-chat-memory └── spring-ai-demo │ ├── .gitattributes │ ├── .mvn │ └── wrapper │ │ └── maven-wrapper.properties │ ├── src │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── h7sharma │ │ │ └── spring_ai_demo │ │ │ └── SpringAiDemoApplicationTests.java │ └── main │ │ └── resources │ │ └── application.yaml │ └── .gitignore ├── springai-advisors └── spring-ai-demo │ ├── .gitattributes │ ├── .mvn │ └── wrapper │ │ └── maven-wrapper.properties │ ├── src │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── h7sharma │ │ │ └── spring_ai_demo │ │ │ └── SpringAiDemoApplicationTests.java │ └── main │ │ └── resources │ │ └── application.yaml │ └── .gitignore ├── interceptor-filter-demo ├── src │ ├── main │ │ ├── resources │ │ │ └── application.properties │ │ └── java │ │ │ └── com │ │ │ └── himanshu │ │ │ └── interceptorfilterdemo │ │ │ ├── InterceptorFilterDemoApplication.java │ │ │ ├── filter │ │ │ └── TestFilter.java │ │ │ └── config │ │ │ └── TestConfig.java │ └── test │ │ └── java │ │ └── com │ │ └── himanshu │ │ └── interceptorfilterdemo │ │ └── InterceptorFilterDemoApplicationTests.java ├── .mvn │ └── wrapper │ │ └── maven-wrapper.jar └── .gitignore ├── spring-security-auth ├── src │ ├── main │ │ ├── resources │ │ │ └── application.properties │ │ └── java │ │ │ └── com │ │ │ └── himanshu │ │ │ └── springsecurityauth │ │ │ ├── SpringSecurityAuthApplication.java │ │ │ └── controller │ │ │ └── AppController.java │ └── test │ │ └── java │ │ └── com │ │ └── himanshu │ │ └── springsecurityauth │ │ └── SpringSecurityAuthApplicationTests.java ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties └── .gitignore ├── spring-cache-demo ├── src │ ├── main │ │ ├── resources │ │ │ └── application.properties │ │ └── java │ │ │ └── com │ │ │ └── himanshu │ │ │ └── springcachedemo │ │ │ └── service │ │ │ └── LongRunningService.java │ └── test │ │ └── java │ │ └── com │ │ └── himanshu │ │ └── springcachedemo │ │ └── SpringCacheDemoApplicationTests.java ├── .mvn │ └── wrapper │ │ └── maven-wrapper.jar └── .gitignore ├── reactive-web ├── src │ ├── main │ │ ├── resources │ │ │ ├── application.yaml │ │ │ └── schema.sql │ │ └── java │ │ │ └── com │ │ │ └── himanshu │ │ │ └── reactiveweb │ │ │ ├── repositories │ │ │ └── BookRepository.java │ │ │ ├── ReactiveWebApplication.java │ │ │ ├── model │ │ │ └── BookDTO.java │ │ │ └── domain │ │ │ └── Book.java │ └── test │ │ └── java │ │ └── com │ │ └── himanshu │ │ └── reactiveweb │ │ └── ReactiveWebApplicationTests.java ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties └── .gitignore ├── native-jdbc ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── src │ ├── main │ │ ├── resources │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── himanshu │ │ │ └── nativejdbc │ │ │ ├── NativeJdbcApplication.java │ │ │ ├── StudentController.java │ │ │ └── StudentRepository.java │ └── test │ │ └── java │ │ └── com │ │ └── himanshu │ │ └── nativejdbc │ │ └── NativeJdbcApplicationTests.java └── .gitignore ├── open-api ├── src │ └── main │ │ ├── resources │ │ └── application.yml │ │ └── java │ │ └── com │ │ └── himanshu │ │ └── Main.java └── .gitignore ├── relational-db ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── src │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── himanshu │ │ │ │ └── relationaldb │ │ │ │ ├── repository │ │ │ │ ├── CourseRepository.java │ │ │ │ ├── SchoolRepository.java │ │ │ │ └── StudentRepository.java │ │ │ │ ├── entity │ │ │ │ ├── Course.java │ │ │ │ ├── StudentAddress.java │ │ │ │ ├── School.java │ │ │ │ └── Student.java │ │ │ │ └── service │ │ │ │ ├── CourseService.java │ │ │ │ ├── SchoolService.java │ │ │ │ └── StudentService.java │ │ └── resources │ │ │ └── application.yml │ └── test │ │ └── java │ │ └── com │ │ └── himanshu │ │ └── relationaldb │ │ └── RelationalDbApplicationTests.java └── .gitignore ├── spring-keycloak ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── src │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── himanshu │ │ │ └── springkeycloak │ │ │ └── SpringKeycloakApplicationTests.java │ └── main │ │ ├── java │ │ └── com │ │ │ └── himanshu │ │ │ └── springkeycloak │ │ │ ├── controller │ │ │ └── AppController.java │ │ │ ├── SpringKeycloakApplication.java │ │ │ └── config │ │ │ └── SecurityConfig.java │ │ └── resources │ │ └── application.properties └── .gitignore ├── kafka-binder-demo ├── .mvn │ └── wrapper │ │ └── maven-wrapper.jar ├── src │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── himanshu │ │ │ └── kafkabinder │ │ │ └── KafkaBinderApplicationTests.java │ └── main │ │ └── resources │ │ └── application.yml └── .gitignore ├── spring-auth-server ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── src │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── himanshu │ │ │ └── springauthserver │ │ │ └── SpringAuthServerApplicationTests.java │ └── main │ │ ├── java │ │ └── com │ │ │ └── himanshu │ │ │ └── springauthserver │ │ │ └── SpringAuthServerApplication.java │ │ └── resources │ │ └── application.properties └── .gitignore ├── spring-res-server ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── src │ ├── main │ │ ├── resources │ │ │ └── application.properties │ │ └── java │ │ │ └── com │ │ │ └── himanshu │ │ │ └── springresserver │ │ │ ├── controller │ │ │ └── AppController.java │ │ │ └── SpringResServerApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── himanshu │ │ └── springresserver │ │ └── SpringResServerApplicationTests.java └── .gitignore ├── reactive-client ├── src │ ├── main │ │ ├── resources │ │ │ └── application.yaml │ │ └── java │ │ │ └── com │ │ │ └── himanshu │ │ │ └── reactive_client │ │ │ ├── ReactiveClientApplication.java │ │ │ ├── model │ │ │ └── BookDTO.java │ │ │ └── config │ │ │ └── BookClientConfig.java │ └── test │ │ └── java │ │ └── com │ │ └── himanshu │ │ └── reactive_client │ │ └── ReactiveClientApplicationTests.java ├── .gitignore └── .mvn │ └── wrapper │ └── maven-wrapper.properties ├── spring-keycloak-auth ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── src │ ├── main │ │ ├── resources │ │ │ ├── policy-enforcer.json │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── himanshu │ │ │ └── springkeycloakauth │ │ │ ├── SpringKeycloakauthApplication.java │ │ │ └── controller │ │ │ └── AppController.java │ └── test │ │ └── java │ │ └── com │ │ └── himanshu │ │ └── springkeycloakauth │ │ └── SpringKeycloakApplicationTests.java └── .gitignore ├── spring-security-demo ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── src │ ├── main │ │ ├── resources │ │ │ └── application.properties │ │ └── java │ │ │ └── com │ │ │ └── himanshu │ │ │ └── springsecuritydemo │ │ │ ├── controller │ │ │ └── AppController.java │ │ │ ├── SpringSecurityDemoApplication.java │ │ │ ├── appwrappers │ │ │ └── AppRoleWrapper.java │ │ │ ├── entity │ │ │ ├── AppRole.java │ │ │ └── AppUser.java │ │ │ └── repository │ │ │ └── AppUserRepository.java │ └── test │ │ └── java │ │ └── com │ │ └── himanshu │ │ └── springsecuritydemo │ │ └── SpringSecurityDemoApplicationTests.java └── .gitignore ├── spring-security-custom ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── src │ ├── main │ │ ├── resources │ │ │ └── application.properties │ │ └── java │ │ │ └── com │ │ │ └── himanshu │ │ │ └── springsecuritycustom │ │ │ ├── controller │ │ │ └── AppController.java │ │ │ └── SpringSecurityCustomApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── himanshu │ │ └── springsecuritycustom │ │ └── SpringSecurityCustomApplicationTests.java └── .gitignore ├── README.md └── spring-authorization-server ├── spring-oauth-client ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── src │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── himanshuntwk │ │ │ └── democlient │ │ │ └── DemoClientApplicationTests.java │ └── main │ │ ├── java │ │ └── com │ │ │ └── himanshuntwk │ │ │ └── democlient │ │ │ └── SpringOauthClientApplication.java │ │ └── resources │ │ └── application.yml └── .gitignore ├── spring-oauth-server ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── src │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── himanshuntwk │ │ │ └── springoauthserver │ │ │ └── SpringOauthServerApplicationTests.java │ └── main │ │ ├── java │ │ └── com │ │ │ └── himanshuntwk │ │ │ └── springoauthserver │ │ │ ├── SpringOauthServerApplication.java │ │ │ └── config │ │ │ └── SecurityConfig.java │ │ └── resources │ │ └── application.yaml └── .gitignore └── spring-resource-server ├── .mvn └── wrapper │ ├── maven-wrapper.jar │ └── maven-wrapper.properties ├── src ├── main │ ├── resources │ │ └── application.yaml │ └── java │ │ └── com │ │ └── himanshuntwk │ │ └── springresourceserver │ │ ├── controller │ │ └── MessageController.java │ │ ├── SpringResourceServerApplication.java │ │ └── config │ │ └── SecurityConfig.java └── test │ └── java │ └── com │ └── himanshuntwk │ └── springresourceserver │ └── SpringResourceServerApplicationTests.java └── .gitignore /.gitignore: -------------------------------------------------------------------------------- 1 | **/.DS_Store -------------------------------------------------------------------------------- /ai-demo/frontend/themes/mytodo/styles.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /kafka-demo/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /grpc-server/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /grpcmaven/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /hypermedia-rest/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /config-server/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'config-server' 2 | -------------------------------------------------------------------------------- /eureka-server/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'eureka-server' 2 | -------------------------------------------------------------------------------- /grpc-server/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'grpc-server' 2 | -------------------------------------------------------------------------------- /graphql-client/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'graphql-client' 2 | -------------------------------------------------------------------------------- /graphql-client/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8181 -------------------------------------------------------------------------------- /graphql-server/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'graphql-server' 2 | -------------------------------------------------------------------------------- /hypermedia-rest/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'hypermedia-rest' 2 | -------------------------------------------------------------------------------- /kc-gateway/.gitattributes: -------------------------------------------------------------------------------- 1 | /mvnw text eol=lf 2 | *.cmd text eol=crlf 3 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/flow/generated-flow-imports.d.ts: -------------------------------------------------------------------------------- 1 | export {} -------------------------------------------------------------------------------- /springpractice/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'springpractice' 2 | -------------------------------------------------------------------------------- /websocket-client-server/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /graphql-server/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | -------------------------------------------------------------------------------- /modulith-demo/.gitattributes: -------------------------------------------------------------------------------- 1 | /mvnw text eol=lf 2 | *.cmd text eol=crlf 3 | -------------------------------------------------------------------------------- /spring-ai-demo/.gitattributes: -------------------------------------------------------------------------------- 1 | /mvnw text eol=lf 2 | *.cmd text eol=crlf 3 | -------------------------------------------------------------------------------- /spring-ai-ollama/.gitattributes: -------------------------------------------------------------------------------- 1 | /mvnw text eol=lf 2 | *.cmd text eol=crlf 3 | -------------------------------------------------------------------------------- /springpractice/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 0 3 | -------------------------------------------------------------------------------- /config-server-client/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'config-server-client' 2 | -------------------------------------------------------------------------------- /eureka-server-client/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'eureka-server-client' 2 | -------------------------------------------------------------------------------- /kc-gateway-reactive/.gitattributes: -------------------------------------------------------------------------------- 1 | /mvnw text eol=lf 2 | *.cmd text eol=crlf 3 | -------------------------------------------------------------------------------- /mcp-demo/ai-client/.gitattributes: -------------------------------------------------------------------------------- 1 | /mvnw text eol=lf 2 | *.cmd text eol=crlf 3 | -------------------------------------------------------------------------------- /mcp-demo/mcp-server/.gitattributes: -------------------------------------------------------------------------------- 1 | /mvnw text eol=lf 2 | *.cmd text eol=crlf 3 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './Flow'; 2 | -------------------------------------------------------------------------------- /circuit-breaker-client/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'circuit-breaker-client' 2 | -------------------------------------------------------------------------------- /phone-book/src/main/resources/application.yaml: -------------------------------------------------------------------------------- 1 | spring.application.name=phone-book 2 | -------------------------------------------------------------------------------- /websocket-client-server/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'websocket-client-server' 2 | -------------------------------------------------------------------------------- /ai-chat-memory/spring-ai-demo/.gitattributes: -------------------------------------------------------------------------------- 1 | /mvnw text eol=lf 2 | *.cmd text eol=crlf 3 | -------------------------------------------------------------------------------- /config-server/src/main/resources/config/service-dev.yml: -------------------------------------------------------------------------------- 1 | msg: Dev Message from config server. -------------------------------------------------------------------------------- /config-server/src/main/resources/config/service-prod.yml: -------------------------------------------------------------------------------- 1 | msg: Prod Message from config server. -------------------------------------------------------------------------------- /springai-advisors/spring-ai-demo/.gitattributes: -------------------------------------------------------------------------------- 1 | /mvnw text eol=lf 2 | *.cmd text eol=crlf 3 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/FlowClient.d.ts: -------------------------------------------------------------------------------- 1 | export const init: () => void; 2 | -------------------------------------------------------------------------------- /interceptor-filter-demo/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.output.ansi.enabled=ALWAYS 2 | -------------------------------------------------------------------------------- /spring-security-auth/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.output.ansi.enabled=always 2 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/index.js: -------------------------------------------------------------------------------- 1 | export * from './Flow'; 2 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/FlowBootstrap.d.ts: -------------------------------------------------------------------------------- 1 | export const init: (appInitResponse: any) => void; 2 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.test.d.ts: -------------------------------------------------------------------------------- 1 | import './vaadin-dev-tools'; 2 | -------------------------------------------------------------------------------- /ai-demo/frontend/themes/mytodo/theme.json: -------------------------------------------------------------------------------- 1 | { 2 | "lumoImports" : [ "typography", "color", "spacing", "badge", "utility" ] 3 | } -------------------------------------------------------------------------------- /spring-cache-demo/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | #spring.cache.type=none --uncomment this if you want to disable caching -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/styles.d.ts: -------------------------------------------------------------------------------- 1 | export declare const popupStyles: import("lit").CSSResult; 2 | -------------------------------------------------------------------------------- /reactive-web/src/main/resources/application.yaml: -------------------------------------------------------------------------------- 1 | spring.application.name: reactive-web 2 | #logging.level.org.springframework.r2dbc: trace -------------------------------------------------------------------------------- /ai-demo/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/ai-demo/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /grpcmaven/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/grpcmaven/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /kafka-demo/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/kafka-demo/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /native-jdbc/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/native-jdbc/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /phone-book/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/phone-book/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /open-api/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | logging: 4 | level: 5 | web: TRACE 6 | org.springframework.web: TRACE -------------------------------------------------------------------------------- /reactive-web/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/reactive-web/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /relational-db/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/relational-db/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /config-server/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/config-server/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /eureka-server/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/eureka-server/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /grpc-server/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/grpc-server/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /spring-keycloak/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/spring-keycloak/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /graphql-client/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/graphql-client/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /graphql-server/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/graphql-server/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /hypermedia-rest/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/hypermedia-rest/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /kafka-binder-demo/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/kafka-binder-demo/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-auth-server/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/spring-auth-server/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-cache-demo/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/spring-cache-demo/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-res-server/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/spring-res-server/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /springpractice/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/springpractice/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /reactive-client/src/main/resources/application.yaml: -------------------------------------------------------------------------------- 1 | spring.application.name: reactive-client 2 | server: 3 | port: 8181 4 | book.base.url: http://localhost:8080 5 | -------------------------------------------------------------------------------- /spring-keycloak-auth/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/spring-keycloak-auth/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-security-auth/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/spring-security-auth/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-security-demo/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/spring-security-demo/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /config-server-client/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/config-server-client/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /eureka-server-client/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/eureka-server-client/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /interceptor-filter-demo/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/interceptor-filter-demo/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-security-custom/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/spring-security-custom/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-security-custom/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.output.ansi.enabled=always 2 | app.secret.key=secret_test_key 3 | external.secret.key=external_secret -------------------------------------------------------------------------------- /circuit-breaker-client/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/circuit-breaker-client/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /websocket-client-server/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/websocket-client-server/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /ai-demo/src/main/resources/META-INF/resources/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/ai-demo/src/main/resources/META-INF/resources/icons/icon.png -------------------------------------------------------------------------------- /modulith-demo/src/main/java/com/himanshu/modulith_demo/module1/exposed/ExposedData1.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.modulith_demo.module1.exposed; 2 | 3 | public class ExposedData1 { 4 | } 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # spring-projects 2 | Repository contain spring framework (https://spring.io/) related projects. 3 | 4 | It's a learning initiative to try and test different spring offerings. 5 | -------------------------------------------------------------------------------- /modulith-demo/src/main/java/com/himanshu/modulith_demo/module2/internal/InternalData2.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.modulith_demo.module2.internal; 2 | 3 | public class InternalData2 { 4 | } 5 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/vaadin.ts: -------------------------------------------------------------------------------- 1 | import './vaadin-featureflags.js'; 2 | 3 | import './index'; 4 | 5 | import 'Frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.js'; 6 | -------------------------------------------------------------------------------- /spring-res-server/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.output.ansi.enabled=always 2 | spring.security.oauth2.resourceserver.jwt.issuer-uri=http://localhost:8080 3 | server.port=8181 4 | -------------------------------------------------------------------------------- /phone-book/src/main/java/com/himanshu/phonebook/model/Person.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.phonebook.model; 2 | 3 | public record Person(String firstName, String lastName, String home, String work) { 4 | } 5 | -------------------------------------------------------------------------------- /eureka-server-client/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | eureka: 2 | client: 3 | serviceUrl: 4 | defaultZone: http://localhost:8761/eureka 5 | spring: 6 | application: 7 | name: eurekaserverclient 8 | -------------------------------------------------------------------------------- /circuit-breaker-client/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | #resilience4j.circuitbreaker: 2 | # instances: 3 | # cb1: 4 | # slidingWindowSize: 10 5 | # minimumNumberOfCalls: 3 6 | # failureRateThreshold: 50 -------------------------------------------------------------------------------- /modulith-demo/src/main/java/com/himanshu/modulith_demo/module1/exposed/package-info.java: -------------------------------------------------------------------------------- 1 | @NamedInterface 2 | package com.himanshu.modulith_demo.module1.exposed; 3 | 4 | import org.springframework.modulith.NamedInterface; -------------------------------------------------------------------------------- /spring-authorization-server/spring-oauth-client/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/spring-authorization-server/spring-oauth-client/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-authorization-server/spring-oauth-server/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/spring-authorization-server/spring-oauth-server/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-authorization-server/spring-resource-server/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/himanshuntwk/spring-projects/HEAD/spring-authorization-server/spring-resource-server/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /modulith-demo/src/main/java/com/himanshu/modulith_demo/module1/submodule1/package-info.java: -------------------------------------------------------------------------------- 1 | @ApplicationModule 2 | package com.himanshu.modulith_demo.module1.submodule1; 3 | 4 | import org.springframework.modulith.ApplicationModule; -------------------------------------------------------------------------------- /spring-ai-demo/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | wrapperVersion=3.3.4 2 | distributionType=only-script 3 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip 4 | -------------------------------------------------------------------------------- /eureka-server/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8761 3 | eureka: 4 | client: 5 | registerWithEureka: false 6 | fetchRegistry: false 7 | serviceUrl: 8 | defaultZone: http://localhost:8761/eureka/ 9 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/components/generic.d.ts: -------------------------------------------------------------------------------- 1 | import { ComponentMetadata } from '../model'; 2 | export declare function createGenericMetadata(tagName: string): ComponentMetadata; 3 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/styles.d.ts: -------------------------------------------------------------------------------- 1 | import { CSSResult } from 'lit'; 2 | export declare function injectGlobalCss(css: CSSResult): void; 3 | export declare const editorRowStyles: CSSResult; 4 | -------------------------------------------------------------------------------- /spring-security-demo/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.output.ansi.enabled=ALWAYS 2 | spring.datasource.url=jdbc:postgresql://localhost:5432/postgres 3 | spring.datasource.username=postgres 4 | spring.datasource.password=password -------------------------------------------------------------------------------- /ai-chat-memory/spring-ai-demo/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | wrapperVersion=3.3.4 2 | distributionType=only-script 3 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip 4 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/main/frontend/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC","sourcesContent":["export * from './Flow';\n"]} -------------------------------------------------------------------------------- /spring-authorization-server/spring-resource-server/src/main/resources/application.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8181 3 | spring: 4 | security: 5 | oauth2: 6 | resourceserver: 7 | jwt: 8 | issuer-uri: http://localhost:8080 -------------------------------------------------------------------------------- /springai-advisors/spring-ai-demo/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | wrapperVersion=3.3.4 2 | distributionType=only-script 3 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip 4 | -------------------------------------------------------------------------------- /config-server-client/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | spring: 4 | application: 5 | name: service 6 | profiles: 7 | active: prod 8 | config: 9 | import: optional:configserver:http://localhost:8888 10 | -------------------------------------------------------------------------------- /ai-chat-memory/spring-ai-demo/src/test/java/com/h7sharma/spring_ai_demo/SpringAiDemoApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.h7sharma.spring_ai_demo; 2 | 3 | class SpringAiDemoApplicationTests { 4 | 5 | void contextLoads() { 6 | 7 | } 8 | 9 | 10 | } 11 | -------------------------------------------------------------------------------- /config-server/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8888 3 | spring: 4 | cloud: 5 | config: 6 | server: 7 | native: 8 | search-locations: 9 | - classpath:/config 10 | profiles: 11 | active: native -------------------------------------------------------------------------------- /grpc-server/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /kc-gateway-reactive/src/main/resources/policy-enforcer.json: -------------------------------------------------------------------------------- 1 | { 2 | "realm": "new-demo-realm", 3 | "auth-server-url": "http://localhost:8080", 4 | "resource": "new-demo-client", 5 | "credentials": { 6 | "secret": "mFEB4kKFspuEHIBXZP3wqIibALZ5L9aO" 7 | } 8 | } -------------------------------------------------------------------------------- /spring-keycloak-auth/src/main/resources/policy-enforcer.json: -------------------------------------------------------------------------------- 1 | { 2 | "realm": "new-demo-realm", 3 | "auth-server-url": "http://localhost:8080", 4 | "resource": "new-demo-client", 5 | "credentials": { 6 | "secret": "6NfmvlzQvjmK8u2xUgDt581LNJUjQBzb" 7 | } 8 | } -------------------------------------------------------------------------------- /springai-advisors/spring-ai-demo/src/test/java/com/h7sharma/spring_ai_demo/SpringAiDemoApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.h7sharma.spring_ai_demo; 2 | 3 | class SpringAiDemoApplicationTests { 4 | 5 | void contextLoads() { 6 | 7 | } 8 | 9 | 10 | } 11 | -------------------------------------------------------------------------------- /config-server/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /eureka-server/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /graphql-client/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /graphql-server/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /hypermedia-rest/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /modulith-demo/src/main/java/com/himanshu/modulith_demo/module3/package-info.java: -------------------------------------------------------------------------------- 1 | @ApplicationModule(allowedDependencies = {"module2", "module1", "module1 :: exposed"}) 2 | package com.himanshu.modulith_demo.module3; 3 | 4 | import org.springframework.modulith.ApplicationModule; -------------------------------------------------------------------------------- /springpractice/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /config-server-client/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /eureka-server-client/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /springpractice/src/main/java/com/himanshu/springpractice/service/TestService.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springpractice.service; 2 | 3 | public class TestService { 4 | 5 | public void testMethod() { 6 | System.out.println(">> Test MEthod invoked"); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /circuit-breaker-client/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /grpcmaven/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar 3 | -------------------------------------------------------------------------------- /websocket-client-server/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /kafka-demo/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar 3 | -------------------------------------------------------------------------------- /native-jdbc/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar 3 | -------------------------------------------------------------------------------- /phone-book/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar 3 | -------------------------------------------------------------------------------- /reactive-web/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar 3 | -------------------------------------------------------------------------------- /relational-db/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar 3 | -------------------------------------------------------------------------------- /spring-auth-server/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.2/apache-maven-3.9.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar 3 | -------------------------------------------------------------------------------- /spring-keycloak/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.2/apache-maven-3.9.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar 3 | -------------------------------------------------------------------------------- /spring-res-server/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.2/apache-maven-3.9.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar 3 | -------------------------------------------------------------------------------- /ai-demo/src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | __ __ _____ _ 2 | | \/ |_ _ |_ _|__ __| | ___ 3 | | |\/| | | | | | |/ _ \ / _` |/ _ \ 4 | | | | | |_| | | | (_) | (_| | (_) | 5 | |_| |_|\__, | |_|\___/ \__,_|\___/ 6 | |___/ 7 | -------------------------------------------------------------------------------- /spring-keycloak-auth/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.2/apache-maven-3.9.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar 3 | -------------------------------------------------------------------------------- /spring-security-auth/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.2/apache-maven-3.9.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar 3 | -------------------------------------------------------------------------------- /spring-security-custom/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.2/apache-maven-3.9.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar 3 | -------------------------------------------------------------------------------- /spring-security-demo/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.2/apache-maven-3.9.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar 3 | -------------------------------------------------------------------------------- /springai-advisors/spring-ai-demo/src/main/resources/application.yaml: -------------------------------------------------------------------------------- 1 | spring: 2 | application.name: spring-ai-demo 3 | ai: 4 | ollama: 5 | base-url: http://localhost:11434 6 | chat: 7 | options: 8 | model: gemma3:4b 9 | logging: 10 | level: 11 | root: error 12 | -------------------------------------------------------------------------------- /spring-authorization-server/spring-oauth-client/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar 3 | -------------------------------------------------------------------------------- /spring-authorization-server/spring-oauth-server/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar 3 | -------------------------------------------------------------------------------- /spring-authorization-server/spring-resource-server/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar 3 | -------------------------------------------------------------------------------- /native-jdbc/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | datasource: 3 | url: jdbc:postgresql://localhost:5432/postgres 4 | username: postgres 5 | password: password 6 | hikari: 7 | schema: native 8 | logging: 9 | level: 10 | org.springframework.jdbc.core: TRACE 11 | server: 12 | port: 8181 13 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/components/presets.d.ts: -------------------------------------------------------------------------------- 1 | export declare const presets: { 2 | lumoSize: string[]; 3 | lumoSpace: string[]; 4 | lumoBorderRadius: string[]; 5 | lumoFontSize: string[]; 6 | lumoTextColor: string[]; 7 | basicBorderSize: string[]; 8 | }; 9 | -------------------------------------------------------------------------------- /relational-db/src/main/java/com/himanshu/relationaldb/repository/CourseRepository.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.relationaldb.repository; 2 | 3 | import com.himanshu.relationaldb.entity.Course; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | public interface CourseRepository extends JpaRepository { 7 | } 8 | -------------------------------------------------------------------------------- /grpcmaven/src/test/java/com/himanshu/grpcmaven/GrpcmavenApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.grpcmaven; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class GrpcmavenApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /kafka-demo/src/test/java/com/practice/kafkademo/KafkaDemoApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.practice.kafkademo; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class KafkaDemoApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /kc-gateway/src/test/java/com/himanshu/kc_gateway/KcGatewayApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.kc_gateway; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class KcGatewayApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /phone-book/src/test/java/com/himanshu/phonebook/PhoneBookApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.phonebook; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class PhoneBookApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /reactive-web/src/main/resources/schema.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS BOOK 2 | ( 3 | ID INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, 4 | TITLE VARCHAR(100), 5 | AUTHOR VARCHAR(100), 6 | PUBLISHER VARCHAR(100), 7 | ISBN VARCHAR(100), 8 | GENRE VARCHAR(100), 9 | CREATED_DATE TIMESTAMP, 10 | UPDATED_DATE TIMESTAMP 11 | ); -------------------------------------------------------------------------------- /grpc-server/src/test/java/com/himanshu/grpcserver/GrpcServerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.grpcserver; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class GrpcServerApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /mcp-demo/ai-client/src/test/java/com/himanshu/ai_client/AiClientApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.ai_client; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class AiClientApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /native-jdbc/src/test/java/com/himanshu/nativejdbc/NativeJdbcApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.nativejdbc; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class NativeJdbcApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /reactive-web/src/main/java/com/himanshu/reactiveweb/repositories/BookRepository.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.reactiveweb.repositories; 2 | 3 | import com.himanshu.reactiveweb.domain.Book; 4 | import org.springframework.data.repository.reactive.ReactiveCrudRepository; 5 | 6 | public interface BookRepository extends ReactiveCrudRepository { 7 | } 8 | -------------------------------------------------------------------------------- /kc-gateway-reactive/src/test/java/com/himanshu/kc_gateway/KcGatewayApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.kc_gateway; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class KcGatewayApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /mcp-demo/mcp-server/src/test/java/com/himanshu/mcp_server/McpServerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.mcp_server; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class McpServerApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /reactive-web/src/test/java/com/himanshu/reactiveweb/ReactiveWebApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.reactiveweb; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class ReactiveWebApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /config-server/src/test/java/com/himanshu/configserver/ConfigServerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.configserver; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class ConfigServerApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /eureka-server/src/test/java/com/himanshu/eurekaserver/EurekaServerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.eurekaserver; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class EurekaServerApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /kafka-binder-demo/src/test/java/com/himanshu/kafkabinder/KafkaBinderApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.kafkabinder; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class KafkaBinderApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /open-api/src/main/java/com/himanshu/Main.java: -------------------------------------------------------------------------------- 1 | package com.himanshu; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class Main { 8 | public static void main(String[] args) { 9 | SpringApplication.run(Main.class, args); 10 | } 11 | } -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/live-reload-connection.d.ts: -------------------------------------------------------------------------------- 1 | import { Connection } from './connection.js'; 2 | export declare class LiveReloadConnection extends Connection { 3 | webSocket?: WebSocket; 4 | constructor(url: string); 5 | onReload(): void; 6 | handleMessage(msg: any): void; 7 | handleError(msg: any): void; 8 | } 9 | -------------------------------------------------------------------------------- /relational-db/src/test/java/com/himanshu/relationaldb/RelationalDbApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.relationaldb; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class RelationalDbApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-ai-ollama/src/main/resources/application.yaml: -------------------------------------------------------------------------------- 1 | spring: 2 | ai: 3 | ollama: 4 | chat: 5 | options: 6 | model: deepseek-r1:8b 7 | base-url: http://localhost:11434 8 | chat: 9 | client: 10 | enabled: false 11 | logging: 12 | level: 13 | org: 14 | springframework.ai.chat.client.advisor: DEBUG 15 | -------------------------------------------------------------------------------- /spring-keycloak-auth/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server.port: 8282 2 | spring: 3 | output: 4 | ansi: 5 | enabled: always 6 | security: 7 | oauth2: 8 | resourceserver: 9 | jwt: 10 | jwk-set-uri: http://localhost:8080/realms/new-demo-realm/protocol/openid-connect/certs 11 | #logging: 12 | # level: 13 | # root: INFO -------------------------------------------------------------------------------- /graphql-client/src/test/java/com/himanshu/graphqlclient/GraphqlClientApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.graphqlclient; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class GraphqlClientApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /modulith-demo/src/main/java/com/himanshu/modulith_demo/module2/Module2Api.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.modulith_demo.module2; 2 | 3 | import com.himanshu.modulith_demo.module1.Module1Api; 4 | import com.himanshu.modulith_demo.module1.exposed.ExposedData1; 5 | 6 | public class Module2Api { 7 | 8 | Module1Api module1Api; 9 | ExposedData1 exposedData1; 10 | } 11 | -------------------------------------------------------------------------------- /phone-book/src/main/java/com/himanshu/phonebook/config/AppConfig.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.phonebook.config; 2 | 3 | import com.vaadin.flow.component.page.AppShellConfigurator; 4 | import com.vaadin.flow.theme.Theme; 5 | import com.vaadin.flow.theme.lumo.Lumo; 6 | 7 | @Theme(variant = Lumo.DARK) 8 | public class AppConfig implements AppShellConfigurator { 9 | } 10 | -------------------------------------------------------------------------------- /spring-ai-demo/src/test/java/com/himanshu/spring_ai_demo/SpringAiDemoApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.spring_ai_demo; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringAiDemoApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /hypermedia-rest/src/test/java/com/himanshu/hypermediarest/HypermediaRestApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.hypermediarest; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class HypermediaRestApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /reactive-client/src/test/java/com/himanshu/reactive_client/ReactiveClientApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.reactive_client; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class ReactiveClientApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-keycloak/src/test/java/com/himanshu/springkeycloak/SpringKeycloakApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springkeycloak; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringKeycloakApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-ai-ollama/src/test/java/com/himanshu/springaiollama/SpringAiOllamaApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springaiollama; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringAiOllamaApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-cache-demo/src/test/java/com/himanshu/springcachedemo/SpringCacheDemoApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springcachedemo; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringCacheDemoApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-res-server/src/test/java/com/himanshu/springresserver/SpringResServerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springresserver; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringResServerApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /relational-db/src/main/java/com/himanshu/relationaldb/repository/SchoolRepository.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.relationaldb.repository; 2 | 3 | import com.himanshu.relationaldb.entity.Course; 4 | import com.himanshu.relationaldb.entity.School; 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | public interface SchoolRepository extends JpaRepository { 8 | } 9 | -------------------------------------------------------------------------------- /spring-auth-server/src/test/java/com/himanshu/springauthserver/SpringAuthServerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springauthserver; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringAuthServerApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /relational-db/src/main/java/com/himanshu/relationaldb/repository/StudentRepository.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.relationaldb.repository; 2 | 3 | import com.himanshu.relationaldb.entity.Course; 4 | import com.himanshu.relationaldb.entity.Student; 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | public interface StudentRepository extends JpaRepository { 8 | } 9 | -------------------------------------------------------------------------------- /spring-keycloak-auth/src/test/java/com/himanshu/springkeycloakauth/SpringKeycloakApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springkeycloakauth; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringKeycloakApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /config-server-client/src/test/java/com/himanshu/configserverclient/ConfigServerClientApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.configserverclient; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class ConfigServerClientApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /eureka-server-client/src/test/java/com/himanshu/eurekaserverclient/EurekaServerClientApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.eurekaserverclient; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class EurekaServerClientApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-security-auth/src/test/java/com/himanshu/springsecurityauth/SpringSecurityAuthApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springsecurityauth; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringSecurityAuthApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-security-demo/src/test/java/com/himanshu/springsecuritydemo/SpringSecurityDemoApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springsecuritydemo; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringSecurityDemoApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-authorization-server/spring-oauth-client/src/test/java/com/himanshuntwk/democlient/DemoClientApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshuntwk.democlient; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class DemoClientApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /circuit-breaker-client/src/test/java/com/himanshu/circuitbreakerclient/CircuitBreakerClientApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.circuitbreakerclient; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class CircuitBreakerClientApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/icons.d.ts: -------------------------------------------------------------------------------- 1 | export declare const icons: { 2 | crosshair: import("lit").TemplateResult<2>; 3 | square: import("lit").TemplateResult<2>; 4 | font: import("lit").TemplateResult<2>; 5 | undo: import("lit").TemplateResult<2>; 6 | redo: import("lit").TemplateResult<2>; 7 | cross: import("lit").TemplateResult<2>; 8 | }; 9 | -------------------------------------------------------------------------------- /spring-security-custom/src/test/java/com/himanshu/springsecuritycustom/SpringSecurityCustomApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springsecuritycustom; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringSecurityCustomApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /interceptor-filter-demo/src/test/java/com/himanshu/interceptorfilterdemo/InterceptorFilterDemoApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.interceptorfilterdemo; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class InterceptorFilterDemoApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /websocket-client-server/src/test/java/com/himanshu/websocketclientserver/WebsocketClientServerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.websocketclientserver; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class WebsocketClientServerApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /graphql-server/src/main/resources/schema/schema.graphqls: -------------------------------------------------------------------------------- 1 | type Query { 2 | allPersons: [Person] 3 | searchPerson(searchPersonId: Int): Person 4 | } 5 | 6 | type Person { 7 | personId: Int 8 | personName: String 9 | personAddress: PersonAddress 10 | } 11 | 12 | type PersonAddress { 13 | streetName: String 14 | houseNumber: String 15 | city: String 16 | country: String 17 | } 18 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools-log.d.ts: -------------------------------------------------------------------------------- 1 | import { LitElement } from 'lit'; 2 | import { VaadinDevTools } from './vaadin-dev-tools.js'; 3 | export declare class VaadinDevToolsLog extends LitElement { 4 | _devTools: VaadinDevTools; 5 | protected createRenderRoot(): Element | ShadowRoot; 6 | activate(): void; 7 | render(): import("lit").TemplateResult<1>; 8 | } 9 | -------------------------------------------------------------------------------- /grpcmaven/src/main/proto/helloworld.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | option java_multiple_files = true; 4 | option java_package = "helloworld"; 5 | 6 | package helloworld; 7 | 8 | service GreetingService { 9 | rpc SayHello (RequestMessage) returns (ResponseMessage) {} 10 | } 11 | 12 | message RequestMessage { 13 | string name = 1; 14 | } 15 | 16 | message ResponseMessage { 17 | string message = 1; 18 | } 19 | -------------------------------------------------------------------------------- /grpc-server/src/main/proto/helloworld.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | option java_multiple_files = true; 4 | option java_package = "helloworld"; 5 | 6 | package helloworld; 7 | 8 | service GreetingService { 9 | rpc SayHello (RequestMessage) returns (ResponseMessage) {} 10 | } 11 | 12 | message RequestMessage { 13 | string name = 1; 14 | } 15 | 16 | message ResponseMessage { 17 | string message = 1; 18 | } 19 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-details-bf336660.js: -------------------------------------------------------------------------------- 1 | import{a}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const p={tagName:"vaadin-details",displayName:"Details",elements:[{selector:"vaadin-details",displayName:"Root element",properties:a}]};export{p as default}; 2 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/text-property-editor.d.ts: -------------------------------------------------------------------------------- 1 | import { TemplateResult } from 'lit'; 2 | import { BasePropertyEditor, TextInputChangeEvent } from './base-property-editor'; 3 | export declare class TextPropertyEditor extends BasePropertyEditor { 4 | handleInputChange(e: TextInputChangeEvent): void; 5 | protected renderEditor(): TemplateResult; 6 | } 7 | -------------------------------------------------------------------------------- /spring-authorization-server/spring-oauth-server/src/test/java/com/himanshuntwk/springoauthserver/SpringOauthServerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshuntwk.springoauthserver; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringOauthServerApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/detector.d.ts: -------------------------------------------------------------------------------- 1 | import { ComponentTheme } from './model'; 2 | import { ComponentMetadata } from './metadata/model'; 3 | import { ComponentReference } from '../component-util'; 4 | export declare function detectTheme(metadata: ComponentMetadata): Promise; 5 | export declare function detectElementDisplayName(component: ComponentReference): string | null; 6 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools-info.d.ts: -------------------------------------------------------------------------------- 1 | import { LitElement } from 'lit'; 2 | export declare class InfoTab extends LitElement { 3 | private _devTools; 4 | private serverInfo; 5 | protected createRenderRoot(): Element | ShadowRoot; 6 | render(): import("lit").TemplateResult<1>; 7 | handleMessage(message: any): boolean; 8 | copyInfoToClipboard(): void; 9 | } 10 | -------------------------------------------------------------------------------- /spring-keycloak/src/main/java/com/himanshu/springkeycloak/controller/AppController.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springkeycloak.controller; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | @RestController 7 | public class AppController { 8 | 9 | @GetMapping("/hello") 10 | public String hello() { 11 | return "Hello"; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /spring-authorization-server/spring-resource-server/src/test/java/com/himanshuntwk/springresourceserver/SpringResourceServerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.himanshuntwk.springresourceserver; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringResourceServerApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /kafka-demo/src/main/java/com/practice/kafkademo/KafkaDemoApplication.java: -------------------------------------------------------------------------------- 1 | package com.practice.kafkademo; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class KafkaDemoApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(KafkaDemoApplication.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /grpcmaven/src/main/java/com/himanshu/grpcmaven/GrpcmavenApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.grpcmaven; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class GrpcmavenApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(GrpcmavenApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /kc-gateway/src/main/java/com/himanshu/kc_gateway/KcGatewayApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.kc_gateway; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class KcGatewayApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(KcGatewayApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /phone-book/src/main/java/com/himanshu/phonebook/PhoneBookApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.phonebook; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class PhoneBookApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(PhoneBookApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /grpc-server/src/main/java/com/himanshu/grpcserver/GrpcServerApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.grpcserver; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class GrpcServerApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(GrpcServerApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/checkbox-property-editor.d.ts: -------------------------------------------------------------------------------- 1 | import { TemplateResult } from 'lit'; 2 | import { BasePropertyEditor } from './base-property-editor'; 3 | export declare class CheckboxPropertyEditor extends BasePropertyEditor { 4 | static get styles(): import("lit").CSSResultGroup[]; 5 | handleInputChange(e: Event): void; 6 | protected renderEditor(): TemplateResult; 7 | } 8 | -------------------------------------------------------------------------------- /kc-gateway-reactive/src/main/java/com/himanshu/kc_gateway/KcGatewayApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.kc_gateway; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class KcGatewayApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(KcGatewayApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /native-jdbc/src/main/java/com/himanshu/nativejdbc/NativeJdbcApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.nativejdbc; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class NativeJdbcApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(NativeJdbcApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/vaadin-featureflags.js: -------------------------------------------------------------------------------- 1 | // @ts-nocheck 2 | window.Vaadin = window.Vaadin || {}; 3 | window.Vaadin.featureFlags = window.Vaadin.featureFlags || {}; 4 | window.Vaadin.featureFlags.exampleFeatureFlag = false; 5 | window.Vaadin.featureFlags.collaborationEngineBackend = false; 6 | window.Vaadin.featureFlags.webPush = false; 7 | window.Vaadin.featureFlags.formFillerAddon = false; 8 | window.Vaadin.featureFlags.reactRouter = false; 9 | export {}; -------------------------------------------------------------------------------- /reactive-web/src/main/java/com/himanshu/reactiveweb/ReactiveWebApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.reactiveweb; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class ReactiveWebApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(ReactiveWebApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /mcp-demo/ai-client/src/main/resources/application.yaml: -------------------------------------------------------------------------------- 1 | spring: 2 | application.name: ai-client 3 | ai: 4 | ollama: 5 | chat: 6 | model: llama3.2:latest 7 | mcp: 8 | client: 9 | enabled: true 10 | name: my-mcp-client 11 | version: 1.0.0 12 | type: SYNC 13 | request-timeout: 30s 14 | sse: 15 | connections: 16 | server1: 17 | url: http://localhost:8181 -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/buttonFunctions.js: -------------------------------------------------------------------------------- 1 | function disableOnClickListener({currentTarget: button}) { 2 | button.disabled = button.hasAttribute('disableOnClick'); 3 | } 4 | 5 | window.Vaadin.Flow.button = { 6 | initDisableOnClick: (button) => { 7 | if (!button.__hasDisableOnClickListener) { 8 | button.addEventListener('click', disableOnClickListener); 9 | button.__hasDisableOnClickListener = true; 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/preview.d.ts: -------------------------------------------------------------------------------- 1 | declare class ThemePreview { 2 | private _stylesheet?; 3 | private _localClassNameMap; 4 | get stylesheet(): CSSStyleSheet; 5 | add(css: string): void; 6 | clear(): void; 7 | previewLocalClassName(element?: HTMLElement, className?: string): void; 8 | private ensureStylesheet; 9 | } 10 | export declare const themePreview: ThemePreview; 11 | export {}; 12 | -------------------------------------------------------------------------------- /graphql-client/src/main/java/com/himanshu/graphqlclient/GraphqlClientApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.graphqlclient; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class GraphqlClientApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(GraphqlClientApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /hypermedia-rest/src/main/java/com/himanshu/hypermediarest/HypermediaRestApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.hypermediarest; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class HypermediaRestApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(HypermediaRestApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /reactive-client/src/main/java/com/himanshu/reactive_client/ReactiveClientApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.reactive_client; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class ReactiveClientApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(ReactiveClientApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-keycloak/src/main/java/com/himanshu/springkeycloak/SpringKeycloakApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springkeycloak; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringKeycloakApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringKeycloakApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-security-demo/src/main/java/com/himanshu/springsecuritydemo/controller/AppController.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springsecuritydemo.controller; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | @RestController 7 | public class AppController { 8 | 9 | @GetMapping("/hello") 10 | public String getHello() { 11 | return "Hello from secured app!!!"; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ai-demo/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | .idea/ 3 | .vscode/ 4 | .settings 5 | .project 6 | .classpath 7 | 8 | *.iml 9 | .DS_Store 10 | 11 | # The following files are generated/updated by vaadin-maven-plugin 12 | node_modules/ 13 | frontend/generated/ 14 | pnpmfile.js 15 | vite.generated.ts 16 | 17 | # Browser drivers for local integration tests 18 | drivers/ 19 | # Error screenshots generated by TestBench for failed integration tests 20 | error-screenshots/ 21 | webpack.generated.js 22 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-map-d40a0116.js: -------------------------------------------------------------------------------- 1 | import{s as a}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-map",displayName:"Map",elements:[{selector:"vaadin-map",displayName:"Root element",properties:[a.backgroundColor,a.borderColor,a.borderWidth,a.borderRadius,a.padding]}]};export{d as default}; 2 | -------------------------------------------------------------------------------- /spring-security-custom/src/main/java/com/himanshu/springsecuritycustom/controller/AppController.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springsecuritycustom.controller; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | @RestController 7 | public class AppController { 8 | 9 | @GetMapping("/hello") 10 | public String getHello() { 11 | return "Hello from application"; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /spring-auth-server/src/main/java/com/himanshu/springauthserver/SpringAuthServerApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springauthserver; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringAuthServerApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringAuthServerApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /modulith-demo/src/main/resources/application.yaml: -------------------------------------------------------------------------------- 1 | spring: 2 | application.name: modulith-demo 3 | datasource: 4 | url: jdbc:postgresql://localhost:5432/ 5 | username: postgres 6 | password: password 7 | modulith: 8 | events: 9 | jdbc.schema-initialization.enabled: true 10 | republish-outstanding-events-on-restart: true 11 | moments: 12 | enable-time-machine: true 13 | management: 14 | endpoints: 15 | web: 16 | exposure: 17 | include: "*" -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-icon-601f36ed.js: -------------------------------------------------------------------------------- 1 | import{i as r,s as o}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const s={tagName:"vaadin-icon",displayName:"Icon",elements:[{selector:"vaadin-icon",displayName:"Icon",properties:[r.iconColor,r.iconSize,o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius]}]};export{s as default}; 2 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-scroller-35e68818.js: -------------------------------------------------------------------------------- 1 | import{s as r}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-scroller",displayName:"Scroller",elements:[{selector:"vaadin-scroller",displayName:"Scroller",properties:[r.backgroundColor,r.borderColor,r.borderWidth,r.borderRadius,r.padding]}]};export{d as default}; 2 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-tabsheet-dd99ed9a.js: -------------------------------------------------------------------------------- 1 | import{s as e}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-tabsheet",displayName:"Tab Sheet",elements:[{selector:"vaadin-tabsheet",displayName:"TabSheet",properties:[e.padding,e.backgroundColor,e.borderWidth,e.borderColor,e.borderRadius]}]};export{d as default}; 2 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-virtual-list-96896203.js: -------------------------------------------------------------------------------- 1 | import{s as r}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const l={tagName:"vaadin-virtual-list",displayName:"Virtual List",elements:[{selector:"vaadin-virtual-list",displayName:"List",properties:[r.backgroundColor,r.borderColor,r.borderWidth,r.borderRadius]}]};export{l as default}; 2 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/component-util.d.ts: -------------------------------------------------------------------------------- 1 | export type ComponentReference = { 2 | nodeId: number; 3 | uiId: number; 4 | element?: HTMLElement; 5 | highlightElement?: HTMLElement; 6 | }; 7 | export declare function getComponents(element: HTMLElement): ComponentReference[]; 8 | export declare function getComponent(element: HTMLElement): ComponentReference; 9 | export declare function deepContains(container: HTMLElement, node: Node): boolean; 10 | -------------------------------------------------------------------------------- /eureka-server-client/src/main/java/com/himanshu/eurekaserverclient/EurekaServerClientApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.eurekaserverclient; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class EurekaServerClientApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(EurekaServerClientApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-security-auth/src/main/java/com/himanshu/springsecurityauth/SpringSecurityAuthApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springsecurityauth; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringSecurityAuthApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringSecurityAuthApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-security-demo/src/main/java/com/himanshu/springsecuritydemo/SpringSecurityDemoApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springsecuritydemo; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringSecurityDemoApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringSecurityDemoApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-form-layout-47744b1d.js: -------------------------------------------------------------------------------- 1 | import{s as o}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-form-layout",displayName:"Form Layout",elements:[{selector:"vaadin-form-layout",displayName:"Layout",properties:[o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius,o.padding]}]};export{d as default}; 2 | -------------------------------------------------------------------------------- /circuit-breaker-client/src/main/java/com/himanshu/circuitbreakerclient/CircuitBreakerClientApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.circuitbreakerclient; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class CircuitBreakerClientApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(CircuitBreakerClientApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-spreadsheet-59d8c5ef.js: -------------------------------------------------------------------------------- 1 | import{s as e}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const s={tagName:"vaadin-spreadsheet",displayName:"Spreadsheet",elements:[{selector:"vaadin-spreadsheet",displayName:"Spreadsheet",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]}]};export{s as default}; 2 | -------------------------------------------------------------------------------- /spring-security-custom/src/main/java/com/himanshu/springsecuritycustom/SpringSecurityCustomApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springsecuritycustom; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringSecurityCustomApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringSecurityCustomApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /interceptor-filter-demo/src/main/java/com/himanshu/interceptorfilterdemo/InterceptorFilterDemoApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.interceptorfilterdemo; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class InterceptorFilterDemoApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(InterceptorFilterDemoApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-authorization-server/spring-resource-server/src/main/java/com/himanshuntwk/springresourceserver/controller/MessageController.java: -------------------------------------------------------------------------------- 1 | package com.himanshuntwk.springresourceserver.controller; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | @RestController 7 | public class MessageController { 8 | 9 | @GetMapping("/hello") 10 | public String hello() { 11 | return "Hello from resource server"; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /websocket-client-server/src/main/java/com/himanshu/websocketclientserver/WebsocketClientServerApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.websocketclientserver; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class WebsocketClientServerApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(WebsocketClientServerApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /relational-db/src/main/java/com/himanshu/relationaldb/entity/Course.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.relationaldb.entity; 2 | 3 | import com.fasterxml.jackson.annotation.JsonBackReference; 4 | import jakarta.persistence.*; 5 | import lombok.Data; 6 | 7 | import java.util.List; 8 | 9 | @Data 10 | @Entity 11 | public class Course { 12 | @Id 13 | @GeneratedValue 14 | private Long id; 15 | private String courseName; 16 | @ManyToMany(mappedBy = "courses") 17 | @JsonBackReference 18 | List students; 19 | } 20 | -------------------------------------------------------------------------------- /spring-authorization-server/spring-oauth-client/src/main/java/com/himanshuntwk/democlient/SpringOauthClientApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshuntwk.democlient; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringOauthClientApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringOauthClientApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-vertical-layout-ad4174c4.js: -------------------------------------------------------------------------------- 1 | import{s as a}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-vertical-layout",displayName:"Vertical Layout",elements:[{selector:"vaadin-vertical-layout",displayName:"Layout",properties:[a.backgroundColor,a.borderColor,a.borderWidth,a.borderRadius,a.padding,a.gap]}]};export{d as default}; 2 | -------------------------------------------------------------------------------- /spring-authorization-server/spring-oauth-server/src/main/java/com/himanshuntwk/springoauthserver/SpringOauthServerApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshuntwk.springoauthserver; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringOauthServerApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringOauthServerApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-horizontal-layout-3193943f.js: -------------------------------------------------------------------------------- 1 | import{s as o}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-horizontal-layout",displayName:"Horizontal Layout",elements:[{selector:"vaadin-horizontal-layout",displayName:"Layout",properties:[o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius,o.padding,o.gap]}]};export{d as default}; 2 | -------------------------------------------------------------------------------- /reactive-web/src/main/java/com/himanshu/reactiveweb/model/BookDTO.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.reactiveweb.model; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Builder; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | 8 | @Data 9 | @Builder 10 | @AllArgsConstructor 11 | @NoArgsConstructor 12 | public class BookDTO { 13 | 14 | private Integer id; 15 | private String title; 16 | private String author; 17 | private String publisher; 18 | private String isbn; 19 | private String genre; 20 | } 21 | -------------------------------------------------------------------------------- /kafka-demo/src/main/java/com/practice/kafkademo/listener/KafkaDemoListener.java: -------------------------------------------------------------------------------- 1 | package com.practice.kafkademo.listener; 2 | 3 | import org.springframework.stereotype.Component; 4 | import org.springframework.kafka.annotation.KafkaListener; 5 | 6 | //@Component 7 | public class KafkaDemoListener { 8 | 9 | // @KafkaListener(id = "listenDemoId", topics = "demo-topic3", groupId = "test-group") 10 | public void listenTopic(String inputMessage) { 11 | System.out.println("Listener 1 >>> " + inputMessage); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /reactive-client/src/main/java/com/himanshu/reactive_client/model/BookDTO.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.reactive_client.model; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Builder; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | 8 | @Data 9 | @Builder 10 | @AllArgsConstructor 11 | @NoArgsConstructor 12 | public class BookDTO { 13 | 14 | private Integer id; 15 | private String title; 16 | private String author; 17 | private String publisher; 18 | private String isbn; 19 | private String genre; 20 | } 21 | -------------------------------------------------------------------------------- /spring-authorization-server/spring-resource-server/src/main/java/com/himanshuntwk/springresourceserver/SpringResourceServerApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshuntwk.springresourceserver; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringResourceServerApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringResourceServerApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/websocket-connection.d.ts: -------------------------------------------------------------------------------- 1 | import { Connection } from './connection'; 2 | export declare class WebSocketConnection extends Connection { 3 | static HEARTBEAT_INTERVAL: number; 4 | socket?: any; 5 | constructor(url: string); 6 | onReload(): void; 7 | onUpdate(_path: string, _content: string): void; 8 | onMessage(_message: any): void; 9 | handleMessage(msg: any): void; 10 | handleError(msg: any): void; 11 | send(command: string, data: any): void; 12 | } 13 | -------------------------------------------------------------------------------- /websocket-client-server/src/main/java/com/himanshu/websocketclientserver/server/IncomingMessage.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.websocketclientserver.server; 2 | 3 | public class IncomingMessage { 4 | 5 | private String name; 6 | 7 | public String getName() { 8 | return name; 9 | } 10 | 11 | public void setName(String name) { 12 | this.name = name; 13 | } 14 | 15 | public IncomingMessage(String name) { 16 | this.name = name; 17 | } 18 | 19 | public IncomingMessage() { 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /modulith-demo/src/main/java/com/himanshu/modulith_demo/ModulithDemoApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.modulith_demo; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.scheduling.annotation.EnableAsync; 6 | 7 | @EnableAsync 8 | @SpringBootApplication 9 | public class ModulithDemoApplication { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(ModulithDemoApplication.class, args); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-notification-bd6eb776.js: -------------------------------------------------------------------------------- 1 | import{a,c as t}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const s={tagName:"vaadin-notification",displayName:"Notification",elements:[{selector:"vaadin-notification-card::part(overlay)",displayName:"Notification card",properties:a},{selector:"vaadin-notification-card::part(content)",displayName:"Content",properties:t}]};export{s as default}; 2 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-progress-bar-309ecf1f.js: -------------------------------------------------------------------------------- 1 | import{s as r}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const i={tagName:"vaadin-progress-bar",displayName:"Progress Bar",elements:[{selector:"vaadin-progress-bar::part(bar)",displayName:"Bar",properties:[r.backgroundColor]},{selector:"vaadin-progress-bar::part(value)",displayName:"Value",properties:[r.backgroundColor]}]};export{i as default}; 2 | -------------------------------------------------------------------------------- /relational-db/src/main/java/com/himanshu/relationaldb/entity/StudentAddress.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.relationaldb.entity; 2 | 3 | import com.fasterxml.jackson.annotation.JsonBackReference; 4 | import jakarta.persistence.Entity; 5 | import jakarta.persistence.Id; 6 | import jakarta.persistence.OneToOne; 7 | import lombok.Data; 8 | 9 | @Data 10 | @Entity 11 | public class StudentAddress { 12 | @Id 13 | private Long id; 14 | @JsonBackReference 15 | @OneToOne(mappedBy = "address") 16 | private Student student; 17 | private String location; 18 | } 19 | -------------------------------------------------------------------------------- /eureka-server/src/main/java/com/himanshu/eurekaserver/EurekaServerApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.eurekaserver; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; 6 | 7 | @EnableEurekaServer 8 | @SpringBootApplication 9 | public class EurekaServerApplication { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(EurekaServerApplication.class, args); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /grpcmaven/.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 | -------------------------------------------------------------------------------- /kafka-demo/.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 | -------------------------------------------------------------------------------- /kc-gateway/.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 | -------------------------------------------------------------------------------- /native-jdbc/.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 | -------------------------------------------------------------------------------- /relational-db/src/main/java/com/himanshu/relationaldb/entity/School.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.relationaldb.entity; 2 | 3 | import com.fasterxml.jackson.annotation.JsonManagedReference; 4 | import jakarta.persistence.*; 5 | import lombok.Data; 6 | 7 | import java.util.List; 8 | 9 | @Data 10 | @Entity 11 | public class School { 12 | @Id 13 | @GeneratedValue 14 | private Long id; 15 | private String schoolName; 16 | 17 | @JsonManagedReference 18 | @OneToMany(mappedBy = "school", fetch = FetchType.EAGER) 19 | private List students; 20 | } 21 | -------------------------------------------------------------------------------- /spring-security-demo/src/main/java/com/himanshu/springsecuritydemo/appwrappers/AppRoleWrapper.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springsecuritydemo.appwrappers; 2 | 3 | import com.himanshu.springsecuritydemo.entity.AppRole; 4 | import lombok.AllArgsConstructor; 5 | import org.springframework.security.core.GrantedAuthority; 6 | 7 | @AllArgsConstructor 8 | public class AppRoleWrapper implements GrantedAuthority { 9 | 10 | private AppRole appRole; 11 | 12 | @Override 13 | public String getAuthority() { 14 | return appRole.getName(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /modulith-demo/.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 | -------------------------------------------------------------------------------- /reactive-client/.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 | -------------------------------------------------------------------------------- /reactive-web/.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 | -------------------------------------------------------------------------------- /relational-db/.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-ai-demo/.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-ai-ollama/.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-keycloak/.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 | -------------------------------------------------------------------------------- /websocket-client-server/src/main/java/com/himanshu/websocketclientserver/server/OutgoingMessage.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.websocketclientserver.server; 2 | 3 | public class OutgoingMessage { 4 | private String content; 5 | 6 | public OutgoingMessage(String content) { 7 | this.content = content; 8 | } 9 | 10 | public OutgoingMessage() { 11 | } 12 | 13 | public String getContent() { 14 | return content; 15 | } 16 | 17 | public void setContent(String content) { 18 | this.content = content; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /hypermedia-rest/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'org.springframework.boot' version '2.6.3' 3 | id 'io.spring.dependency-management' version '1.0.11.RELEASE' 4 | id 'java' 5 | } 6 | 7 | group = 'com.himanshu' 8 | version = '0.0.1-SNAPSHOT' 9 | sourceCompatibility = '17' 10 | 11 | repositories { 12 | mavenCentral() 13 | } 14 | 15 | dependencies { 16 | implementation 'org.springframework.boot:spring-boot-starter-hateoas' 17 | testImplementation 'org.springframework.boot:spring-boot-starter-test' 18 | } 19 | 20 | tasks.named('test') { 21 | useJUnitPlatform() 22 | } 23 | -------------------------------------------------------------------------------- /kafka-binder-demo/.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 | -------------------------------------------------------------------------------- /kc-gateway-reactive/.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 | -------------------------------------------------------------------------------- /mcp-demo/ai-client/.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 | -------------------------------------------------------------------------------- /mcp-demo/mcp-server/.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 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/registry.d.ts: -------------------------------------------------------------------------------- 1 | import { ComponentReference } from '../../component-util'; 2 | import { ComponentMetadata } from './model'; 3 | type ModuleLoader = (modulePath: string) => Promise; 4 | export declare class MetadataRegistry { 5 | private loader; 6 | private metadata; 7 | constructor(loader?: ModuleLoader); 8 | getMetadata(component: ComponentReference): Promise; 9 | } 10 | export declare const metadataRegistry: MetadataRegistry; 11 | export {}; 12 | -------------------------------------------------------------------------------- /spring-auth-server/.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-cache-demo/.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-keycloak-auth/.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-keycloak-auth/src/main/java/com/himanshu/springkeycloakauth/SpringKeycloakauthApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springkeycloakauth; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.context.annotation.Bean; 6 | 7 | @SpringBootApplication 8 | public class SpringKeycloakauthApplication { 9 | 10 | public static void main(String[] args) { 11 | SpringApplication.run(SpringKeycloakauthApplication.class, args); 12 | } 13 | 14 | 15 | 16 | 17 | } 18 | -------------------------------------------------------------------------------- /spring-res-server/.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-security-auth/.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-security-demo/.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-security-demo/src/main/java/com/himanshu/springsecuritydemo/entity/AppRole.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springsecuritydemo.entity; 2 | 3 | import jakarta.persistence.*; 4 | import lombok.Getter; 5 | import lombok.Setter; 6 | 7 | import java.util.Set; 8 | 9 | @Entity 10 | @Getter 11 | @Setter 12 | @Table(name = "roles") 13 | public class AppRole { 14 | 15 | @Id 16 | @GeneratedValue(strategy = GenerationType.IDENTITY) 17 | private int id; 18 | private String name; 19 | @ManyToMany(mappedBy = "roles") 20 | private Set users; 21 | } 22 | -------------------------------------------------------------------------------- /springpractice/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'org.springframework.boot' version '2.6.2' 3 | id 'io.spring.dependency-management' version '1.0.11.RELEASE' 4 | id 'java' 5 | } 6 | 7 | group = 'com.himanshu' 8 | version = '0.0.1-SNAPSHOT' 9 | sourceCompatibility = '17' 10 | 11 | repositories { 12 | mavenCentral() 13 | } 14 | 15 | dependencies { 16 | implementation 'org.springframework.boot:spring-boot-starter-web' 17 | testImplementation 'org.springframework.boot:spring-boot-starter-test' 18 | } 19 | 20 | test { 21 | useJUnitPlatform() 22 | } 23 | -------------------------------------------------------------------------------- /interceptor-filter-demo/.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-keycloak-auth/src/main/java/com/himanshu/springkeycloakauth/controller/AppController.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springkeycloakauth.controller; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | @RestController 7 | public class AppController { 8 | 9 | @GetMapping("/hello") 10 | public String hello() { 11 | return "Hello normal user"; 12 | } 13 | 14 | @GetMapping("/hello-pr") 15 | public String helloProtected() { 16 | return "Hello premium user"; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /spring-security-custom/.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 | -------------------------------------------------------------------------------- /ai-chat-memory/spring-ai-demo/.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 | -------------------------------------------------------------------------------- /phone-book/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | HELP.md 3 | target/ 4 | !.mvn/wrapper/maven-wrapper.jar 5 | !**/src/main/**/target/ 6 | !**/src/test/**/target/ 7 | 8 | ### STS ### 9 | .apt_generated 10 | .classpath 11 | .factorypath 12 | .project 13 | .settings 14 | .springBeans 15 | .sts4-cache 16 | 17 | ### IntelliJ IDEA ### 18 | .idea 19 | *.iws 20 | *.iml 21 | *.ipr 22 | 23 | ### NetBeans ### 24 | /nbproject/private/ 25 | /nbbuild/ 26 | /dist/ 27 | /nbdist/ 28 | /.nb-gradle/ 29 | build/ 30 | !**/src/main/**/build/ 31 | !**/src/test/**/build/ 32 | 33 | ### VS Code ### 34 | .vscode/ 35 | -------------------------------------------------------------------------------- /springai-advisors/spring-ai-demo/.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 | -------------------------------------------------------------------------------- /websocket-client-server/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'org.springframework.boot' version '2.6.3' 3 | id 'io.spring.dependency-management' version '1.0.11.RELEASE' 4 | id 'java' 5 | } 6 | 7 | group = 'com.himanshu' 8 | version = '0.0.1-SNAPSHOT' 9 | sourceCompatibility = '17' 10 | 11 | repositories { 12 | mavenCentral() 13 | } 14 | 15 | dependencies { 16 | implementation 'org.springframework.boot:spring-boot-starter-websocket' 17 | testImplementation 'org.springframework.boot:spring-boot-starter-test' 18 | } 19 | 20 | tasks.named('test') { 21 | useJUnitPlatform() 22 | } 23 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/connection.d.ts: -------------------------------------------------------------------------------- 1 | export declare enum ConnectionStatus { 2 | ACTIVE = "active", 3 | INACTIVE = "inactive", 4 | UNAVAILABLE = "unavailable", 5 | ERROR = "error" 6 | } 7 | export declare abstract class Connection { 8 | static HEARTBEAT_INTERVAL: number; 9 | status: ConnectionStatus; 10 | onHandshake(): void; 11 | onConnectionError(_: string): void; 12 | onStatusChange(_: ConnectionStatus): void; 13 | setActive(yes: boolean): void; 14 | setStatus(status: ConnectionStatus): void; 15 | } 16 | -------------------------------------------------------------------------------- /hypermedia-rest/README.MD: -------------------------------------------------------------------------------- 1 | SPRING BOOT APPLICATION USING HATEOAS 2 | 3 | HATEOAS : Hypermedia As The Engine Of Application State 4 | 5 | As per wikipedia - 6 | 1. HATEOAS is a constraint of the REST application architecture that distinguishes it from other network application architectures. 7 | 2. With HATEOAS, a client interacts with a network application whose application servers provide information dynamically through hypermedia. 8 | 3. A REST client needs little to no prior knowledge about how to interact with an application or server beyond a generic understanding of hypermedia. 9 | 10 | -------------------------------------------------------------------------------- /kafka-binder-demo/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | cloud: 3 | function: 4 | definition: consumerBinding;processorBinding;producerBinding 5 | stream: 6 | bindings: 7 | producerBinding-out-0: 8 | destination: processor-topic 9 | processorBinding-in-0: 10 | destination: processor-topic 11 | processorBinding-out-0: 12 | destination: consumer-topic 13 | consumerBinding-in-0: 14 | destination: consumer-topic 15 | kafka: 16 | binder: 17 | brokers: 18 | - localhost:9092 -------------------------------------------------------------------------------- /ai-chat-memory/spring-ai-demo/src/main/resources/application.yaml: -------------------------------------------------------------------------------- 1 | spring: 2 | application.name: spring-ai-demo 3 | ai: 4 | ollama: 5 | base-url: http://localhost:11434 6 | chat: 7 | options: 8 | model: gemma3:4b 9 | # chat: 10 | # memory: 11 | # repository: 12 | # jdbc: 13 | # initialize-schema: always 14 | datasource: 15 | url: jdbc:postgresql://localhost:5432/postgres 16 | username: postgres 17 | password: postgres 18 | driver-class-name: org.postgresql.Driver 19 | logging: 20 | level: 21 | root: error 22 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-cookie-consent-46c09f8b.js: -------------------------------------------------------------------------------- 1 | import{a as e,c as a}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const p={tagName:"vaadin-cookie-consent",displayName:"Cookie Consent",elements:[{selector:"div.cc-banner",displayName:"Banner",properties:e},{selector:"div.cc-banner span.cc-message",displayName:"Message",properties:a},{selector:"div.cc-banner a.cc-btn",displayName:"Button",properties:[...e,...a]}]};export{p as default}; 2 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-details-summary-351a1448.js: -------------------------------------------------------------------------------- 1 | import{t as a,s as t,i as e}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const l={tagName:"vaadin-details-summary",displayName:"Details Summary",elements:[{selector:"vaadin-details-summary",displayName:"Summary",properties:[a.textColor,a.fontSize,t.padding]},{selector:"vaadin-details-summary::part(toggle)",displayName:"Toggle",properties:[e.iconColor,e.iconSize]}]};export{l as default}; 2 | -------------------------------------------------------------------------------- /spring-authorization-server/spring-oauth-client/.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-authorization-server/spring-oauth-server/.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-authorization-server/spring-resource-server/.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-security-demo/src/main/java/com/himanshu/springsecuritydemo/repository/AppUserRepository.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springsecuritydemo.repository; 2 | 3 | import com.himanshu.springsecuritydemo.entity.AppUser; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.Query; 6 | 7 | public interface AppUserRepository extends JpaRepository { 8 | 9 | @Query(""" 10 | SELECT u FROM AppUser u WHERE u.username = :username 11 | """) 12 | AppUser findAppUserByUsername(String username); 13 | } 14 | -------------------------------------------------------------------------------- /springpractice/src/main/java/com/himanshu/springpractice/domain/User.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springpractice.domain; 2 | 3 | /** 4 | * User class acting as data object for post requests. 5 | */ 6 | public class User { 7 | 8 | private Long userId; 9 | private String userName; 10 | 11 | public User() { 12 | } 13 | 14 | public User(Long userId, String userName) { 15 | this.userId = userId; 16 | this.userName = userName; 17 | } 18 | 19 | public Long getUserId() { 20 | return userId; 21 | } 22 | 23 | public String getUserName() { 24 | return userName; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /spring-res-server/src/main/java/com/himanshu/springresserver/controller/AppController.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springresserver.controller; 2 | 3 | import org.springframework.security.core.annotation.AuthenticationPrincipal; 4 | import org.springframework.security.oauth2.jwt.Jwt; 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | @RestController 9 | public class AppController { 10 | 11 | @GetMapping("/hello") 12 | String hello(@AuthenticationPrincipal Jwt jwt) { 13 | return "Hello " + jwt.getSubject(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ai-demo/frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /native-jdbc/src/main/java/com/himanshu/nativejdbc/StudentController.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.nativejdbc; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.web.bind.annotation.GetMapping; 5 | import org.springframework.web.bind.annotation.RestController; 6 | 7 | import java.util.List; 8 | 9 | @RestController 10 | public class StudentController { 11 | 12 | @Autowired 13 | StudentRepository studentRepository; 14 | 15 | @GetMapping("/get-students") 16 | public List getAllStudents() { 17 | return studentRepository.findAllStudents(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-board-828ebdea.js: -------------------------------------------------------------------------------- 1 | import{s as r}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const p={tagName:"vaadin-board",displayName:"Board",elements:[{selector:"vaadin-board",displayName:"Layout",properties:[r.backgroundColor,r.borderColor,r.borderWidth,r.borderRadius,r.padding]},{selector:"vaadin-board vaadin-board-row",displayName:"Row",properties:[r.backgroundColor,r.borderColor,r.borderWidth,r.borderRadius,r.padding]}]};export{p as default}; 2 | -------------------------------------------------------------------------------- /phone-book/frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /grpc-server/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | .gradle 3 | build/ 4 | !gradle/wrapper/gradle-wrapper.jar 5 | !**/src/main/**/build/ 6 | !**/src/test/**/build/ 7 | 8 | ### STS ### 9 | .apt_generated 10 | .classpath 11 | .factorypath 12 | .project 13 | .settings 14 | .springBeans 15 | .sts4-cache 16 | bin/ 17 | !**/src/main/**/bin/ 18 | !**/src/test/**/bin/ 19 | 20 | ### IntelliJ IDEA ### 21 | .idea 22 | *.iws 23 | *.iml 24 | *.ipr 25 | out/ 26 | !**/src/main/**/out/ 27 | !**/src/test/**/out/ 28 | 29 | ### NetBeans ### 30 | /nbproject/private/ 31 | /nbbuild/ 32 | /dist/ 33 | /nbdist/ 34 | /.nb-gradle/ 35 | 36 | ### VS Code ### 37 | .vscode/ 38 | -------------------------------------------------------------------------------- /springpractice/README.md: -------------------------------------------------------------------------------- 1 | # SpringPractice 2 | 3 | SpringPractice project will contain random building blocks of spring framework https://spring.io/ which help in spring 4 | based projects. 5 | 6 | ## Installation 7 | 8 | Import this project in your favorite IDE and play around. 9 | 10 | ## Usage 11 | 12 | Learn basics which will help in creating a bigger picture. 13 | 14 | ## Contributing 15 | 16 | Pull requests are welcome. Please open an issue first to discuss what you would like to change. 17 | 18 | Please make sure to update tests as appropriate. 19 | 20 | ## License 21 | 22 | [MIT](https://choosealicense.com/licenses/mit/) -------------------------------------------------------------------------------- /config-server/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | .gradle 3 | build/ 4 | !gradle/wrapper/gradle-wrapper.jar 5 | !**/src/main/**/build/ 6 | !**/src/test/**/build/ 7 | 8 | ### STS ### 9 | .apt_generated 10 | .classpath 11 | .factorypath 12 | .project 13 | .settings 14 | .springBeans 15 | .sts4-cache 16 | bin/ 17 | !**/src/main/**/bin/ 18 | !**/src/test/**/bin/ 19 | 20 | ### IntelliJ IDEA ### 21 | .idea 22 | *.iws 23 | *.iml 24 | *.ipr 25 | out/ 26 | !**/src/main/**/out/ 27 | !**/src/test/**/out/ 28 | 29 | ### NetBeans ### 30 | /nbproject/private/ 31 | /nbbuild/ 32 | /dist/ 33 | /nbdist/ 34 | /.nb-gradle/ 35 | 36 | ### VS Code ### 37 | .vscode/ 38 | -------------------------------------------------------------------------------- /eureka-server/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | .gradle 3 | build/ 4 | !gradle/wrapper/gradle-wrapper.jar 5 | !**/src/main/**/build/ 6 | !**/src/test/**/build/ 7 | 8 | ### STS ### 9 | .apt_generated 10 | .classpath 11 | .factorypath 12 | .project 13 | .settings 14 | .springBeans 15 | .sts4-cache 16 | bin/ 17 | !**/src/main/**/bin/ 18 | !**/src/test/**/bin/ 19 | 20 | ### IntelliJ IDEA ### 21 | .idea 22 | *.iws 23 | *.iml 24 | *.ipr 25 | out/ 26 | !**/src/main/**/out/ 27 | !**/src/test/**/out/ 28 | 29 | ### NetBeans ### 30 | /nbproject/private/ 31 | /nbbuild/ 32 | /dist/ 33 | /nbdist/ 34 | /.nb-gradle/ 35 | 36 | ### VS Code ### 37 | .vscode/ 38 | -------------------------------------------------------------------------------- /graphql-client/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | .gradle 3 | build/ 4 | !gradle/wrapper/gradle-wrapper.jar 5 | !**/src/main/**/build/ 6 | !**/src/test/**/build/ 7 | 8 | ### STS ### 9 | .apt_generated 10 | .classpath 11 | .factorypath 12 | .project 13 | .settings 14 | .springBeans 15 | .sts4-cache 16 | bin/ 17 | !**/src/main/**/bin/ 18 | !**/src/test/**/bin/ 19 | 20 | ### IntelliJ IDEA ### 21 | .idea 22 | *.iws 23 | *.iml 24 | *.ipr 25 | out/ 26 | !**/src/main/**/out/ 27 | !**/src/test/**/out/ 28 | 29 | ### NetBeans ### 30 | /nbproject/private/ 31 | /nbbuild/ 32 | /dist/ 33 | /nbdist/ 34 | /.nb-gradle/ 35 | 36 | ### VS Code ### 37 | .vscode/ 38 | -------------------------------------------------------------------------------- /graphql-server/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | .gradle 3 | build/ 4 | !gradle/wrapper/gradle-wrapper.jar 5 | !**/src/main/**/build/ 6 | !**/src/test/**/build/ 7 | 8 | ### STS ### 9 | .apt_generated 10 | .classpath 11 | .factorypath 12 | .project 13 | .settings 14 | .springBeans 15 | .sts4-cache 16 | bin/ 17 | !**/src/main/**/bin/ 18 | !**/src/test/**/bin/ 19 | 20 | ### IntelliJ IDEA ### 21 | .idea 22 | *.iws 23 | *.iml 24 | *.ipr 25 | out/ 26 | !**/src/main/**/out/ 27 | !**/src/test/**/out/ 28 | 29 | ### NetBeans ### 30 | /nbproject/private/ 31 | /nbbuild/ 32 | /dist/ 33 | /nbdist/ 34 | /.nb-gradle/ 35 | 36 | ### VS Code ### 37 | .vscode/ 38 | -------------------------------------------------------------------------------- /hypermedia-rest/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | .gradle 3 | build/ 4 | !gradle/wrapper/gradle-wrapper.jar 5 | !**/src/main/**/build/ 6 | !**/src/test/**/build/ 7 | 8 | ### STS ### 9 | .apt_generated 10 | .classpath 11 | .factorypath 12 | .project 13 | .settings 14 | .springBeans 15 | .sts4-cache 16 | bin/ 17 | !**/src/main/**/bin/ 18 | !**/src/test/**/bin/ 19 | 20 | ### IntelliJ IDEA ### 21 | .idea 22 | *.iws 23 | *.iml 24 | *.ipr 25 | out/ 26 | !**/src/main/**/out/ 27 | !**/src/test/**/out/ 28 | 29 | ### NetBeans ### 30 | /nbproject/private/ 31 | /nbbuild/ 32 | /dist/ 33 | /nbdist/ 34 | /.nb-gradle/ 35 | 36 | ### VS Code ### 37 | .vscode/ 38 | -------------------------------------------------------------------------------- /relational-db/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | datasource: 3 | url: jdbc:postgresql://localhost:5432/postgres 4 | username: postgres 5 | password: password 6 | jpa: 7 | open-in-view: false 8 | hibernate: 9 | ddl-auto: validate 10 | dialect: org.hibernate.dialect.PostgreSQLDialect 11 | properties: 12 | hibernate: 13 | format_sql: true 14 | default_schema: demo 15 | generate_statistics: false 16 | logging: 17 | level: 18 | org: 19 | hibernate: 20 | SQL: DEBUG 21 | orm.jdbc.bind: TRACE 22 | server: 23 | port: 8181 24 | 25 | 26 | -------------------------------------------------------------------------------- /circuit-breaker-client/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | .gradle 3 | build/ 4 | !gradle/wrapper/gradle-wrapper.jar 5 | !**/src/main/**/build/ 6 | !**/src/test/**/build/ 7 | 8 | ### STS ### 9 | .apt_generated 10 | .classpath 11 | .factorypath 12 | .project 13 | .settings 14 | .springBeans 15 | .sts4-cache 16 | bin/ 17 | !**/src/main/**/bin/ 18 | !**/src/test/**/bin/ 19 | 20 | ### IntelliJ IDEA ### 21 | .idea 22 | *.iws 23 | *.iml 24 | *.ipr 25 | out/ 26 | !**/src/main/**/out/ 27 | !**/src/test/**/out/ 28 | 29 | ### NetBeans ### 30 | /nbproject/private/ 31 | /nbbuild/ 32 | /dist/ 33 | /nbdist/ 34 | /.nb-gradle/ 35 | 36 | ### VS Code ### 37 | .vscode/ 38 | -------------------------------------------------------------------------------- /config-server-client/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | .gradle 3 | build/ 4 | !gradle/wrapper/gradle-wrapper.jar 5 | !**/src/main/**/build/ 6 | !**/src/test/**/build/ 7 | 8 | ### STS ### 9 | .apt_generated 10 | .classpath 11 | .factorypath 12 | .project 13 | .settings 14 | .springBeans 15 | .sts4-cache 16 | bin/ 17 | !**/src/main/**/bin/ 18 | !**/src/test/**/bin/ 19 | 20 | ### IntelliJ IDEA ### 21 | .idea 22 | *.iws 23 | *.iml 24 | *.ipr 25 | out/ 26 | !**/src/main/**/out/ 27 | !**/src/test/**/out/ 28 | 29 | ### NetBeans ### 30 | /nbproject/private/ 31 | /nbbuild/ 32 | /dist/ 33 | /nbdist/ 34 | /.nb-gradle/ 35 | 36 | ### VS Code ### 37 | .vscode/ 38 | -------------------------------------------------------------------------------- /config-server-client/src/main/java/com/himanshu/configserverclient/ConfigServerClientApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.configserverclient; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | * Make sure to run config-server service first before starting client as it will fetch configuration value. 8 | */ 9 | @SpringBootApplication 10 | public class ConfigServerClientApplication { 11 | 12 | public static void main(String[] args) { 13 | SpringApplication.run(ConfigServerClientApplication.class, args); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /eureka-server-client/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | .gradle 3 | build/ 4 | !gradle/wrapper/gradle-wrapper.jar 5 | !**/src/main/**/build/ 6 | !**/src/test/**/build/ 7 | 8 | ### STS ### 9 | .apt_generated 10 | .classpath 11 | .factorypath 12 | .project 13 | .settings 14 | .springBeans 15 | .sts4-cache 16 | bin/ 17 | !**/src/main/**/bin/ 18 | !**/src/test/**/bin/ 19 | 20 | ### IntelliJ IDEA ### 21 | .idea 22 | *.iws 23 | *.iml 24 | *.ipr 25 | out/ 26 | !**/src/main/**/out/ 27 | !**/src/test/**/out/ 28 | 29 | ### NetBeans ### 30 | /nbproject/private/ 31 | /nbbuild/ 32 | /dist/ 33 | /nbdist/ 34 | /.nb-gradle/ 35 | 36 | ### VS Code ### 37 | .vscode/ 38 | -------------------------------------------------------------------------------- /websocket-client-server/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | .gradle 3 | build/ 4 | !gradle/wrapper/gradle-wrapper.jar 5 | !**/src/main/**/build/ 6 | !**/src/test/**/build/ 7 | 8 | ### STS ### 9 | .apt_generated 10 | .classpath 11 | .factorypath 12 | .project 13 | .settings 14 | .springBeans 15 | .sts4-cache 16 | bin/ 17 | !**/src/main/**/bin/ 18 | !**/src/test/**/bin/ 19 | 20 | ### IntelliJ IDEA ### 21 | .idea 22 | *.iws 23 | *.iml 24 | *.ipr 25 | out/ 26 | !**/src/main/**/out/ 27 | !**/src/test/**/out/ 28 | 29 | ### NetBeans ### 30 | /nbproject/private/ 31 | /nbbuild/ 32 | /dist/ 33 | /nbdist/ 34 | /.nb-gradle/ 35 | 36 | ### VS Code ### 37 | .vscode/ 38 | -------------------------------------------------------------------------------- /springpractice/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | .gradle 3 | build/ 4 | !gradle/wrapper/gradle-wrapper.jar 5 | !**/src/main/**/build/ 6 | !**/src/test/**/build/ 7 | .DS_Store 8 | 9 | ### STS ### 10 | .apt_generated 11 | .classpath 12 | .factorypath 13 | .project 14 | .settings 15 | .springBeans 16 | .sts4-cache 17 | bin/ 18 | !**/src/main/**/bin/ 19 | !**/src/test/**/bin/ 20 | 21 | ### IntelliJ IDEA ### 22 | .idea 23 | *.iws 24 | *.iml 25 | *.ipr 26 | out/ 27 | !**/src/main/**/out/ 28 | !**/src/test/**/out/ 29 | 30 | ### NetBeans ### 31 | /nbproject/private/ 32 | /nbbuild/ 33 | /dist/ 34 | /nbdist/ 35 | /.nb-gradle/ 36 | 37 | ### VS Code ### 38 | .vscode/ 39 | -------------------------------------------------------------------------------- /kc-gateway/src/main/resources/application.yaml: -------------------------------------------------------------------------------- 1 | server.port: 8282 2 | 3 | spring: 4 | application.name: kc-gateway 5 | cloud: 6 | gateway: 7 | routes: 8 | - id: kc-gateway 9 | uri: http://localhost:8181 10 | predicates: 11 | - Path=/hello 12 | default-filters: 13 | - TokenRelay 14 | security.oauth2.client: 15 | registration.keycloak: 16 | client-id: spring-client 17 | authorization-grant-type: authorization_code 18 | scope: openid 19 | provider.keycloak: 20 | issuer-uri: http://localhost:8080/realms/springrealm 21 | user-name-attribute: springappuser 22 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-app-layout-e56de2e9.js: -------------------------------------------------------------------------------- 1 | import{s as a}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-app-layout",displayName:"App Layout",elements:[{selector:"vaadin-app-layout",displayName:"Layout",properties:[a.backgroundColor]},{selector:"vaadin-app-layout::part(drawer)",displayName:"Drawer",properties:[a.backgroundColor,a.padding]},{selector:"vaadin-app-layout::part(navbar)",displayName:"Navbar",properties:[a.backgroundColor,a.padding]}]};export{d as default}; 2 | -------------------------------------------------------------------------------- /native-jdbc/src/main/java/com/himanshu/nativejdbc/StudentRepository.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.nativejdbc; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.jdbc.core.BeanPropertyRowMapper; 5 | import org.springframework.jdbc.core.JdbcTemplate; 6 | import org.springframework.stereotype.Repository; 7 | 8 | import java.util.List; 9 | 10 | @Repository 11 | public class StudentRepository { 12 | 13 | @Autowired 14 | JdbcTemplate jdbcTemplate; 15 | 16 | public List findAllStudents() { 17 | return jdbcTemplate.query("select * from student", new BeanPropertyRowMapper<>(Student.class)); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /open-api/.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | !**/src/main/**/target/ 4 | !**/src/test/**/target/ 5 | 6 | ### IntelliJ IDEA ### 7 | .idea/modules.xml 8 | .idea/jarRepositories.xml 9 | .idea/compiler.xml 10 | .idea/libraries/ 11 | *.iws 12 | *.iml 13 | *.ipr 14 | 15 | ### Eclipse ### 16 | .apt_generated 17 | .classpath 18 | .factorypath 19 | .project 20 | .settings 21 | .springBeans 22 | .sts4-cache 23 | 24 | ### NetBeans ### 25 | /nbproject/private/ 26 | /nbbuild/ 27 | /dist/ 28 | /nbdist/ 29 | /.nb-gradle/ 30 | build/ 31 | !**/src/main/**/build/ 32 | !**/src/test/**/build/ 33 | 34 | ### VS Code ### 35 | .vscode/ 36 | 37 | ### Mac OS ### 38 | .DS_Store -------------------------------------------------------------------------------- /config-server/src/main/java/com/himanshu/configserver/ConfigServerApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.configserver; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cloud.config.server.EnableConfigServer; 6 | 7 | /** 8 | * Config server having "msg" configuration parameter information which will be required for client to work. 9 | */ 10 | @EnableConfigServer 11 | @SpringBootApplication 12 | public class ConfigServerApplication { 13 | 14 | public static void main(String[] args) { 15 | SpringApplication.run(ConfigServerApplication.class, args); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /modulith-demo/src/main/java/com/himanshu/modulith_demo/module1/Module1Api.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.modulith_demo.module1; 2 | 3 | import com.himanshu.modulith_demo.module1.internal.InternalData1; 4 | import org.springframework.web.bind.annotation.PostMapping; 5 | import org.springframework.web.bind.annotation.RestController; 6 | 7 | @RestController 8 | public class Module1Api { 9 | 10 | private final InternalData1 internalData1; 11 | 12 | public Module1Api(InternalData1 internalData1) { 13 | this.internalData1 = internalData1; 14 | } 15 | 16 | @PostMapping("/sendEvent") 17 | public void sendEvent() { 18 | internalData1.sendEvent(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /springpractice/src/main/java/com/himanshu/springpractice/SpringpracticeApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springpractice; 2 | 3 | import com.himanshu.springpractice.service.TestService; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.context.annotation.Bean; 7 | 8 | @SpringBootApplication 9 | public class SpringpracticeApplication { 10 | 11 | @Bean 12 | public TestService getTestService() { 13 | return new TestService(); 14 | } 15 | public static void main(String[] args) { 16 | SpringApplication.run(SpringpracticeApplication.class, args); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /graphql-client/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'org.springframework.boot' version '2.6.3' 3 | id 'io.spring.dependency-management' version '1.0.11.RELEASE' 4 | id 'java' 5 | } 6 | 7 | group = 'com.himanshu' 8 | version = '0.0.1-SNAPSHOT' 9 | sourceCompatibility = '17' 10 | 11 | repositories { 12 | mavenCentral() 13 | } 14 | 15 | dependencies { 16 | implementation "com.netflix.graphql.dgs:graphql-dgs-client:4.9.16" 17 | implementation 'org.springframework.boot:spring-boot-starter-web' 18 | testImplementation 'org.springframework.boot:spring-boot-starter-test' 19 | testImplementation 'io.projectreactor:reactor-test' 20 | } 21 | 22 | tasks.named('test') { 23 | useJUnitPlatform() 24 | } 25 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-avatar-7599297d.js: -------------------------------------------------------------------------------- 1 | import{s as a,E as r,p as t,t as e}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const l={tagName:"vaadin-avatar",displayName:"Avatar",elements:[{selector:"vaadin-avatar",displayName:"Root element",properties:[a.backgroundColor,a.borderColor,a.borderWidth,{propertyName:"--vaadin-avatar-size",displayName:"Size",editorType:r.range,presets:t.lumoSize,icon:"square"}]},{selector:"vaadin-avatar::part(abbr)",displayName:"Abbreviation",properties:[e.textColor,e.fontWeight]}]};export{l as default}; 2 | -------------------------------------------------------------------------------- /spring-authorization-server/spring-oauth-client/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8082 3 | spring: 4 | output.ansi.enabled: ALWAYS 5 | security: 6 | oauth2: 7 | client: 8 | provider: 9 | spring: 10 | issuer-uri: http://localhost:8080 11 | registration: 12 | reg-client: 13 | provider: spring 14 | client-id: demo 15 | client-secret: "secret" 16 | authorization-grant-type: authorization_code 17 | client-authentication-method: client_secret_basic 18 | redirect-uri: "{baseUrl}/login/oauth2/code/{registrationId}" 19 | scope: user.read,openid 20 | -------------------------------------------------------------------------------- /ai-demo/src/main/resources/application.yaml: -------------------------------------------------------------------------------- 1 | server.port: 8080 2 | logging.level.org.atmosphere: warn 3 | spring: 4 | mustache.check-template-location: false 5 | jpa.defer-datasource-initialization: true 6 | datasource: 7 | url: jdbc:postgresql://localhost:5432/postgres 8 | username: postgres 9 | password: password 10 | ai: 11 | ollama: 12 | base-url: http://localhost:11434 13 | embedding: 14 | model: nomic-embed-text 15 | chat: 16 | model: llama2 17 | vectorstore: 18 | pgvector: 19 | dimensions: 768 20 | vaadin: 21 | launch-browser: true 22 | allowed-packages: com.vaadin,org.vaadin,dev.hilla,com.example.application 23 | 24 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/class-name-editor.d.ts: -------------------------------------------------------------------------------- 1 | import { LitElement, PropertyValues } from 'lit'; 2 | import './editors/base-property-editor'; 3 | export declare class ClassNameChangeEvent extends CustomEvent<{ 4 | value: string; 5 | }> { 6 | constructor(value: string); 7 | } 8 | export declare class ClassNameEditor extends LitElement { 9 | static get styles(): import("lit").CSSResult[]; 10 | className: string; 11 | private editedClassName; 12 | private invalid; 13 | protected update(changedProperties: PropertyValues): void; 14 | render(): import("lit").TemplateResult<1>; 15 | private handleInputChange; 16 | } 17 | -------------------------------------------------------------------------------- /relational-db/src/main/java/com/himanshu/relationaldb/service/CourseService.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.relationaldb.service; 2 | 3 | import com.himanshu.relationaldb.entity.Course; 4 | import com.himanshu.relationaldb.repository.CourseRepository; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | @Service 9 | public class CourseService { 10 | 11 | @Autowired 12 | CourseRepository courseRepository; 13 | 14 | public Course getCourse(Long id) { 15 | return courseRepository.findById(id).orElse(new Course()); 16 | } 17 | public void saveCourse(Course course) 18 | { 19 | courseRepository.save(course); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /spring-ai-demo/src/main/resources/application.yaml: -------------------------------------------------------------------------------- 1 | spring: 2 | application.name: spring-ai-demo 3 | datasource: 4 | url: jdbc:postgresql://localhost:5432/postgres 5 | username: postgres 6 | password: postgres 7 | driver-class-name: org.postgresql.Driver 8 | ai: 9 | vectorstore: 10 | pgvector: 11 | table-name: testdata 12 | index-type: HNSW 13 | distance-type: COSINE_DISTANCE 14 | dimensions: 1024 15 | max-document-batch-size: 10000 16 | ollama: 17 | base-url: http://localhost:11434 18 | embedding: 19 | options: 20 | model: mxbai-embed-large 21 | chat: 22 | options: 23 | model: gemma3:4b -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-split-layout-80c92131.js: -------------------------------------------------------------------------------- 1 | import{s as a}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const l={tagName:"vaadin-split-layout",displayName:"Split Layout",elements:[{selector:"vaadin-split-layout",displayName:"Layout",properties:[a.backgroundColor,a.borderColor,a.borderWidth,a.borderRadius]},{selector:"vaadin-split-layout::part(splitter)",displayName:"Splitter bar",properties:[a.backgroundColor]},{selector:"vaadin-split-layout::part(handle)::after",displayName:"Splitter handle",properties:[a.backgroundColor]}]};export{l as default}; 2 | -------------------------------------------------------------------------------- /spring-keycloak/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.output.ansi.enabled=always 2 | server.port=8181 3 | logging.level.org.springframework.security=trace 4 | 5 | 6 | spring.security.oauth2.client.registration.keycloak.client-id=spring-client 7 | spring.security.oauth2.client.registration.keycloak.authorization-grant-type=authorization_code 8 | spring.security.oauth2.client.registration.keycloak.scope=openid 9 | 10 | spring.security.oauth2.client.provider.keycloak.issuer-uri=http://localhost:8080/realms/springrealm 11 | spring.security.oauth2.client.provider.keycloak.user-name-attribute=springappuser 12 | 13 | spring.security.oauth2.resourceserver.jwt.issuer-uri=http://localhost:8080/realms/springrealm -------------------------------------------------------------------------------- /websocket-client-server/src/main/java/com/himanshu/websocketclientserver/server/ServerController.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.websocketclientserver.server; 2 | 3 | import org.springframework.messaging.handler.annotation.MessageMapping; 4 | import org.springframework.messaging.handler.annotation.SendTo; 5 | import org.springframework.stereotype.Controller; 6 | 7 | @Controller 8 | public class ServerController { 9 | 10 | @MessageMapping("/process-message") 11 | @SendTo("/topic/messages") 12 | public OutgoingMessage processMessage(IncomingMessage incomingMessage) throws Exception{ 13 | Thread.sleep(1000); 14 | return new OutgoingMessage("Hello " + incomingMessage.getName()); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-button-2511ad84.js: -------------------------------------------------------------------------------- 1 | import{c as t,s as e,E as r,p as o,f as a}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const s=[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,{propertyName:"--lumo-button-size",displayName:"Size",editorType:r.range,presets:o.lumoSize,icon:"square"},a.paddingInline],u={tagName:"vaadin-button",displayName:"Button",elements:[{selector:"vaadin-button",displayName:"Root element",properties:s},{selector:"vaadin-button::part(label)",displayName:"Label",properties:t}]};export{u as default,s as standardButtonProperties}; 2 | -------------------------------------------------------------------------------- /graphql-server/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'org.springframework.boot' version '2.6.2' 3 | id 'io.spring.dependency-management' version '1.0.11.RELEASE' 4 | id 'java' 5 | } 6 | 7 | group = 'com.himanshu' 8 | version = '0.0.1-SNAPSHOT' 9 | sourceCompatibility = '17' 10 | 11 | repositories { 12 | mavenCentral() 13 | } 14 | 15 | dependencies { 16 | implementation(platform("com.netflix.graphql.dgs:graphql-dgs-platform-dependencies:latest.release")) 17 | implementation "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter" 18 | implementation 'org.springframework.boot:spring-boot-starter-webflux' 19 | testImplementation 'org.springframework.boot:spring-boot-starter-test' 20 | } 21 | 22 | test { 23 | useJUnitPlatform() 24 | } 25 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-custom-field-42c85b9e.js: -------------------------------------------------------------------------------- 1 | import{labelProperties as e,helperTextProperties as r,errorMessageProperties as t}from"./vaadin-text-field-0b3db014.js";import"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-custom-field",displayName:"Custom Field",elements:[{selector:"vaadin-custom-field::part(label)",displayName:"Label",properties:e},{selector:"vaadin-custom-field::part(helper-text)",displayName:"Helper text",properties:r},{selector:"vaadin-custom-field::part(error-message)",displayName:"Error message",properties:t}]};export{d as default}; 2 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-list-box-d7a8433b.js: -------------------------------------------------------------------------------- 1 | import{s as o,f as r}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const l={tagName:"vaadin-list-box",displayName:"List Box",elements:[{selector:"vaadin-list-box",displayName:"Root element",properties:[o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius,r.paddingInline]},{selector:"vaadin-list-box > hr",displayName:"Divider",properties:[o.backgroundColor]},{selector:"vaadin-list-box > vaadin-item",displayName:"Item",properties:[o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius,r.paddingInline]}]};export{l as default}; 2 | -------------------------------------------------------------------------------- /spring-security-demo/src/main/java/com/himanshu/springsecuritydemo/entity/AppUser.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springsecuritydemo.entity; 2 | 3 | import jakarta.persistence.*; 4 | import lombok.Getter; 5 | import lombok.Setter; 6 | 7 | import java.util.Set; 8 | 9 | @Entity 10 | @Getter 11 | @Setter 12 | @Table(name = "users") 13 | public class AppUser { 14 | 15 | @Id 16 | @GeneratedValue(strategy = GenerationType.IDENTITY) 17 | private int id; 18 | private String username; 19 | private String password; 20 | @ManyToMany(fetch = FetchType.EAGER) 21 | @JoinTable(name = "users_roles", joinColumns = @JoinColumn(name = "userid"), inverseJoinColumns = @JoinColumn(name = "roleid")) 22 | private Set roles; 23 | } 24 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-date-time-picker-c8c047a7.js: -------------------------------------------------------------------------------- 1 | import{labelProperties as e,helperTextProperties as r,errorMessageProperties as t}from"./vaadin-text-field-0b3db014.js";import"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-date-time-picker",displayName:"Date Time Picker",elements:[{selector:"vaadin-date-time-picker::part(label)",displayName:"Label",properties:e},{selector:"vaadin-date-time-picker::part(helper-text)",displayName:"Helper text",properties:r},{selector:"vaadin-date-time-picker::part(error-message)",displayName:"Error message",properties:t}]};export{d as default}; 2 | -------------------------------------------------------------------------------- /config-server/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'org.springframework.boot' version '2.6.2' 3 | id 'io.spring.dependency-management' version '1.0.11.RELEASE' 4 | id 'java' 5 | } 6 | 7 | group = 'com.himanshu' 8 | version = '0.0.1-SNAPSHOT' 9 | sourceCompatibility = '17' 10 | 11 | repositories { 12 | mavenCentral() 13 | } 14 | 15 | ext { 16 | set('springCloudVersion', "2021.0.0") 17 | } 18 | 19 | dependencies { 20 | implementation 'org.springframework.cloud:spring-cloud-config-server' 21 | testImplementation 'org.springframework.boot:spring-boot-starter-test' 22 | } 23 | 24 | dependencyManagement { 25 | imports { 26 | mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}" 27 | } 28 | } 29 | 30 | test { 31 | useJUnitPlatform() 32 | } 33 | -------------------------------------------------------------------------------- /reactive-client/src/main/java/com/himanshu/reactive_client/config/BookClientConfig.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.reactive_client.config; 2 | 3 | import org.springframework.beans.factory.annotation.Value; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | import org.springframework.web.reactive.function.client.WebClient; 7 | 8 | @Configuration 9 | public class BookClientConfig { 10 | 11 | private final String bookBaseUrl; 12 | 13 | public BookClientConfig(@Value("${book.base.url}") String bookBaseUrl) { 14 | this.bookBaseUrl = bookBaseUrl; 15 | } 16 | 17 | @Bean 18 | public WebClient getWebClient() { 19 | return WebClient.builder().baseUrl(bookBaseUrl).build(); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /mcp-demo/mcp-server/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.application.name=mcp-server 2 | server.port=8181 3 | 4 | # Server identification 5 | spring.ai.mcp.server.name=my-mcp-server 6 | spring.ai.mcp.server.version=0.0.1 7 | 8 | # Server type (SYNC/ASYNC) 9 | spring.ai.mcp.server.type=SYNC 10 | 11 | # Transport configuration 12 | spring.ai.mcp.server.stdio=false 13 | spring.ai.mcp.server.sse-message-endpoint=/mcp/message 14 | 15 | # Change notifications 16 | spring.ai.mcp.server.resource-change-notification=true 17 | spring.ai.mcp.server.tool-change-notification=true 18 | spring.ai.mcp.server.prompt-change-notification=true 19 | 20 | # Logging (required for STDIO transport) 21 | spring.main.banner-mode=off 22 | logging.file.name=./target/starter-webflux-server.log -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-board-row-c70d0c55.js: -------------------------------------------------------------------------------- 1 | import{s as o}from"../vaadin-dev-tools.js";import{html as r}from"lit";import"construct-style-sheets-polyfill";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const l={tagName:"vaadin-board-row",description:r`You are styling selected row only, if you wish to style all rows of given board please pick 2 | vaadin-board instead.`,notAccessibleDescription:r`If you wish to style all rows of current board please pick 3 | vaadin-board instead.`,displayName:"Board Row",elements:[{selector:"vaadin-board-row",displayName:"Layout",properties:[o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius,o.padding]}]};export{l as default}; 4 | -------------------------------------------------------------------------------- /spring-authorization-server/spring-oauth-server/src/main/resources/application.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | spring: 4 | output.ansi.enabled: ALWAYS 5 | security: 6 | oauth2: 7 | authorizationserver: 8 | client: 9 | demo-client: 10 | require-authorization-consent: true 11 | registration: 12 | client-id: demo 13 | client-secret: "{bcrypt}$2a$10$lHEIhOIZBybWCzRZOVuko.rFe9oGBtGHnRAU97wgvJZmWQWvkBIm6" 14 | authorization-grant-types: client_credentials,authorization_code,refresh_token 15 | redirect-uris: http://127.0.0.1:8082/login/oauth2/code/reg-client 16 | scopes: user.read,user.write,openid 17 | client-authentication-methods: client_secret_basic -------------------------------------------------------------------------------- /eureka-server/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'org.springframework.boot' version '2.6.2' 3 | id 'io.spring.dependency-management' version '1.0.11.RELEASE' 4 | id 'java' 5 | } 6 | 7 | group = 'com.himanshu' 8 | version = '0.0.1-SNAPSHOT' 9 | sourceCompatibility = '17' 10 | 11 | repositories { 12 | mavenCentral() 13 | } 14 | 15 | ext { 16 | set('springCloudVersion', "2021.0.0") 17 | } 18 | 19 | dependencies { 20 | implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-server' 21 | testImplementation 'org.springframework.boot:spring-boot-starter-test' 22 | } 23 | 24 | dependencyManagement { 25 | imports { 26 | mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}" 27 | } 28 | } 29 | 30 | test { 31 | useJUnitPlatform() 32 | } 33 | -------------------------------------------------------------------------------- /interceptor-filter-demo/src/main/java/com/himanshu/interceptorfilterdemo/filter/TestFilter.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.interceptorfilterdemo.filter; 2 | 3 | import jakarta.servlet.*; 4 | import jakarta.servlet.http.HttpServletResponse; 5 | import org.springframework.stereotype.Component; 6 | 7 | import java.io.IOException; 8 | 9 | @Component 10 | public class TestFilter implements Filter { 11 | @Override 12 | public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { 13 | HttpServletResponse response = (HttpServletResponse) servletResponse; 14 | response.addHeader("custom-header","filter-value"); 15 | filterChain.doFilter(servletRequest,response); 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ai-demo/src/main/java/com/example/application/Application.java: -------------------------------------------------------------------------------- 1 | package com.example.application; 2 | 3 | import com.vaadin.flow.component.page.AppShellConfigurator; 4 | import com.vaadin.flow.theme.Theme; 5 | import org.springframework.boot.SpringApplication; 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; 7 | 8 | /** 9 | * The entry point of the Spring Boot application. 10 | * 11 | * Use the @PWA annotation make the application installable on phones, tablets 12 | * and some desktop browsers. 13 | * 14 | */ 15 | @SpringBootApplication 16 | @Theme(value = "mytodo") 17 | public class Application implements AppShellConfigurator { 18 | 19 | public static void main(String[] args) { 20 | SpringApplication.run(Application.class, args); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/range-property-editor.d.ts: -------------------------------------------------------------------------------- 1 | import { PropertyValues, TemplateResult } from 'lit'; 2 | import { BasePropertyEditor } from './base-property-editor'; 3 | export declare class RangePropertyEditor extends BasePropertyEditor { 4 | static get styles(): import("lit").CSSResultGroup[]; 5 | private selectedPresetIndex; 6 | private presets; 7 | protected update(changedProperties: PropertyValues): void; 8 | protected renderEditor(): TemplateResult; 9 | private handleSliderInput; 10 | private handleSliderChange; 11 | private handleValueChange; 12 | protected dispatchChange(value: string): void; 13 | protected updateValueFromTheme(): void; 14 | private updateSliderValue; 15 | } 16 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/scope-selector.d.ts: -------------------------------------------------------------------------------- 1 | import { LitElement, PropertyValues } from 'lit'; 2 | import { ComponentMetadata } from '../metadata/model'; 3 | import { ThemeScope } from '../model'; 4 | export declare class ScopeChangeEvent extends CustomEvent<{ 5 | value: ThemeScope; 6 | }> { 7 | constructor(value: ThemeScope); 8 | } 9 | export declare class ScopeSelector extends LitElement { 10 | static get styles(): import("lit").CSSResult; 11 | value: ThemeScope; 12 | metadata?: ComponentMetadata; 13 | private select?; 14 | protected update(changedProperties: PropertyValues): void; 15 | render(): import("lit").TemplateResult<1>; 16 | private selectRenderer; 17 | private handleValueChange; 18 | } 19 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/License.d.ts: -------------------------------------------------------------------------------- 1 | import { ServerMessage } from "./vaadin-dev-tools"; 2 | export interface Product { 3 | name: string; 4 | version: string; 5 | } 6 | export interface ProductAndMessage { 7 | message: string; 8 | messageHtml?: string; 9 | product: Product; 10 | } 11 | export declare const findAll: (element: Element | ShadowRoot | Document, tags: string[]) => Element[]; 12 | export declare const licenseCheckOk: (data: Product) => void; 13 | export declare const licenseCheckFailed: (data: ProductAndMessage) => void; 14 | export declare const licenseCheckNoKey: (data: ProductAndMessage) => void; 15 | export declare const handleLicenseMessage: (message: ServerMessage) => boolean; 16 | export declare const licenseInit: () => void; 17 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/color-property-editor.d.ts: -------------------------------------------------------------------------------- 1 | import { PropertyValues, TemplateResult } from 'lit'; 2 | import './color-picker'; 3 | import { BasePropertyEditor } from './base-property-editor'; 4 | export declare class ColorPropertyEditor extends BasePropertyEditor { 5 | static get styles(): import("lit").CSSResultGroup[]; 6 | private presets; 7 | protected update(changedProperties: PropertyValues): void; 8 | protected renderEditor(): TemplateResult; 9 | private handleInputChange; 10 | private handleColorPickerChange; 11 | private handleColorPickerCommit; 12 | private handleColorPickerCancel; 13 | protected dispatchChange(value: string): void; 14 | protected updateValueFromTheme(): void; 15 | } 16 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-accordion-eed3b794.js: -------------------------------------------------------------------------------- 1 | import{t as a,s as o,i}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const p={tagName:"vaadin-accordion",displayName:"Accordion",elements:[{selector:"vaadin-accordion > vaadin-accordion-panel > vaadin-accordion-heading",displayName:"Heading",properties:[a.textColor,a.fontSize,o.padding]},{selector:"vaadin-accordion > vaadin-accordion-panel > vaadin-accordion-heading::part(toggle)",displayName:"Toggle",properties:[i.iconColor,i.iconSize]},{selector:"vaadin-accordion > vaadin-accordion-panel",displayName:"Panel",properties:[o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius]}]};export{p as default}; 2 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-accordion-panel-616e55d6.js: -------------------------------------------------------------------------------- 1 | import{s as o}from"../vaadin-dev-tools.js";import{html as e}from"lit";import"construct-style-sheets-polyfill";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const l={tagName:"vaadin-accordion-panel",displayName:"Accordion Panel",description:e`You are styling selected panel only, if you wish to style all panel of given accordion please pick 2 | vaadin-accordion instead.`,notAccessibleDescription:e`If you wish to style all panels of current accordion please pick 3 | vaadin-accordion instead.`,elements:[{selector:"vaadin-accordion-panel",displayName:"Panel",properties:[o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius]}]};export{l as default}; 4 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-message-input-996ac37c.js: -------------------------------------------------------------------------------- 1 | import{s as e,E as a,p as r,f as t}from"../vaadin-dev-tools.js";import{inputFieldProperties as i}from"./vaadin-text-field-0b3db014.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const u={tagName:"vaadin-message-input",displayName:"Message Input",elements:[{selector:"vaadin-message-input vaadin-text-area::part(input-field)",displayName:"Text area",properties:i},{selector:"vaadin-message-input vaadin-button",displayName:"Button",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,{propertyName:"--lumo-button-size",displayName:"Size",editorType:a.range,presets:r.lumoSize,icon:"square"},t.paddingInline]}]};export{u as default}; 2 | -------------------------------------------------------------------------------- /interceptor-filter-demo/src/main/java/com/himanshu/interceptorfilterdemo/config/TestConfig.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.interceptorfilterdemo.config; 2 | 3 | import com.himanshu.interceptorfilterdemo.interceptor.TestInterceptor; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; 6 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 7 | 8 | @Configuration 9 | public class TestConfig implements WebMvcConfigurer { 10 | 11 | TestInterceptor testInterceptor; 12 | TestConfig(TestInterceptor testInterceptor) { 13 | this.testInterceptor = testInterceptor; 14 | } 15 | 16 | public void addInterceptors(InterceptorRegistry registry) { 17 | registry.addInterceptor(testInterceptor); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /config-server-client/src/main/java/com/himanshu/configserverclient/controller/TestController.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.configserverclient.controller; 2 | 3 | import org.springframework.beans.factory.annotation.Value; 4 | import org.springframework.web.bind.annotation.GetMapping; 5 | import org.springframework.web.bind.annotation.RestController; 6 | 7 | @RestController 8 | public class TestController { 9 | 10 | /** 11 | * Value will be injected from configuration parameter provided in config-server 12 | */ 13 | @Value("${msg}") 14 | private String message; 15 | 16 | /** 17 | * Method handle get request and return a configuration value 18 | * 19 | * @return String 20 | */ 21 | @GetMapping("/get-method") 22 | public String getRequestHandler() { 23 | return message; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /config-server-client/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'org.springframework.boot' version '2.6.2' 3 | id 'io.spring.dependency-management' version '1.0.11.RELEASE' 4 | id 'java' 5 | } 6 | 7 | group = 'com.himanshu' 8 | version = '0.0.1-SNAPSHOT' 9 | sourceCompatibility = '17' 10 | 11 | repositories { 12 | mavenCentral() 13 | } 14 | 15 | ext { 16 | set('springCloudVersion', "2021.0.0") 17 | } 18 | 19 | dependencies { 20 | implementation 'org.springframework.cloud:spring-cloud-starter-config' 21 | implementation 'org.springframework.boot:spring-boot-starter-web' 22 | testImplementation 'org.springframework.boot:spring-boot-starter-test' 23 | } 24 | 25 | dependencyManagement { 26 | imports { 27 | mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}" 28 | } 29 | } 30 | 31 | test { 32 | useJUnitPlatform() 33 | } 34 | -------------------------------------------------------------------------------- /spring-security-auth/src/main/java/com/himanshu/springsecurityauth/controller/AppController.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springsecurityauth.controller; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | @RestController 7 | public class AppController { 8 | 9 | @GetMapping("/hello") 10 | public String hello() { 11 | return "Hello admin"; 12 | } 13 | 14 | @GetMapping("/hi") 15 | public String hi() { 16 | return "Hi consultant"; 17 | } 18 | 19 | @GetMapping("/other") 20 | public String other() { 21 | return "Other endpoint accessible after authentication"; 22 | } 23 | 24 | @GetMapping("/img_783") 25 | public String staticImage() { 26 | return "Static image served"; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /spring-auth-server/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.output.ansi.enabled=always 2 | 3 | spring.security.oauth2.authorizationserver.client.client-1.registration.client-id=admin-client 4 | spring.security.oauth2.authorizationserver.client.client-1.registration.client-secret={bcrypt}$2a$10$HDSjqv0./y95bhQ.u7clxuX1ia9E0TtpbAb.D2j3qLp5AvLYPnyvS 5 | spring.security.oauth2.authorizationserver.client.client-1.registration.client-authentication-methods=client_secret_basic 6 | spring.security.oauth2.authorizationserver.client.client-1.registration.authorization-grant-types=client_credentials 7 | spring.security.oauth2.authorizationserver.client.client-1.registration.scopes=user.read,user.write 8 | 9 | logging.level.org.springframework.security=trace 10 | spring.security.oauth2.authorizationserver.client.client-1.token.access-token-time-to-live=120s 11 | -------------------------------------------------------------------------------- /eureka-server-client/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'org.springframework.boot' version '2.6.2' 3 | id 'io.spring.dependency-management' version '1.0.11.RELEASE' 4 | id 'java' 5 | } 6 | 7 | group = 'com.himanshu' 8 | version = '0.0.1-SNAPSHOT' 9 | sourceCompatibility = '17' 10 | 11 | repositories { 12 | mavenCentral() 13 | } 14 | 15 | ext { 16 | set('springCloudVersion', "2021.0.0") 17 | } 18 | 19 | dependencies { 20 | implementation 'org.springframework.boot:spring-boot-starter-web' 21 | implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' 22 | testImplementation 'org.springframework.boot:spring-boot-starter-test' 23 | } 24 | 25 | dependencyManagement { 26 | imports { 27 | mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}" 28 | } 29 | } 30 | 31 | test { 32 | useJUnitPlatform() 33 | } 34 | -------------------------------------------------------------------------------- /relational-db/src/main/java/com/himanshu/relationaldb/service/SchoolService.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.relationaldb.service; 2 | 3 | import com.himanshu.relationaldb.entity.School; 4 | import com.himanshu.relationaldb.entity.Student; 5 | import com.himanshu.relationaldb.repository.SchoolRepository; 6 | import com.himanshu.relationaldb.repository.StudentRepository; 7 | import jakarta.transaction.Transactional; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Service; 10 | 11 | @Service 12 | public class SchoolService { 13 | 14 | @Autowired 15 | SchoolRepository schoolRepository; 16 | 17 | public void saveSchool(School school) { 18 | schoolRepository.save(school); 19 | } 20 | 21 | public School getSchool(Long id) { 22 | return schoolRepository.findById(id).orElse(new School()); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /circuit-breaker-client/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'org.springframework.boot' version '2.6.2' 3 | id 'io.spring.dependency-management' version '1.0.11.RELEASE' 4 | id 'java' 5 | } 6 | 7 | group = 'com.himanshu' 8 | version = '0.0.1-SNAPSHOT' 9 | sourceCompatibility = '17' 10 | 11 | repositories { 12 | mavenCentral() 13 | } 14 | 15 | ext { 16 | set('springCloudVersion', "2021.0.0") 17 | } 18 | 19 | dependencies { 20 | implementation 'org.springframework.boot:spring-boot-starter-web' 21 | implementation 'org.springframework.cloud:spring-cloud-starter-circuitbreaker-resilience4j' 22 | testImplementation 'org.springframework.boot:spring-boot-starter-test' 23 | } 24 | 25 | dependencyManagement { 26 | imports { 27 | mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}" 28 | } 29 | } 30 | 31 | test { 32 | useJUnitPlatform() 33 | } 34 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-dialog-53253a08.js: -------------------------------------------------------------------------------- 1 | import{a,c as e}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-dialog",displayName:"Dialog",elements:[{selector:"vaadin-dialog-overlay::part(backdrop)",displayName:"Modality curtain (backdrop)",properties:a},{selector:"vaadin-dialog-overlay::part(overlay)",displayName:"Dialog surface",properties:a},{selector:"vaadin-dialog-overlay::part(header)",displayName:"Header",properties:a},{selector:"vaadin-dialog-overlay::part(title)",displayName:"Title",properties:e},{selector:"vaadin-dialog-overlay::part(content)",displayName:"Content",properties:a},{selector:"vaadin-dialog-overlay::part(footer)",displayName:"Footer",properties:a}]};export{d as default}; 2 | -------------------------------------------------------------------------------- /reactive-web/src/main/java/com/himanshu/reactiveweb/domain/Book.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.reactiveweb.domain; 2 | 3 | 4 | import lombok.AllArgsConstructor; 5 | import lombok.Builder; 6 | import lombok.Data; 7 | import lombok.NoArgsConstructor; 8 | import org.springframework.data.annotation.CreatedDate; 9 | import org.springframework.data.annotation.Id; 10 | import org.springframework.data.annotation.LastModifiedDate; 11 | 12 | import java.time.LocalDateTime; 13 | 14 | @Data 15 | @Builder 16 | @AllArgsConstructor 17 | @NoArgsConstructor 18 | public class Book { 19 | 20 | @Id 21 | private Integer id; 22 | private String title; 23 | private String author; 24 | private String publisher; 25 | private String isbn; 26 | private String genre; 27 | @CreatedDate 28 | private LocalDateTime createdDate; 29 | @LastModifiedDate 30 | private LocalDateTime updatedDate; 31 | } 32 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/shim.d.ts: -------------------------------------------------------------------------------- 1 | import { LitElement } from 'lit'; 2 | /** 3 | * Blocks interaction with all elements on the page. Forwards mouse and key events as custom shim-* events. 4 | */ 5 | export declare class Shim extends LitElement { 6 | highlighted?: HTMLElement; 7 | static shadowRootOptions: { 8 | delegatesFocus: boolean; 9 | mode: ShadowRootMode; 10 | slotAssignment?: SlotAssignmentMode | undefined; 11 | customElements?: CustomElementRegistry | undefined; 12 | registry?: CustomElementRegistry | undefined; 13 | }; 14 | static styles: import("lit").CSSResult[]; 15 | render(): import("lit").TemplateResult<1>; 16 | onClick(e: MouseEvent): void; 17 | onMouseMove(e: MouseEvent): void; 18 | onKeyDown(e: KeyboardEvent): void; 19 | getTargetElement(e: MouseEvent): HTMLElement; 20 | } 21 | -------------------------------------------------------------------------------- /grpc-server/src/main/java/com/himanshu/grpcserver/GreetingService.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.grpcserver; 2 | 3 | import helloworld.GreetingServiceGrpc; 4 | import helloworld.ResponseMessage; 5 | import helloworld.RequestMessage; 6 | import io.grpc.stub.StreamObserver; 7 | import org.lognet.springboot.grpc.GRpcService; 8 | 9 | @GRpcService 10 | public class GreetingService extends GreetingServiceGrpc.GreetingServiceImplBase{ 11 | /** 12 | * Server side method to greet user on request. 13 | * @param req 14 | * @param responseObserver 15 | */ 16 | @Override 17 | public void sayHello(RequestMessage req, StreamObserver responseObserver) { 18 | ResponseMessage reply = ResponseMessage.newBuilder() 19 | .setMessage("Hello " + req.getName() + ", from server").build(); 20 | responseObserver.onNext(reply); 21 | responseObserver.onCompleted(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /grpcmaven/src/main/java/com/himanshu/grpcmaven/GreetingService.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.grpcmaven; 2 | 3 | import helloworld.GreetingServiceGrpc; 4 | import helloworld.RequestMessage; 5 | import helloworld.ResponseMessage; 6 | import io.grpc.stub.StreamObserver; 7 | import org.lognet.springboot.grpc.GRpcService; 8 | 9 | @GRpcService 10 | public class GreetingService extends GreetingServiceGrpc.GreetingServiceImplBase{ 11 | /** 12 | * Server side method to greet user on request. 13 | * @param req 14 | * @param responseObserver 15 | */ 16 | @Override 17 | public void sayHello(RequestMessage req, StreamObserver responseObserver) { 18 | ResponseMessage reply = ResponseMessage.newBuilder() 19 | .setMessage("Hello " + req.getName() + ", from server").build(); 20 | responseObserver.onNext(reply); 21 | responseObserver.onCompleted(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /kc-gateway-reactive/src/main/resources/application.yaml: -------------------------------------------------------------------------------- 1 | server.port: 8282 2 | 3 | spring: 4 | main: 5 | web-application-type: reactive 6 | application.name: kc-gateway 7 | cloud: 8 | gateway: 9 | routes: 10 | - id: kc-gateway 11 | uri: http://localhost:8383 12 | predicates: 13 | - Path=/hello 14 | default-filters: 15 | - TokenRelay 16 | security: 17 | oauth2: 18 | resourceserver: 19 | jwt: 20 | jwk-set-uri: http://localhost:8080/realms/new-demo-realm/protocol/openid-connect/certs 21 | # oauth2.client: 22 | # registration.keycloak: 23 | # client-id: spring-client 24 | # authorization-grant-type: authorization_code 25 | # scope: openid 26 | # provider.keycloak: 27 | # issuer-uri: http://localhost:8080/realms/springrealm 28 | # user-name-attribute: springappuser 29 | -------------------------------------------------------------------------------- /spring-authorization-server/spring-resource-server/src/main/java/com/himanshuntwk/springresourceserver/config/SecurityConfig.java: -------------------------------------------------------------------------------- 1 | package com.himanshuntwk.springresourceserver.config; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.security.config.Customizer; 6 | import org.springframework.security.config.annotation.web.builders.HttpSecurity; 7 | import org.springframework.security.web.SecurityFilterChain; 8 | 9 | @Configuration 10 | public class SecurityConfig { 11 | 12 | @Bean 13 | public SecurityFilterChain securityFilterChain(HttpSecurity httpSecurity) throws Exception { 14 | httpSecurity.authorizeHttpRequests(authz -> authz.anyRequest() 15 | .authenticated()) 16 | .oauth2ResourceServer(oauth2 -> oauth2.jwt(Customizer.withDefaults())); 17 | return httpSecurity.build(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/history.d.ts: -------------------------------------------------------------------------------- 1 | import { ThemeEditorApi } from './api'; 2 | type HistoryCustomizerFn = () => void; 3 | export interface HistoryEntry { 4 | requestId: string; 5 | execute?: HistoryCustomizerFn; 6 | rollback?: HistoryCustomizerFn; 7 | } 8 | export interface ThemeEditorHistoryActions { 9 | allowUndo: boolean; 10 | allowRedo: boolean; 11 | } 12 | export declare class ThemeEditorHistory { 13 | private api; 14 | constructor(api: ThemeEditorApi); 15 | get allowUndo(): boolean; 16 | get allowRedo(): boolean; 17 | get allowedActions(): ThemeEditorHistoryActions; 18 | push(requestId: string, execute?: HistoryCustomizerFn, rollback?: HistoryCustomizerFn): ThemeEditorHistoryActions; 19 | undo(): Promise; 20 | redo(): Promise; 21 | static clear(): void; 22 | } 23 | export {}; 24 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-accordion-heading-c0acdd6d.js: -------------------------------------------------------------------------------- 1 | import{html as e}from"lit";import{t as o,s as a,i}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const p={tagName:"vaadin-accordion-heading",displayName:"Accordion Heading",description:e`You are trying to style selected heading only, if you wish to style all panel headings of given 2 | accordion please pick vaadin-accordion instead.`,notAccessibleDescription:e`If you wish to style all panel headings of current accordion please pick 3 | vaadin-accordion instead.`,elements:[{selector:"vaadin-accordion-heading",displayName:"Heading",properties:[o.textColor,o.fontSize,a.padding]},{selector:"vaadin-accordion-heading::part(toggle)",displayName:"Toggle",properties:[i.iconColor,i.iconSize]}]};export{p as default}; 4 | -------------------------------------------------------------------------------- /relational-db/src/main/java/com/himanshu/relationaldb/service/StudentService.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.relationaldb.service; 2 | 3 | import com.himanshu.relationaldb.entity.Course; 4 | import com.himanshu.relationaldb.entity.Student; 5 | import com.himanshu.relationaldb.repository.CourseRepository; 6 | import com.himanshu.relationaldb.repository.StudentRepository; 7 | import jakarta.transaction.Transactional; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Service; 10 | 11 | @Service 12 | public class StudentService { 13 | 14 | @Autowired 15 | StudentRepository studentRepository; 16 | 17 | public void saveStudent(Student student) { 18 | studentRepository.save(student); 19 | } 20 | 21 | @Transactional 22 | public Student getStudent(Long id) { 23 | Student student = studentRepository.findById(id).orElse(new Student()); 24 | return student; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-crud-8d161a22.js: -------------------------------------------------------------------------------- 1 | import{s as r,i as o}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const n={tagName:"vaadin-crud",displayName:"CRUD",elements:[{selector:"vaadin-crud",displayName:"Root element",properties:[r.borderColor,r.borderWidth]},{selector:"vaadin-crud::part(toolbar)",displayName:"Toolbar below grid",properties:[r.backgroundColor,r.borderColor,r.borderWidth,r.padding]},{selector:"vaadin-crud::part(editor)",displayName:"Editor panel",properties:[r.backgroundColor]},{selector:"vaadin-crud vaadin-crud-edit",displayName:"Edit button in grid",properties:[r.backgroundColor,r.borderColor,r.borderWidth]},{selector:"vaadin-crud vaadin-crud-edit::part(icon)::before",displayName:"Edit button in grid icon",properties:[o.iconColor,o.iconSize]}]};export{n as default}; 2 | -------------------------------------------------------------------------------- /relational-db/src/main/java/com/himanshu/relationaldb/entity/Student.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.relationaldb.entity; 2 | 3 | import com.fasterxml.jackson.annotation.JsonBackReference; 4 | import com.fasterxml.jackson.annotation.JsonManagedReference; 5 | import jakarta.persistence.*; 6 | import lombok.Data; 7 | 8 | import java.util.List; 9 | 10 | @Data 11 | @Entity 12 | public class Student { 13 | 14 | @Id 15 | @GeneratedValue 16 | private Long id; 17 | private String studentName; 18 | 19 | @JsonBackReference 20 | @ManyToOne 21 | private School school; 22 | 23 | @JsonManagedReference 24 | @ManyToMany(fetch = FetchType.EAGER) 25 | @JoinTable(name = "student_course", 26 | joinColumns = @JoinColumn(name = "student_id"), 27 | inverseJoinColumns = @JoinColumn(name = "course_id") 28 | ) 29 | private List courses; 30 | 31 | @JsonManagedReference 32 | @OneToOne 33 | private StudentAddress address; 34 | } 35 | -------------------------------------------------------------------------------- /spring-res-server/src/main/java/com/himanshu/springresserver/SpringResServerApplication.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springresserver; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity; 6 | import org.springframework.security.core.annotation.AuthenticationPrincipal; 7 | import org.springframework.security.oauth2.jwt.Jwt; 8 | import org.springframework.stereotype.Controller; 9 | import org.springframework.web.bind.annotation.GetMapping; 10 | import org.springframework.web.bind.annotation.ResponseBody; 11 | 12 | import java.util.Map; 13 | 14 | @SpringBootApplication 15 | @EnableMethodSecurity 16 | public class SpringResServerApplication { 17 | 18 | public static void main(String[] args) { 19 | SpringApplication.run(SpringResServerApplication.class, args); 20 | } 21 | 22 | } -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-tab-aaf32809.js: -------------------------------------------------------------------------------- 1 | import{t as e,s as t}from"../vaadin-dev-tools.js";import{html as a}from"lit";import"construct-style-sheets-polyfill";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const p={tagName:"vaadin-tab",displayName:"Tab",description:a`You are styling selected tab only, if you wish to style all tabs please pick 2 | vaadin-tabs instead.`,notAccessibleDescription:a`If you wish to style all tabs please pick vaadin-tabs instead.`,elements:[{selector:"vaadin-tab",displayName:"Tab item",properties:[e.textColor,e.fontSize,e.fontWeight,t.backgroundColor,t.padding]},{selector:"vaadin-tab[selected]",displayName:"Tab item (selected)",properties:[e.textColor,e.fontSize,e.fontWeight,t.backgroundColor,t.padding]},{selector:"vaadin-tab::before",displayName:"Selection indicator",properties:[t.backgroundColor]}]};export{p as default}; 3 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/component-resolver.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Resolves HTMLElement that should be considered instead of directly picked element. 3 | * 4 | * Used with overlays that have different HTMLElements visible than present in node tree. 5 | * 6 | * Resolvers cannot be added to component metadata as component metadata is dynamically imported after being picked. 7 | * 8 | * Using Polymer __dataHost property to get base Vaadin component. 9 | * 10 | * TODO: Refactor required after moving to Lit components 11 | */ 12 | declare class ComponentResolver { 13 | resolveElement(element: HTMLElement): HTMLElement; 14 | } 15 | declare class ComponentHighlightResolver { 16 | resolveElement(element: HTMLElement): HTMLElement; 17 | } 18 | export declare const componentResolver: ComponentResolver; 19 | export declare const componentHighlightResolver: ComponentHighlightResolver; 20 | export {}; 21 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/property-list.d.ts: -------------------------------------------------------------------------------- 1 | import { LitElement } from 'lit'; 2 | import { ComponentElementMetadata, ComponentMetadata } from '../metadata/model'; 3 | import { ComponentTheme } from '../model'; 4 | import './editors/checkbox-property-editor'; 5 | import './editors/text-property-editor'; 6 | import './editors/range-property-editor'; 7 | import './editors/color-property-editor'; 8 | export declare class OpenCssEvent extends CustomEvent<{ 9 | element: ComponentElementMetadata; 10 | }> { 11 | constructor(element: ComponentElementMetadata); 12 | } 13 | export declare class PropertyList extends LitElement { 14 | static get styles(): import("lit").CSSResult; 15 | metadata: ComponentMetadata; 16 | theme: ComponentTheme; 17 | render(): import("lit").TemplateResult<1>; 18 | private renderSection; 19 | private handleOpenCss; 20 | private renderPropertyEditor; 21 | } 22 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/tooltip.ts: -------------------------------------------------------------------------------- 1 | import { Tooltip } from '@vaadin/tooltip/src/vaadin-tooltip.js'; 2 | 3 | const _window = window as any; 4 | _window.Vaadin ||= {}; 5 | _window.Vaadin.Flow ||= {}; 6 | _window.Vaadin.Flow.tooltip ||= {}; 7 | 8 | Object.assign(_window.Vaadin.Flow.tooltip, { 9 | setDefaultHideDelay: (hideDelay: number) => Tooltip.setDefaultHideDelay(hideDelay), 10 | setDefaultFocusDelay: (focusDelay: number) => Tooltip.setDefaultFocusDelay(focusDelay), 11 | setDefaultHoverDelay: (hoverDelay: number) => Tooltip.setDefaultHoverDelay(hoverDelay) 12 | }); 13 | 14 | const { defaultHideDelay, defaultFocusDelay, defaultHoverDelay } = _window.Vaadin.Flow.tooltip; 15 | if (defaultHideDelay) { 16 | Tooltip.setDefaultHideDelay(defaultHideDelay); 17 | } 18 | if (defaultFocusDelay) { 19 | Tooltip.setDefaultFocusDelay(defaultFocusDelay); 20 | } 21 | if (defaultHoverDelay) { 22 | Tooltip.setDefaultHoverDelay(defaultHoverDelay); 23 | } 24 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-text-area-83627ebc.js: -------------------------------------------------------------------------------- 1 | import{inputFieldProperties as e,labelProperties as r,helperTextProperties as t,errorMessageProperties as a}from"./vaadin-text-field-0b3db014.js";import{standardButtonProperties as p}from"./vaadin-button-2511ad84.js";import"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const c={tagName:"vaadin-text-area",displayName:"Text Area",elements:[{selector:"vaadin-text-area::part(input-field)",displayName:"Input field",properties:e},{selector:"vaadin-text-area::part(label)",displayName:"Label",properties:r},{selector:"vaadin-text-area::part(helper-text)",displayName:"Helper text",properties:t},{selector:"vaadin-text-area::part(error-message)",displayName:"Error message",properties:a},{selector:"vaadin-text-area::part(clear-button)",displayName:"Clear button",properties:p}]};export{c as default}; 2 | -------------------------------------------------------------------------------- /modulith-demo/src/main/java/com/himanshu/modulith_demo/module1/exposed/TestEvent.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.modulith_demo.module1.exposed; 2 | 3 | import org.springframework.modulith.events.Externalized; 4 | 5 | @Externalized(target = "test-topic") 6 | public class TestEvent { 7 | public String getId() { 8 | return id; 9 | } 10 | 11 | public void setId(String id) { 12 | this.id = id; 13 | } 14 | 15 | public String getName() { 16 | return name; 17 | } 18 | 19 | public void setName(String name) { 20 | this.name = name; 21 | } 22 | 23 | private String id; 24 | private String name; 25 | 26 | public TestEvent(String id, String name) { 27 | this.id = id; 28 | this.name = name; 29 | } 30 | 31 | @Override 32 | public String toString() { 33 | return "TestEvent{" + 34 | "id=" + id + 35 | ", name='" + name + '\'' + 36 | '}'; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-email-field-d7a35f04.js: -------------------------------------------------------------------------------- 1 | import{inputFieldProperties as e,labelProperties as r,helperTextProperties as a,errorMessageProperties as i}from"./vaadin-text-field-0b3db014.js";import{standardButtonProperties as t}from"./vaadin-button-2511ad84.js";import"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const c={tagName:"vaadin-email-field",displayName:"Email Field",elements:[{selector:"vaadin-email-field::part(input-field)",displayName:"Input field",properties:e},{selector:"vaadin-email-field::part(label)",displayName:"Label",properties:r},{selector:"vaadin-email-field::part(helper-text)",displayName:"Helper text",properties:a},{selector:"vaadin-email-field::part(error-message)",displayName:"Error message",properties:i},{selector:"vaadin-email-field::part(clear-button)",displayName:"Clear button",properties:t}]};export{c as default}; 2 | -------------------------------------------------------------------------------- /graphql-server/src/main/java/com/himanshu/graphqlserver/datastore/PersonStore.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.graphqlserver.datastore; 2 | 3 | import com.himanshu.graphqlserver.domain.Person; 4 | import com.himanshu.graphqlserver.domain.PersonAddress; 5 | 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | public class PersonStore { 10 | 11 | static List personList = new ArrayList<>(); 12 | 13 | /** 14 | * Method to create dummy data for personList 15 | * @return 16 | */ 17 | public static List getPersonList () { 18 | if(personList.isEmpty()) { 19 | for(int i=0;i<5;i++) { 20 | PersonAddress personAddress = new PersonAddress("streetName" + i, "houseNumber" + i, "city" + i, "country" + i); 21 | Person person = new Person(i,"personName" + i, personAddress); 22 | personList.add(person); 23 | } 24 | } 25 | return personList; 26 | } 27 | 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /spring-cache-demo/src/main/java/com/himanshu/springcachedemo/service/LongRunningService.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springcachedemo.service; 2 | 3 | import org.springframework.cache.annotation.Cacheable; 4 | import org.springframework.stereotype.Service; 5 | 6 | @Service 7 | public class LongRunningService { 8 | 9 | String[] dataArray = new String[]{"Zero", "One", "Two", "Three", "Four", "Five"}; 10 | 11 | @Cacheable("data") 12 | public String longRunningMethod(int index) { 13 | try { 14 | Thread.sleep(2000); 15 | } catch (InterruptedException e) { 16 | throw new RuntimeException(e); 17 | } 18 | 19 | return dataArray[index]; 20 | } 21 | 22 | @Cacheable("data2") 23 | public String longRunningMethod2(int index) { 24 | try { 25 | Thread.sleep(2000); 26 | } catch (InterruptedException e) { 27 | throw new RuntimeException(e); 28 | } 29 | 30 | return dataArray[index]; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /spring-authorization-server/spring-oauth-server/src/main/java/com/himanshuntwk/springoauthserver/config/SecurityConfig.java: -------------------------------------------------------------------------------- 1 | package com.himanshuntwk.springoauthserver.config; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.security.core.userdetails.User; 6 | import org.springframework.security.core.userdetails.UserDetails; 7 | import org.springframework.security.core.userdetails.UserDetailsService; 8 | import org.springframework.security.provisioning.InMemoryUserDetailsManager; 9 | 10 | @Configuration 11 | public class SecurityConfig { 12 | 13 | @Bean 14 | UserDetailsService inMemoryUserDetailsManager() { 15 | var userBuilder = User.builder(); 16 | UserDetails himanshu = userBuilder.username("himanshu"). 17 | password("{bcrypt}$2a$10$Smgk4iacoRi6vHRxFUf47OIJferGMqKSG37yXRXHcVj3HkA7LU8n2").roles("USER", "ADMIN").build(); 18 | return new InMemoryUserDetailsManager(himanshu); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /spring-keycloak/src/main/java/com/himanshu/springkeycloak/config/SecurityConfig.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.springkeycloak.config; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.security.config.annotation.web.builders.HttpSecurity; 6 | import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; 7 | import org.springframework.security.web.SecurityFilterChain; 8 | 9 | import static org.springframework.security.config.Customizer.withDefaults; 10 | 11 | @Configuration 12 | @EnableWebSecurity 13 | public class SecurityConfig { 14 | 15 | @Bean 16 | public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { 17 | return http 18 | .authorizeHttpRequests(authorize -> authorize 19 | .anyRequest().authenticated() 20 | ) 21 | .oauth2ResourceServer(oauth2 -> oauth2 22 | .jwt(withDefaults()) 23 | ).build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-tabs-d9a5e24e.js: -------------------------------------------------------------------------------- 1 | import{s as a,t as e,i as t}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-tabs",displayName:"Tabs",elements:[{selector:"vaadin-tabs",displayName:"Tabs",properties:[a.padding]},{selector:"vaadin-tabs vaadin-tab",displayName:"Tab item",properties:[e.textColor,e.fontSize,e.fontWeight,a.backgroundColor,a.padding]},{selector:"vaadin-tabs > vaadin-tab[selected]",displayName:"Tab item (selected)",properties:[e.textColor,e.fontSize,e.fontWeight,a.backgroundColor,a.padding]},{selector:"vaadin-tabs > vaadin-tab::before",displayName:"Selection indicator",properties:[a.backgroundColor]},{selector:"vaadin-tabs::part(back-button)",displayName:"Back button",properties:[t.iconColor,t.iconSize]},{selector:"vaadin-tabs::part(forward-button)",displayName:"Forward button",properties:[t.iconColor,t.iconSize]}]};export{d as default}; 2 | -------------------------------------------------------------------------------- /reactive-client/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | wrapperVersion=3.3.1 18 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip 19 | -------------------------------------------------------------------------------- /hypermedia-rest/src/main/java/com/himanshu/hypermediarest/domain/User.java: -------------------------------------------------------------------------------- 1 | package com.himanshu.hypermediarest.domain; 2 | 3 | import org.springframework.hateoas.RepresentationModel; 4 | 5 | public class User extends RepresentationModel { 6 | 7 | private Integer userId; 8 | private String firstName; 9 | private String lastName; 10 | 11 | public User(Integer userId, String firstName, String lastName) { 12 | this.userId = userId; 13 | this.firstName = firstName; 14 | this.lastName = lastName; 15 | } 16 | 17 | public Integer getUserId() { 18 | return userId; 19 | } 20 | 21 | public void setUserId(Integer userId) { 22 | this.userId = userId; 23 | } 24 | 25 | public String getFirstName() { 26 | return firstName; 27 | } 28 | 29 | public void setFirstName(String firstName) { 30 | this.firstName = firstName; 31 | } 32 | 33 | public String getLastName() { 34 | return lastName; 35 | } 36 | 37 | public void setLastName(String lastName) { 38 | this.lastName = lastName; 39 | } 40 | 41 | 42 | 43 | } 44 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-big-decimal-field-e51def24.js: -------------------------------------------------------------------------------- 1 | import{inputFieldProperties as e,labelProperties as i,helperTextProperties as r,errorMessageProperties as a}from"./vaadin-text-field-0b3db014.js";import{standardButtonProperties as t}from"./vaadin-button-2511ad84.js";import"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const g={tagName:"vaadin-big-decimal-field",displayName:"BigDecimal Field",elements:[{selector:"vaadin-big-decimal-field::part(input-field)",displayName:"Input field",properties:e},{selector:"vaadin-big-decimal-field::part(label)",displayName:"Label",properties:i},{selector:"vaadin-big-decimal-field::part(helper-text)",displayName:"Helper text",properties:r},{selector:"vaadin-big-decimal-field::part(error-message)",displayName:"Error message",properties:a},{selector:"vaadin-big-decimal-field::part(clear-button)",displayName:"Clear button",properties:t}]};export{g as default}; 2 | -------------------------------------------------------------------------------- /phone-book/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-rich-text-editor-8cd892f2.js: -------------------------------------------------------------------------------- 1 | import{s as r,t as o}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const l={tagName:"vaadin-rich-text-editor",displayName:"Rich Text Editor",elements:[{selector:"vaadin-rich-text-editor",displayName:"Editor",properties:[r.backgroundColor,r.borderRadius,r.borderWidth,r.borderColor,r.padding]},{selector:"vaadin-rich-text-editor::part(toolbar)",displayName:"Toolbar",properties:[r.backgroundColor,r.borderRadius,r.borderWidth,r.borderColor,r.padding]},{selector:"vaadin-rich-text-editor::part(toolbar-button)",displayName:"Toolbar Buttons",properties:[{...o.textColor,displayName:"Color"},{...o.textColor,displayName:"Highlight Color",propertyName:"--lumo-primary-color"}]},{selector:"vaadin-rich-text-editor::part(content)",displayName:"Content",properties:[r.backgroundColor,r.borderRadius,r.borderWidth,r.borderColor,r.padding]}]};export{l as default}; 2 | -------------------------------------------------------------------------------- /kc-gateway/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | wrapperVersion=3.3.2 18 | distributionType=only-script 19 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip 20 | --------------------------------------------------------------------------------