├── employee-manager ├── keploy │ ├── .gitignore │ └── test-set-0 │ │ └── tests │ │ └── test-2.yaml ├── img │ ├── test-cases.png │ ├── test-noise.png │ ├── keploy-test-docker.png │ ├── keploy-record-docker.png │ ├── Keploy-test-docker-compose.png │ └── Keploy-record-docker-compose.png ├── src │ ├── main │ │ ├── resources │ │ │ ├── Video.png │ │ │ ├── test-cases.png │ │ │ ├── test-runs-fail.png │ │ │ ├── Edit-configurations.png │ │ │ ├── Run_Configuration.png │ │ │ ├── test-runs-success.png │ │ │ ├── data.sql │ │ │ └── application.properties │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── demo │ │ │ ├── repository │ │ │ └── EmployeeRepository.java │ │ │ ├── exception │ │ │ ├── ResourceNotFoundException.java │ │ │ ├── ErrorDetails.java │ │ │ └── GlobalExceptionHandler.java │ │ │ ├── SamplesJavaApplication.java │ │ │ └── model │ │ │ └── Employee.java │ └── test │ │ └── resources │ │ └── application.properties ├── Dockerfile └── docker-compose.yaml ├── spring-petclinic ├── spring-petclinic-angular │ ├── src │ │ ├── assets │ │ │ ├── .gitkeep │ │ │ ├── images │ │ │ │ ├── pets.png │ │ │ │ ├── angular.png │ │ │ │ ├── favicon.png │ │ │ │ ├── platform-bg.png │ │ │ │ ├── spring-logo-dataflow.png │ │ │ │ ├── spring-pivotal-logo.png │ │ │ │ └── spring-logo-dataflow-mobile.png │ │ │ ├── fonts │ │ │ │ ├── montserrat-webfont.eot │ │ │ │ ├── montserrat-webfont.ttf │ │ │ │ ├── montserrat-webfont.woff │ │ │ │ ├── varela_round-webfont.eot │ │ │ │ ├── varela_round-webfont.ttf │ │ │ │ ├── varela_round-webfont.woff │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ └── less │ │ │ │ └── responsive.less │ │ ├── app │ │ │ ├── pettypes │ │ │ │ ├── pettype-add │ │ │ │ │ ├── pettype-add.component.css │ │ │ │ │ └── pettype-add.component.ts │ │ │ │ ├── pettype-edit │ │ │ │ │ └── pettype-edit.component.css │ │ │ │ ├── pettype-list │ │ │ │ │ └── pettype-list.component.css │ │ │ │ ├── pettype.ts │ │ │ │ └── pettypes-routing.module.ts │ │ │ ├── specialties │ │ │ │ ├── specialty-add │ │ │ │ │ ├── specialty-add.component.css │ │ │ │ │ └── specialty-add.component.html │ │ │ │ ├── specialty-edit │ │ │ │ │ └── specialty-edit.component.css │ │ │ │ ├── specialty-list │ │ │ │ │ └── specialty-list.component.css │ │ │ │ ├── specialty.ts │ │ │ │ └── spec-resolver.ts │ │ │ ├── testing │ │ │ │ ├── testing.module.ts │ │ │ │ └── dummy.component.ts │ │ │ ├── pets │ │ │ │ ├── pet-add │ │ │ │ │ └── pet-add.component.css │ │ │ │ ├── pet-edit │ │ │ │ │ └── pet-edit.component.css │ │ │ │ ├── pet-list │ │ │ │ │ └── pet-list.component.css │ │ │ │ ├── pet.ts │ │ │ │ └── pet.service.spec.ts │ │ │ ├── vets │ │ │ │ ├── vet-add │ │ │ │ │ └── vet-add.component.css │ │ │ │ ├── vet-edit │ │ │ │ │ └── vet-edit.component.css │ │ │ │ ├── vet-list │ │ │ │ │ └── vet-list.component.css │ │ │ │ ├── vet.ts │ │ │ │ ├── vet-resolver.ts │ │ │ │ └── vet.service.spec.ts │ │ │ ├── owners │ │ │ │ ├── owner-add │ │ │ │ │ └── owner-add.component.css │ │ │ │ ├── owner-edit │ │ │ │ │ └── owner-edit.component.css │ │ │ │ ├── owner-detail │ │ │ │ │ └── owner-detail.component.css │ │ │ │ ├── owner-list │ │ │ │ │ └── owner-list.component.css │ │ │ │ └── owner.ts │ │ │ ├── visits │ │ │ │ ├── visit-add │ │ │ │ │ └── visit-add.component.css │ │ │ │ ├── visit-edit │ │ │ │ │ └── visit-edit.component.css │ │ │ │ ├── visit-list │ │ │ │ │ ├── visit-list.component.css │ │ │ │ │ └── visit-list.component.html │ │ │ │ ├── visit.ts │ │ │ │ ├── visits-routing.module.ts │ │ │ │ └── visit.service.spec.ts │ │ │ ├── parts │ │ │ │ ├── page-not-found │ │ │ │ │ ├── page-not-found.component.css │ │ │ │ │ ├── page-not-found.component.html │ │ │ │ │ └── page-not-found.component.ts │ │ │ │ ├── welcome │ │ │ │ │ ├── welcome.component.html │ │ │ │ │ ├── welcome.component.ts │ │ │ │ │ └── welcome.component.css │ │ │ │ └── parts.module.ts │ │ │ ├── app.component.ts │ │ │ ├── app.component.css │ │ │ └── app-routing.module.ts │ │ ├── favicon.ico │ │ ├── tsconfig.app.json │ │ ├── tsconfig.spec.json │ │ ├── test.ts │ │ ├── environments │ │ │ ├── environment.prod.ts │ │ │ └── environment.ts │ │ ├── styles.css │ │ ├── typings.d.ts │ │ ├── index.html │ │ └── main.ts │ ├── .dockerignore │ ├── docs │ │ ├── fonts │ │ │ ├── ionicons.eot │ │ │ ├── ionicons.ttf │ │ │ ├── ionicons.woff │ │ │ ├── ionicons.woff2 │ │ │ ├── roboto-v15-latin-300.eot │ │ │ ├── roboto-v15-latin-300.ttf │ │ │ ├── roboto-v15-latin-300.woff │ │ │ ├── roboto-v15-latin-300.woff2 │ │ │ ├── roboto-v15-latin-700.eot │ │ │ ├── roboto-v15-latin-700.ttf │ │ │ ├── roboto-v15-latin-700.woff │ │ │ ├── roboto-v15-latin-700.woff2 │ │ │ ├── roboto-v15-latin-regular.eot │ │ │ ├── roboto-v15-latin-regular.ttf │ │ │ ├── roboto-v15-latin-regular.woff │ │ │ └── roboto-v15-latin-regular.woff2 │ │ ├── images │ │ │ ├── favicon.ico │ │ │ ├── compodoc-vectorise.png │ │ │ ├── compodoc-vectorise-inverted.png │ │ │ └── coverage-badge-documentation.svg │ │ ├── styles │ │ │ ├── style.css │ │ │ ├── tablesort.css │ │ │ ├── original.css │ │ │ ├── reset.css │ │ │ ├── stripe.css │ │ │ └── laravel.css │ │ └── js │ │ │ ├── compodoc.js │ │ │ ├── libs │ │ │ ├── tablesort.number.min.js │ │ │ ├── EventDispatcher.js │ │ │ ├── custom-elements-es5-adapter.js │ │ │ └── innersvg.js │ │ │ └── tabs.js │ ├── .editorconfig │ ├── e2e │ │ ├── tsconfig.e2e.json │ │ ├── .eslintrc.json │ │ ├── app.po.ts │ │ └── app.e2e-spec.ts │ ├── tsconfig.json │ ├── .gitignore │ ├── protractor.conf.js │ ├── Dockerfile │ └── karma.conf.js └── spring-petclinic-rest │ ├── keploy │ ├── .gitignore │ └── test-set-0 │ │ └── config.yaml │ ├── petclinic-ermodel.png │ ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties │ ├── src │ ├── main │ │ ├── resources │ │ │ ├── messages │ │ │ │ ├── messages_en.properties │ │ │ │ ├── messages_de.properties │ │ │ │ └── messages.properties │ │ │ ├── application-hsqldb.properties │ │ │ ├── logback.xml │ │ │ ├── application-mysql.properties │ │ │ ├── application-postgresql.properties │ │ │ ├── db │ │ │ │ ├── mysql │ │ │ │ │ └── petclinic_db_setup_mysql.txt │ │ │ │ └── postgresql │ │ │ │ │ └── petclinic_db_setup_postgresql.txt │ │ │ └── application.properties │ │ └── java │ │ │ └── org │ │ │ └── springframework │ │ │ └── samples │ │ │ └── petclinic │ │ │ ├── rest │ │ │ └── package-info.java │ │ │ ├── model │ │ │ ├── package-info.java │ │ │ ├── PetType.java │ │ │ ├── Role.java │ │ │ └── Specialty.java │ │ │ ├── repository │ │ │ ├── jdbc │ │ │ │ ├── package-info.java │ │ │ │ └── JdbcPet.java │ │ │ ├── jpa │ │ │ │ ├── package-info.java │ │ │ │ └── JpaUserRepositoryImpl.java │ │ │ ├── UserRepository.java │ │ │ ├── springdatajpa │ │ │ │ ├── SpringDataUserRepository.java │ │ │ │ ├── PetRepositoryOverride.java │ │ │ │ ├── VisitRepositoryOverride.java │ │ │ │ ├── PetTypeRepositoryOverride.java │ │ │ │ ├── SpecialtyRepositoryOverride.java │ │ │ │ ├── SpringDataPetTypeRepository.java │ │ │ │ ├── SpringDataSpecialtyRepository.java │ │ │ │ ├── SpringDataVetRepository.java │ │ │ │ └── SpringDataVisitRepository.java │ │ │ ├── PetTypeRepository.java │ │ │ └── SpecialtyRepository.java │ │ │ ├── service │ │ │ ├── UserService.java │ │ │ └── UserServiceImpl.java │ │ │ ├── security │ │ │ ├── Roles.java │ │ │ └── DisableSecurityConfig.java │ │ │ ├── PetClinicApplication.java │ │ │ └── mapper │ │ │ ├── VetMapper.java │ │ │ ├── SpecialtyMapper.java │ │ │ ├── PetTypeMapper.java │ │ │ ├── VisitMapper.java │ │ │ ├── OwnerMapper.java │ │ │ ├── UserMapper.java │ │ │ └── PetMapper.java │ └── test │ │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── samples │ │ │ └── petclinic │ │ │ ├── service │ │ │ ├── userService │ │ │ │ ├── UserServiceJpaTests.java │ │ │ │ ├── UserServiceJdbcTests.java │ │ │ │ ├── UserServiceSpringDataJpaTests.java │ │ │ │ └── AbstractUserServiceTests.java │ │ │ └── clinicService │ │ │ │ ├── ApplicationTestConfig.java │ │ │ │ ├── ClinicServiceSpringDataJpaTests.java │ │ │ │ ├── ClinicServiceJpaTests.java │ │ │ │ └── ClinicServiceJdbcTests.java │ │ │ └── SpringConfigTests.java │ │ └── resources │ │ └── application.properties │ ├── .gitignore │ ├── .editorconfig │ ├── Dockerfile │ ├── docker-compose.yaml │ └── docker-compose-tmp.yaml ├── spring-boot-xml └── naive-spring-boot │ ├── keploy │ ├── .gitignore │ └── test-set-1 │ │ └── tests │ │ ├── test-1.yaml │ │ └── test-2.yaml │ ├── .gitattributes │ ├── src │ ├── main │ │ ├── resources │ │ │ └── application.properties │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── XML │ │ │ ├── XmlApplication.java │ │ │ └── entities │ │ │ ├── People.java │ │ │ ├── User.java │ │ │ └── UserList.java │ └── test │ │ └── java │ │ └── com │ │ └── example │ │ └── XML │ │ └── XmlApplicationTests.java │ ├── .gitignore │ ├── .mvn │ └── wrapper │ │ └── maven-wrapper.properties │ └── README.md ├── spring-mysql-redis ├── .gitignore ├── src │ └── main │ │ ├── java │ │ └── org │ │ │ └── example │ │ │ └── todo │ │ │ ├── repository │ │ │ └── TodoRepository.java │ │ │ ├── TodoApplication.java │ │ │ ├── model │ │ │ └── Todo.java │ │ │ └── service │ │ │ └── TodoService.java │ │ └── resources │ │ └── application.properties └── keploy │ └── test-set-0 │ └── tests │ ├── test-5.yaml │ ├── test-6.yaml │ └── test-7.yaml ├── spring-boot-mongo ├── src │ ├── main │ │ ├── resources │ │ │ └── application.properties │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── potionsapi │ │ │ ├── repository │ │ │ └── PotionRepository.java │ │ │ ├── PotionsApiApplication.java │ │ │ ├── service │ │ │ └── PotionService.java │ │ │ └── exception │ │ │ └── ResourceNotFoundException.java │ └── test │ │ └── java │ │ └── com │ │ └── example │ │ └── potionsapi │ │ └── PotionsApiApplicationTests.java ├── docker-compose.yml ├── Dockerfile └── keploy │ └── test-set-0 │ └── tests │ ├── test-4.yaml │ ├── test-1.yaml │ └── test-3.yaml ├── user-manager ├── img │ └── test-cases.png ├── src │ └── main │ │ ├── resources │ │ └── application.yaml │ │ └── java │ │ └── com │ │ └── example │ │ └── user │ │ ├── repository │ │ └── UserRepository.java │ │ ├── SamplesMongoDBApplication.java │ │ ├── model │ │ └── User.java │ │ ├── exception │ │ ├── ResourceNotFoundException.java │ │ ├── ErrorDetails.java │ │ └── GlobalExceptionHandler.java │ │ └── controller │ │ └── UserController.java ├── docker-compose.yaml └── keploy │ └── test-set-0 │ └── tests │ └── test-2.yaml ├── spring-boot-postgres-graphql ├── postgres_demo_docker │ ├── init.sql │ └── Dockerfile ├── src │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── keploy │ │ │ └── springbootpostgresgraphql │ │ │ └── SpringBootPostgresGraphqlApplicationTests.java │ └── main │ │ ├── resources │ │ ├── graphql │ │ │ └── schema.graphqls │ │ └── application.properties │ │ └── java │ │ └── com │ │ └── keploy │ │ └── springbootpostgresgraphql │ │ ├── SpringBootPostgresGraphqlApplication.java │ │ ├── repository │ │ ├── BookRepository.java │ │ └── AuthorRepository.java │ │ ├── entity │ │ ├── Book.java │ │ └── Author.java │ │ └── controller │ │ └── BookController.java └── .gitignore ├── .github ├── ISSUE_TEMPLATE │ ├── config.yml │ └── --feature-request.yaml ├── workflows │ └── blank.yml └── License-Apache_2.0-blue.svg ├── SECURITY.md └── Contributing ├── How-To-Do-Continuous-Integration.md └── How-To-Create-a-Repository.md /employee-manager/keploy/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | /reports/ 3 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spring-boot-xml/naive-spring-boot/keploy/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | /reports/ 3 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /spring-mysql-redis/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | /.idea/ 3 | /target/ 4 | /keploy/reports/ -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/keploy/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | /reports/ 3 | -------------------------------------------------------------------------------- /spring-boot-xml/naive-spring-boot/.gitattributes: -------------------------------------------------------------------------------- 1 | /mvnw text eol=lf 2 | *.cmd text eol=crlf 3 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/pettypes/pettype-add/pettype-add.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/pettypes/pettype-edit/pettype-edit.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/pettypes/pettype-list/pettype-list.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/specialties/specialty-add/specialty-add.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spring-boot-xml/naive-spring-boot/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.application.name=XML 2 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/specialties/specialty-edit/specialty-edit.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spring-boot-mongo/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.data.mongodb.uri=mongodb://localhost:27017/Keploy -------------------------------------------------------------------------------- /user-manager/img/test-cases.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/user-manager/img/test-cases.png -------------------------------------------------------------------------------- /employee-manager/img/test-cases.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/employee-manager/img/test-cases.png -------------------------------------------------------------------------------- /employee-manager/img/test-noise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/employee-manager/img/test-noise.png -------------------------------------------------------------------------------- /employee-manager/img/keploy-test-docker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/employee-manager/img/keploy-test-docker.png -------------------------------------------------------------------------------- /employee-manager/img/keploy-record-docker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/employee-manager/img/keploy-record-docker.png -------------------------------------------------------------------------------- /employee-manager/src/main/resources/Video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/employee-manager/src/main/resources/Video.png -------------------------------------------------------------------------------- /employee-manager/img/Keploy-test-docker-compose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/employee-manager/img/Keploy-test-docker-compose.png -------------------------------------------------------------------------------- /employee-manager/src/main/resources/test-cases.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/employee-manager/src/main/resources/test-cases.png -------------------------------------------------------------------------------- /employee-manager/img/Keploy-record-docker-compose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/employee-manager/img/Keploy-record-docker-compose.png -------------------------------------------------------------------------------- /employee-manager/src/main/resources/test-runs-fail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/employee-manager/src/main/resources/test-runs-fail.png -------------------------------------------------------------------------------- /user-manager/src/main/resources/application.yaml: -------------------------------------------------------------------------------- 1 | spring: 2 | data: 3 | mongodb: 4 | host: 127.0.0.1 5 | port: 27017 6 | 7 | server: 8 | port: 8081 -------------------------------------------------------------------------------- /employee-manager/src/main/resources/Edit-configurations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/employee-manager/src/main/resources/Edit-configurations.png -------------------------------------------------------------------------------- /employee-manager/src/main/resources/Run_Configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/employee-manager/src/main/resources/Run_Configuration.png -------------------------------------------------------------------------------- /employee-manager/src/main/resources/test-runs-success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/employee-manager/src/main/resources/test-runs-success.png -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/src/favicon.ico -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/petclinic-ermodel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-rest/petclinic-ermodel.png -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/fonts/ionicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/docs/fonts/ionicons.eot -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/fonts/ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/docs/fonts/ionicons.ttf -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/fonts/ionicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/docs/fonts/ionicons.woff -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/docs/images/favicon.ico -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/fonts/ionicons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/docs/fonts/ionicons.woff2 -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/assets/images/pets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/src/assets/images/pets.png -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-rest/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/assets/images/angular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/src/assets/images/angular.png -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/assets/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/src/assets/images/favicon.png -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/resources/messages/messages_en.properties: -------------------------------------------------------------------------------- 1 | # This file is intentionally empty. Message look-ups will fall back to the default "messages.properties" file. -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/images/compodoc-vectorise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/docs/images/compodoc-vectorise.png -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/assets/images/platform-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/src/assets/images/platform-bg.png -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/fonts/roboto-v15-latin-300.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/docs/fonts/roboto-v15-latin-300.eot -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/fonts/roboto-v15-latin-300.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/docs/fonts/roboto-v15-latin-300.ttf -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/fonts/roboto-v15-latin-300.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/docs/fonts/roboto-v15-latin-300.woff -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/fonts/roboto-v15-latin-300.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/docs/fonts/roboto-v15-latin-300.woff2 -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/fonts/roboto-v15-latin-700.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/docs/fonts/roboto-v15-latin-700.eot -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/fonts/roboto-v15-latin-700.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/docs/fonts/roboto-v15-latin-700.ttf -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/fonts/roboto-v15-latin-700.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/docs/fonts/roboto-v15-latin-700.woff -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/fonts/roboto-v15-latin-700.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/docs/fonts/roboto-v15-latin-700.woff2 -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/fonts/roboto-v15-latin-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/docs/fonts/roboto-v15-latin-regular.eot -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/fonts/roboto-v15-latin-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/docs/fonts/roboto-v15-latin-regular.ttf -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/assets/fonts/montserrat-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/src/assets/fonts/montserrat-webfont.eot -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/assets/fonts/montserrat-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/src/assets/fonts/montserrat-webfont.ttf -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/fonts/roboto-v15-latin-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/docs/fonts/roboto-v15-latin-regular.woff -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/fonts/roboto-v15-latin-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/docs/fonts/roboto-v15-latin-regular.woff2 -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/assets/fonts/montserrat-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/src/assets/fonts/montserrat-webfont.woff -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/assets/fonts/varela_round-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/src/assets/fonts/varela_round-webfont.eot -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/assets/fonts/varela_round-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/src/assets/fonts/varela_round-webfont.ttf -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/assets/fonts/varela_round-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/src/assets/fonts/varela_round-webfont.woff -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/assets/images/spring-logo-dataflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/src/assets/images/spring-logo-dataflow.png -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/assets/images/spring-pivotal-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/src/assets/images/spring-pivotal-logo.png -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/images/compodoc-vectorise-inverted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/docs/images/compodoc-vectorise-inverted.png -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/resources/messages/messages_de.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-rest/src/main/resources/messages/messages_de.properties -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/assets/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/src/assets/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/assets/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/src/assets/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/assets/images/spring-logo-dataflow-mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/src/assets/images/spring-logo-dataflow-mobile.png -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/assets/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/src/assets/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/assets/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keploy/samples-java/HEAD/spring-petclinic/spring-petclinic-angular/src/assets/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /spring-boot-postgres-graphql/postgres_demo_docker/init.sql: -------------------------------------------------------------------------------- 1 | -- init.sql 2 | DO $$ 3 | BEGIN 4 | IF NOT EXISTS (SELECT 1 FROM pg_database WHERE datname = 'library_demo') THEN 5 | CREATE DATABASE library_demo; 6 | END IF; 7 | END $$; 8 | 9 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/rest/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The classes in this package represent PetClinic's REST API. 3 | */ 4 | 5 | package org.springframework.samples.petclinic.rest; -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/keploy/test-set-0/config.yaml: -------------------------------------------------------------------------------- 1 | preScript: "" 2 | postScript: "" 3 | template: {} 4 | mockRegistry: 5 | mock: 0385cbe2e76e218cbd967f6a5a90cd08151d63a95b5cb38e71a162509068637c 6 | app: spring-petclinic-rest 7 | -------------------------------------------------------------------------------- /user-manager/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "3.7" 2 | 3 | services: 4 | mongodb: 5 | image: mongo 6 | container_name: mongodb 7 | ports: 8 | - "27017:27017" 9 | # volumes: 10 | # - ./src/main/resources/data:/data/db 11 | 12 | -------------------------------------------------------------------------------- /spring-boot-postgres-graphql/postgres_demo_docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM postgres:latest 2 | 3 | ENV POSTGRES_DB=library_demo 4 | ENV POSTGRES_USER=postgres 5 | ENV POSTGRES_PASSWORD=root 6 | 7 | EXPOSE 5432 8 | 9 | COPY init.sql /docker-entrypoint-initdb.d/ 10 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/.gitignore: -------------------------------------------------------------------------------- 1 | target/* 2 | .settings/* 3 | .classpath 4 | .project 5 | .idea 6 | *.iml 7 | /target 8 | 9 | generated/ 10 | 11 | # Easier branch switching 12 | springboot-petclinic-client/ 13 | springboot-petclinic-server/ 14 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/model/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The classes in this package represent PetClinic's business layer. 3 | */ 4 | package org.springframework.samples.petclinic.model; 5 | 6 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/styles/style.css: -------------------------------------------------------------------------------- 1 | @import "./reset.css"; 2 | @import "./bootstrap.min.css"; 3 | @import "./bootstrap-card.css"; 4 | @import "./prism.css"; 5 | @import "./ionicons.min.css"; 6 | @import "./compodoc.css"; 7 | @import "./tablesort.css"; 8 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 3 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/.editorconfig: -------------------------------------------------------------------------------- 1 | # top-most EditorConfig file 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | end_of_line = lf 7 | insert_final_newline = true 8 | indent_style = space 9 | 10 | [*.{java,xml}] 11 | indent_size = 4 12 | trim_trailing_whitespace = true 13 | -------------------------------------------------------------------------------- /spring-boot-mongo/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | spring-boot-mongo: 5 | image: mongo:latest 6 | container_name: spring-boot-mongo 7 | ports: 8 | - "27017:27017" 9 | networks: 10 | - backend 11 | 12 | networks: 13 | backend: 14 | driver: bridge 15 | -------------------------------------------------------------------------------- /user-manager/src/main/java/com/example/user/repository/UserRepository.java: -------------------------------------------------------------------------------- 1 | package com.example.user.repository; 2 | 3 | import com.example.user.model.User; 4 | import org.springframework.data.mongodb.repository.MongoRepository; 5 | 6 | public interface UserRepository extends MongoRepository { 7 | } 8 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/repository/jdbc/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The classes in this package represent the JDBC implementation 3 | * of PetClinic's persistence layer. 4 | */ 5 | package org.springframework.samples.petclinic.repository.jdbc; 6 | 7 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/repository/jpa/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The classes in this package represent the JPA implementation 3 | * of PetClinic's persistence layer. 4 | */ 5 | package org.springframework.samples.petclinic.repository.jpa; 6 | 7 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/service/UserService.java: -------------------------------------------------------------------------------- 1 | package org.springframework.samples.petclinic.service; 2 | 3 | import org.springframework.samples.petclinic.model.User; 4 | 5 | public interface UserService { 6 | 7 | void saveUser(User user) ; 8 | } 9 | -------------------------------------------------------------------------------- /spring-boot-xml/naive-spring-boot/src/test/java/com/example/XML/XmlApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.example.XML; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class XmlApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "baseUrl": "./", 6 | "types": [] 7 | }, 8 | "files": [ 9 | "main.ts", 10 | "polyfills.ts" 11 | ], 12 | "include": [ 13 | "src/**/*.d.ts" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/e2e", 5 | "baseUrl": "./", 6 | "module": "commonjs", 7 | "target": "es5", 8 | "types": [ 9 | "jasmine", 10 | "jasminewd2", 11 | "node" 12 | ] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/resources/messages/messages.properties: -------------------------------------------------------------------------------- 1 | welcome=Welcome 2 | required=is required 3 | notFound=has not been found 4 | duplicate=is already in use 5 | nonNumeric=must be all numeric 6 | duplicateFormSubmission=Duplicate form submission is not allowed 7 | typeMismatch.date=invalid date 8 | typeMismatch.birthDate=invalid date 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | contact_links: 2 | - name: Help and support 3 | url: https://github.com/keploy/keploy#community-support 4 | about: Reach out to us on our Slack channel or Discourse discussions or GitHub discussions. 5 | - name: Dedicated support 6 | url: mailto:hello@keploy.io 7 | about: Write to us if you'd like dedicated support using Keploy -------------------------------------------------------------------------------- /spring-boot-mongo/src/test/java/com/example/potionsapi/PotionsApiApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.example.potionsapi; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class PotionsApiApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-mysql-redis/src/main/java/org/example/todo/repository/TodoRepository.java: -------------------------------------------------------------------------------- 1 | package org.example.todo.repository; 2 | 3 | import org.example.todo.model.Todo; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.stereotype.Repository; 6 | 7 | @Repository 8 | public interface TodoRepository extends JpaRepository { 9 | } 10 | -------------------------------------------------------------------------------- /spring-boot-mongo/src/main/java/com/example/potionsapi/repository/PotionRepository.java: -------------------------------------------------------------------------------- 1 | package com.example.potionsapi.repository; 2 | 3 | import org.springframework.data.mongodb.repository.MongoRepository; 4 | 5 | import com.example.potionsapi.model.Potion; 6 | import java.util.UUID; 7 | 8 | public interface PotionRepository extends MongoRepository < Potion, UUID > { 9 | 10 | 11 | } -------------------------------------------------------------------------------- /employee-manager/src/main/java/com/example/demo/repository/EmployeeRepository.java: -------------------------------------------------------------------------------- 1 | package com.example.demo.repository; 2 | 3 | import com.example.demo.model.Employee; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.stereotype.Repository; 6 | 7 | @Repository 8 | public interface EmployeeRepository extends JpaRepository { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/repository/UserRepository.java: -------------------------------------------------------------------------------- 1 | package org.springframework.samples.petclinic.repository; 2 | 3 | import org.springframework.dao.DataAccessException; 4 | import org.springframework.samples.petclinic.model.User; 5 | 6 | public interface UserRepository { 7 | 8 | void save(User user) throws DataAccessException; 9 | } 10 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "baseUrl": "./", 6 | "types": [ 7 | "jasmine", 8 | "node" 9 | ] 10 | }, 11 | "files": [ 12 | "test.ts", 13 | "polyfills.ts" 14 | ], 15 | "include": [ 16 | "**/*.spec.ts", 17 | "**/*.d.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /spring-boot-postgres-graphql/src/test/java/com/keploy/springbootpostgresgraphql/SpringBootPostgresGraphqlApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.keploy.springbootpostgresgraphql; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootPostgresGraphqlApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/js/compodoc.js: -------------------------------------------------------------------------------- 1 | var compodoc = { 2 | EVENTS: { 3 | READY: 'compodoc.ready', 4 | SEARCH_READY: 'compodoc.search.ready' 5 | } 6 | }; 7 | 8 | Object.assign( compodoc, EventDispatcher.prototype ); 9 | 10 | document.addEventListener('DOMContentLoaded', function() { 11 | compodoc.dispatchEvent({ 12 | type: compodoc.EVENTS.READY 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /spring-boot-postgres-graphql/src/main/resources/graphql/schema.graphqls: -------------------------------------------------------------------------------- 1 | type Query { 2 | getBookByName(name: String): Book 3 | getAllBooks: [Book] 4 | getAuthorById(id: Int): Author 5 | getAllAuthors: [Author] 6 | } 7 | 8 | type Book { 9 | id: ID 10 | name: String 11 | pageCount: Int 12 | author: Author 13 | } 14 | 15 | type Author { 16 | id: ID 17 | firstName: String 18 | lastName: String 19 | } -------------------------------------------------------------------------------- /spring-boot-xml/naive-spring-boot/src/main/java/com/example/XML/XmlApplication.java: -------------------------------------------------------------------------------- 1 | package com.example.XML; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class XmlApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(XmlApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/security/Roles.java: -------------------------------------------------------------------------------- 1 | package org.springframework.samples.petclinic.security; 2 | 3 | import org.springframework.stereotype.Component; 4 | 5 | @Component 6 | public class Roles { 7 | 8 | public final String OWNER_ADMIN = "ROLE_OWNER_ADMIN"; 9 | public final String VET_ADMIN = "ROLE_VET_ADMIN"; 10 | public final String ADMIN = "ROLE_ADMIN"; 11 | } 12 | -------------------------------------------------------------------------------- /spring-boot-mongo/src/main/java/com/example/potionsapi/PotionsApiApplication.java: -------------------------------------------------------------------------------- 1 | package com.example.potionsapi; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class PotionsApiApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(PotionsApiApplication.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /user-manager/src/main/java/com/example/user/SamplesMongoDBApplication.java: -------------------------------------------------------------------------------- 1 | package com.example.user; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SamplesMongoDBApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SamplesMongoDBApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/test/java/org/springframework/samples/petclinic/service/userService/UserServiceJpaTests.java: -------------------------------------------------------------------------------- 1 | package org.springframework.samples.petclinic.service.userService; 2 | 3 | import org.springframework.boot.test.context.SpringBootTest; 4 | import org.springframework.test.context.ActiveProfiles; 5 | 6 | @SpringBootTest 7 | @ActiveProfiles({"jpa", "hsqldb"}) 8 | class UserServiceJpaTests extends AbstractUserServiceTests { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /user-manager/src/main/java/com/example/user/model/User.java: -------------------------------------------------------------------------------- 1 | package com.example.user.model; 2 | 3 | import lombok.Data; 4 | import lombok.ToString; 5 | import lombok.experimental.Accessors; 6 | import org.springframework.data.annotation.Id; 7 | 8 | @Data 9 | @ToString 10 | @Accessors(chain = true) 11 | public class User { 12 | 13 | @Id 14 | private long id; 15 | private String name; 16 | private Integer age; 17 | private String birthday; 18 | 19 | } -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/test/java/org/springframework/samples/petclinic/SpringConfigTests.java: -------------------------------------------------------------------------------- 1 | package org.springframework.samples.petclinic; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest(classes = PetClinicApplication.class) 7 | class SpringConfigTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | // Test the Spring configuration 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/test/java/org/springframework/samples/petclinic/service/userService/UserServiceJdbcTests.java: -------------------------------------------------------------------------------- 1 | package org.springframework.samples.petclinic.service.userService; 2 | 3 | import org.springframework.boot.test.context.SpringBootTest; 4 | import org.springframework.test.context.ActiveProfiles; 5 | 6 | @SpringBootTest 7 | @ActiveProfiles({"jdbc", "hsqldb"}) 8 | class UserServiceJdbcTests extends AbstractUserServiceTests { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/test/java/org/springframework/samples/petclinic/service/clinicService/ApplicationTestConfig.java: -------------------------------------------------------------------------------- 1 | package org.springframework.samples.petclinic.service.clinicService; 2 | 3 | import org.mockito.MockitoAnnotations; 4 | import org.springframework.boot.test.context.TestConfiguration; 5 | 6 | @TestConfiguration 7 | public class ApplicationTestConfig { 8 | 9 | public ApplicationTestConfig(){ 10 | MockitoAnnotations.openMocks(this); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-mysql-redis/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # MySQL Configuration 2 | spring.datasource.url=jdbc:mysql://localhost:3306/todoapp?useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true 3 | spring.datasource.username=yourusername 4 | spring.datasource.password=yourpassword 5 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver 6 | spring.jpa.hibernate.ddl-auto=update 7 | 8 | # Redis Configuration (Remains the Same) 9 | spring.redis.host=localhost 10 | spring.redis.port=6379 11 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/test/java/org/springframework/samples/petclinic/service/userService/UserServiceSpringDataJpaTests.java: -------------------------------------------------------------------------------- 1 | package org.springframework.samples.petclinic.service.userService; 2 | 3 | import org.springframework.boot.test.context.SpringBootTest; 4 | import org.springframework.test.context.ActiveProfiles; 5 | 6 | @SpringBootTest 7 | @ActiveProfiles({"spring-data-jpa", "hsqldb"}) 8 | class UserServiceSpringDataJpaTests extends AbstractUserServiceTests { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /spring-mysql-redis/src/main/java/org/example/todo/TodoApplication.java: -------------------------------------------------------------------------------- 1 | package org.example.todo; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cache.annotation.EnableCaching; 6 | 7 | @SpringBootApplication 8 | @EnableCaching 9 | public class TodoApplication { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(TodoApplication.class, args); 13 | } 14 | } -------------------------------------------------------------------------------- /employee-manager/src/main/java/com/example/demo/exception/ResourceNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.example.demo.exception; 2 | 3 | import org.springframework.http.HttpStatus; 4 | import org.springframework.web.bind.annotation.ResponseStatus; 5 | 6 | @ResponseStatus(value = HttpStatus.NOT_FOUND) 7 | public class ResourceNotFoundException extends Exception { 8 | private static final long serialVersionUid = 1L; 9 | 10 | public ResourceNotFoundException(String message) { 11 | super(message); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /user-manager/src/main/java/com/example/user/exception/ResourceNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.example.user.exception; 2 | 3 | import org.springframework.http.HttpStatus; 4 | import org.springframework.web.bind.annotation.ResponseStatus; 5 | 6 | @ResponseStatus(value = HttpStatus.NOT_FOUND) 7 | public class ResourceNotFoundException extends RuntimeException { 8 | private static final long serialVersionUid = 1L; 9 | 10 | public ResourceNotFoundException(String message) { 11 | super(message); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/testing/testing.module.ts: -------------------------------------------------------------------------------- 1 | import {NgModule} from '@angular/core'; 2 | import {CommonModule} from '@angular/common'; 3 | import {DummyComponent} from './dummy.component'; 4 | import {RouterLinkStubDirective, RouterOutletStubComponent} from './router-stubs'; 5 | 6 | @NgModule({ 7 | imports: [ 8 | CommonModule 9 | ], 10 | declarations: [ 11 | DummyComponent, 12 | RouterLinkStubDirective, 13 | RouterOutletStubComponent 14 | ] 15 | }) 16 | export class TestingModule { } 17 | -------------------------------------------------------------------------------- /spring-boot-postgres-graphql/src/main/java/com/keploy/springbootpostgresgraphql/SpringBootPostgresGraphqlApplication.java: -------------------------------------------------------------------------------- 1 | package com.keploy.springbootpostgresgraphql; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootPostgresGraphqlApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootPostgresGraphqlApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Reporting a Vulnerability 4 | 5 | We value security for the project very highly. We encourage all users to report any vulnerabilities they discover to us. 6 | If you find a security vulnerability in the Keploy project, please report it responsibly by sending an email to hello@keploy.io 7 | 8 | At this juncture, we don't have a bug bounty program. We are a small team trying to solve a big problem. We urge you to report any vulnerabilities responsibly 9 | so that we can continue building a secure application for the entire community. -------------------------------------------------------------------------------- /employee-manager/src/main/java/com/example/demo/exception/ErrorDetails.java: -------------------------------------------------------------------------------- 1 | package com.example.demo.exception; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | 6 | import java.util.Date; 7 | 8 | @Getter 9 | @Setter 10 | public class ErrorDetails { 11 | private Date timestamp; 12 | private String message; 13 | private String details; 14 | 15 | public ErrorDetails(Date timestamp, String message, String details) { 16 | this.timestamp = timestamp; 17 | this.message = message; 18 | this.details = details; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /user-manager/src/main/java/com/example/user/exception/ErrorDetails.java: -------------------------------------------------------------------------------- 1 | package com.example.user.exception; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | 6 | import java.util.Date; 7 | 8 | @Getter 9 | @Setter 10 | public class ErrorDetails { 11 | private Date timestamp; 12 | private String message; 13 | private String details; 14 | 15 | public ErrorDetails(Date timestamp, String message, String details) { 16 | this.timestamp = timestamp; 17 | this.message = message; 18 | this.details = details; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /spring-boot-postgres-graphql/src/main/java/com/keploy/springbootpostgresgraphql/repository/BookRepository.java: -------------------------------------------------------------------------------- 1 | package com.keploy.springbootpostgresgraphql.repository; 2 | 3 | import com.keploy.springbootpostgresgraphql.entity.Book; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.stereotype.Repository; 6 | 7 | import java.util.List; 8 | 9 | @Repository 10 | public interface BookRepository extends JpaRepository { 11 | 12 | Book findBookByName(String name); 13 | 14 | List findAll(); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-postgres-graphql/src/main/java/com/keploy/springbootpostgresgraphql/repository/AuthorRepository.java: -------------------------------------------------------------------------------- 1 | package com.keploy.springbootpostgresgraphql.repository; 2 | 3 | import com.keploy.springbootpostgresgraphql.entity.Author; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.stereotype.Repository; 6 | 7 | import java.util.List; 8 | 9 | @Repository 10 | public interface AuthorRepository extends JpaRepository { 11 | 12 | Author findAuthorById(int id); 13 | 14 | List findAll(); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-mongo/src/main/java/com/example/potionsapi/service/PotionService.java: -------------------------------------------------------------------------------- 1 | package com.example.potionsapi.service; 2 | 3 | import java.util.List; 4 | import java.util.UUID; 5 | 6 | import com.example.potionsapi.model.Potion; 7 | 8 | public interface PotionService { 9 | 10 | Potion createPotion( Potion potion ); 11 | 12 | Potion updatePotion( UUID id, Potion potion ); 13 | 14 | List getAllPotion(); 15 | 16 | Potion getPotionById( UUID potionId ); 17 | 18 | // Potion getPotionByName( String potion ); 19 | 20 | void deletePotion( UUID id ); 21 | } -------------------------------------------------------------------------------- /spring-boot-xml/naive-spring-boot/.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-mysql-redis/src/main/java/org/example/todo/model/Todo.java: -------------------------------------------------------------------------------- 1 | package org.example.todo.model; 2 | 3 | import lombok.Data; 4 | 5 | import javax.persistence.*; 6 | import java.io.Serializable; 7 | 8 | @Data 9 | @Entity 10 | public class Todo implements Serializable { 11 | private static final long serialVersionUID = 1L; 12 | 13 | @Id 14 | @GeneratedValue(strategy = GenerationType.IDENTITY) 15 | private Long id; 16 | 17 | private String title; 18 | private String description; 19 | private boolean completed; 20 | 21 | // Getters and Setters 22 | } 23 | -------------------------------------------------------------------------------- /spring-boot-postgres-graphql/.gitignore: -------------------------------------------------------------------------------- 1 | .mvn/ 2 | .idea/ 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 | -------------------------------------------------------------------------------- /employee-manager/src/main/java/com/example/demo/SamplesJavaApplication.java: -------------------------------------------------------------------------------- 1 | package com.example.demo; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.context.annotation.Import; 6 | // import io.keploy.servlet.KeployMiddleware; 7 | 8 | 9 | @SpringBootApplication 10 | 11 | // @Import(KeployMiddleware.class) 12 | public class SamplesJavaApplication { 13 | public static void main(String[] args) { 14 | SpringApplication.run(SamplesJavaApplication.class, args); 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/js/libs/tablesort.number.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * tablesort v5.1.0 (2018-09-14) 3 | * http://tristen.ca/tablesort/demo/ 4 | * Copyright (c) 2018 ; Licensed MIT 5 | */ 6 | !function(){var a=function(a){return a.replace(/[^\-?0-9.]/g,"")},b=function(a,b){return a=parseFloat(a),b=parseFloat(b),a=isNaN(a)?0:a,b=isNaN(b)?0:b,a-b};Tablesort.extend("number",function(a){return a.match(/^[-+]?[£\x24Û¢´€]?\d+\s*([,\.]\d{0,2})/)||a.match(/^[-+]?\d+\s*([,\.]\d{0,2})?[£\x24Û¢´€]/)||a.match(/^[-+]?(\d)*-?([,\.]){0,1}-?(\d)+([E,e][\-+][\d]+)?%?$/)},function(c,d){return c=a(c),d=a(d),b(d,c)})}(); -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | // First, initialize the Angular testing environment. 11 | getTestBed().initTestEnvironment( 12 | BrowserDynamicTestingModule, 13 | platformBrowserDynamicTesting(), { 14 | teardown: { destroyAfterEach: false } 15 | } 16 | ); 17 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/repository/springdatajpa/SpringDataUserRepository.java: -------------------------------------------------------------------------------- 1 | package org.springframework.samples.petclinic.repository.springdatajpa; 2 | 3 | import org.springframework.context.annotation.Profile; 4 | import org.springframework.data.repository.Repository; 5 | import org.springframework.samples.petclinic.model.User; 6 | import org.springframework.samples.petclinic.repository.UserRepository; 7 | 8 | @Profile("spring-data-jpa") 9 | public interface SpringDataUserRepository extends UserRepository, Repository { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /employee-manager/Dockerfile: -------------------------------------------------------------------------------- 1 | # Use a Java 17 runtime (Debian-based, works on Apple Silicon) 2 | FROM eclipse-temurin:17-jdk 3 | 4 | # Set the working directory inside the container 5 | WORKDIR /app 6 | 7 | # Install Maven 8 | RUN apt-get update && apt-get install -y maven 9 | 10 | # Copy the current directory contents into the container at /app 11 | COPY . /app/ 12 | 13 | # Build the binary 14 | RUN mvn clean install -Dmaven.test.skip=true 15 | 16 | 17 | # Expose the port your Spring Boot app runs on 18 | EXPOSE 8080 19 | 20 | # Run the application 21 | ENTRYPOINT ["java", "-jar", "target/springbootapp-0.0.1-SNAPSHOT.jar"] 22 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/Dockerfile: -------------------------------------------------------------------------------- 1 | # Use an official OpenJDK runtime as a parent image 2 | FROM openjdk:25-bookworm 3 | 4 | # Set the working directory to /app 5 | WORKDIR /app 6 | 7 | # Install Maven 8 | RUN apt-get update && apt-get install -y maven 9 | 10 | # Copy the current directory contents into the container at /app 11 | COPY . /app/ 12 | 13 | # Build the binary 14 | RUN mvn clean install -Dmaven.test.skip=true 15 | 16 | # Expose the port the app runs on 17 | EXPOSE 9966 18 | 19 | # Run the application when the container launches 20 | 21 | CMD ["java", "-jar", "target/spring-petclinic-rest-3.0.2.jar"] 22 | -------------------------------------------------------------------------------- /employee-manager/src/main/resources/data.sql: -------------------------------------------------------------------------------- 1 | 2 | delete from employees; 3 | 4 | 5 | insert into employees 6 | values (1, 'Gourav', 'Kumar', 'gkrosx@gmail.com', 1661500330); 7 | insert into employees 8 | values (2, 'Sarthak', 'Sharma', 'ss@gmail.com', 1661500450); 9 | insert into employees 10 | values (3, 'Ritik', 'Jain', 'rj@gmail.com', 1661500810); 11 | insert into employees 12 | values (4, 'Shashank', 'Pandey', 'sp@gmail.com', 1661500960); 13 | insert into employees 14 | values (5, 'Akshit', 'Taneja', 'at@gmail.com', 1661501190); 15 | 16 | 17 | 18 | SELECT pg_catalog.setval(pg_get_serial_sequence('employees', 'id'), MAX(id)) FROM employees; 19 | -------------------------------------------------------------------------------- /spring-boot-mongo/src/main/java/com/example/potionsapi/exception/ResourceNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.example.potionsapi.exception; 2 | 3 | import org.springframework.web.bind.annotation.ResponseStatus; 4 | 5 | import java.io.Serial; 6 | 7 | @ResponseStatus 8 | public class ResourceNotFoundException extends RuntimeException { 9 | 10 | @Serial 11 | private static final long serialVersionUID = 1L; 12 | 13 | public ResourceNotFoundException(String message) { 14 | super(message); 15 | } 16 | 17 | public ResourceNotFoundException(String message, Throwable throwable) { 18 | super(message, throwable); 19 | } 20 | } -------------------------------------------------------------------------------- /spring-boot-mongo/Dockerfile: -------------------------------------------------------------------------------- 1 | # Use an official OpenJDK runtime as a parent image 2 | FROM openjdk:22-bookworm 3 | 4 | # Set the working directory to /app 5 | WORKDIR /app 6 | 7 | # Install Maven 8 | RUN apt-get update && apt-get install -y maven 9 | 10 | # Copy the current directory contents into the container at /app 11 | COPY . /app/ 12 | 13 | # Expose the port the app runs on 14 | EXPOSE 8080 15 | 16 | # Define environment variables 17 | ENV MONGODB_URI=mongodb://localhost:27017/Keploy 18 | 19 | # Run the application when the container launches 20 | # CMD ["java", "-jar", "PotionsAPI-0.0.1-SNAPSHOT.jar"] 21 | CMD ["/usr/share/maven/bin/mvn", "spring-boot:run"] 22 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/resources/application-hsqldb.properties: -------------------------------------------------------------------------------- 1 | # HSQLDB config start 2 | #---------------------------------------------------------------- 3 | 4 | spring.sql.init.schema-locations=classpath*:db/hsqldb/initDB.sql 5 | spring.sql.init.data-locations=classpath*:db/hsqldb/populateDB.sql 6 | 7 | spring.datasource.url=jdbc:hsqldb:mem:petclinic 8 | spring.datasource.username=sa 9 | spring.datasource.password= 10 | spring.jpa.database=HSQL 11 | spring.jpa.database-platform=org.hibernate.dialect.HSQLDialect 12 | spring.jpa.hibernate.ddl-auto=none 13 | #---------------------------------------------------------------- 14 | # HSQLDB config end 15 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/PetClinicApplication.java: -------------------------------------------------------------------------------- 1 | package org.springframework.samples.petclinic; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.boot.builder.SpringApplicationBuilder; 6 | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; 7 | 8 | @SpringBootApplication 9 | public class PetClinicApplication extends SpringBootServletInitializer { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(PetClinicApplication.class, args); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/test/java/org/springframework/samples/petclinic/service/clinicService/ClinicServiceSpringDataJpaTests.java: -------------------------------------------------------------------------------- 1 | package org.springframework.samples.petclinic.service.clinicService; 2 | 3 | import org.springframework.boot.test.context.SpringBootTest; 4 | import org.springframework.test.context.ActiveProfiles; 5 | 6 | /** 7 | *

Integration test using the 'Spring Data' profile. 8 | * 9 | * @author Michael Isvy 10 | * @see AbstractClinicServiceTests AbstractClinicServiceTests for more details.

11 | */ 12 | 13 | @SpringBootTest 14 | @ActiveProfiles({"spring-data-jpa", "hsqldb"}) 15 | class ClinicServiceSpringDataJpaTests extends AbstractClinicServiceTests { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/test/java/org/springframework/samples/petclinic/service/clinicService/ClinicServiceJpaTests.java: -------------------------------------------------------------------------------- 1 | package org.springframework.samples.petclinic.service.clinicService; 2 | 3 | import org.springframework.boot.test.context.SpringBootTest; 4 | import org.springframework.test.context.ActiveProfiles; 5 | 6 | /** 7 | *

Integration test using the jpa profile. 8 | * 9 | * @author Rod Johnson 10 | * @author Sam Brannen 11 | * @author Michael Isvy 12 | * @see AbstractClinicServiceTests AbstractClinicServiceTests for more details.

13 | */ 14 | 15 | @SpringBootTest 16 | @ActiveProfiles({"jpa", "hsqldb"}) 17 | class ClinicServiceJpaTests extends AbstractClinicServiceTests { 18 | 19 | } 20 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "outDir": "./dist/out-tsc", 5 | "baseUrl": "src", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "moduleResolution": "node", 9 | "emitDecoratorMetadata": true, 10 | "experimentalDecorators": true, 11 | "target": "ES2022", 12 | "typeRoots": [ 13 | "node_modules/@types" 14 | ], 15 | "lib": [ 16 | "es2017", 17 | "dom" 18 | ], 19 | "module": "es2020", 20 | "useDefineForClassFields": false 21 | }, 22 | "angularCompilerOptions": { 23 | "strictTemplates": true, 24 | "strictInputTypes": true, 25 | "strictNullInputTypes": true 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /employee-manager/src/main/java/com/example/demo/model/Employee.java: -------------------------------------------------------------------------------- 1 | package com.example.demo.model; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | 6 | import javax.persistence.*; 7 | 8 | @Entity 9 | @Getter 10 | @Setter 11 | @Table(name = "employees") 12 | public class Employee { 13 | 14 | @Id 15 | @GeneratedValue(strategy = GenerationType.IDENTITY) 16 | private long id; 17 | 18 | @Column(name = "first_name") 19 | private String firstName; 20 | @Column(name = "last_name") 21 | private String lastName; 22 | @Column(name = "email") 23 | private String email; 24 | @Column(name = "timestamp") 25 | private long timestamp; 26 | 27 | public Employee() { 28 | super(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /spring-boot-xml/naive-spring-boot/src/main/java/com/example/XML/entities/People.java: -------------------------------------------------------------------------------- 1 | package com.example.XML.entities; 2 | 3 | import jakarta.xml.bind.annotation.XmlElement; 4 | import jakarta.xml.bind.annotation.XmlRootElement; 5 | import java.util.List; 6 | 7 | @XmlRootElement(name = "People") 8 | public class People { 9 | @XmlElement(name = "UserList") 10 | private List userLists; 11 | 12 | public People() {} 13 | 14 | public People(List userLists) { 15 | this.userLists = userLists; 16 | } 17 | 18 | public List getUserLists() { 19 | return userLists; 20 | } 21 | 22 | public void setUserLists(List userLists) { 23 | this.userLists = userLists; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/mapper/VetMapper.java: -------------------------------------------------------------------------------- 1 | package org.springframework.samples.petclinic.mapper; 2 | 3 | import org.mapstruct.Mapper; 4 | import org.springframework.samples.petclinic.rest.dto.VetDto; 5 | import org.springframework.samples.petclinic.model.Vet; 6 | import org.springframework.samples.petclinic.rest.dto.VetFieldsDto; 7 | 8 | import java.util.Collection; 9 | 10 | /** 11 | * Map Vet & VetoDto using mapstruct 12 | */ 13 | @Mapper(uses = SpecialtyMapper.class) 14 | public interface VetMapper { 15 | Vet toVet(VetDto vetDto); 16 | 17 | Vet toVet(VetFieldsDto vetFieldsDto); 18 | 19 | VetDto toVetDto(Vet vet); 20 | 21 | Collection toVetDtos(Collection vets); 22 | } 23 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | # IDEs and editors 12 | /.idea 13 | .project 14 | .classpath 15 | .c9/ 16 | *.launch 17 | .settings/ 18 | *.sublime-workspace 19 | 20 | # IDE - VSCode 21 | .vscode/* 22 | !.vscode/settings.json 23 | !.vscode/tasks.json 24 | !.vscode/launch.json 25 | !.vscode/extensions.json 26 | 27 | # misc 28 | /.angular/cache 29 | /.sass-cache 30 | /connect.lock 31 | /coverage 32 | /libpeerconnection.log 33 | npm-debug.log 34 | testem.log 35 | /typings 36 | 37 | # e2e 38 | /e2e/*.js 39 | /e2e/*.map 40 | 41 | # System Files 42 | .DS_Store 43 | Thumbs.db 44 | *.iml 45 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "3.9" 2 | services: 3 | java-app: 4 | build: 5 | context: . 6 | container_name: javaApp 7 | depends_on: 8 | - mypostgres 9 | ports: 10 | - "9966:9966" 11 | networks: 12 | - keploy-network 13 | 14 | mypostgres: 15 | image: "postgres:15.2" 16 | container_name: mypostgres 17 | ports: 18 | - "5432:5432" 19 | networks: 20 | - keploy-network 21 | volumes: 22 | - ./src/main/resources/db/postgresql/initDB.sql:/docker-entrypoint-initdb.d/initDB.sql 23 | environment: 24 | POSTGRES_USER: petclinic 25 | POSTGRES_PASSWORD: petclinic 26 | POSTGRES_DB: petclinic 27 | 28 | networks: 29 | keploy-network: 30 | external: true 31 | -------------------------------------------------------------------------------- /spring-boot-postgres-graphql/src/main/java/com/keploy/springbootpostgresgraphql/entity/Book.java: -------------------------------------------------------------------------------- 1 | package com.keploy.springbootpostgresgraphql.entity; 2 | 3 | import jakarta.persistence.*; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | 8 | import java.util.ArrayList; 9 | import java.util.List; 10 | 11 | @Data 12 | @AllArgsConstructor 13 | @NoArgsConstructor 14 | @Entity 15 | @Table(name = "book") 16 | public class Book { 17 | 18 | @Id 19 | @GeneratedValue(strategy = GenerationType.IDENTITY) 20 | private int id; 21 | @Column(nullable = false) 22 | private String name; 23 | private int pageCount; 24 | @ManyToOne 25 | @JoinColumn(name = "author_id", nullable = false) 26 | private Author author; 27 | 28 | 29 | } -------------------------------------------------------------------------------- /spring-boot-postgres-graphql/src/main/java/com/keploy/springbootpostgresgraphql/entity/Author.java: -------------------------------------------------------------------------------- 1 | package com.keploy.springbootpostgresgraphql.entity; 2 | 3 | import jakarta.persistence.*; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | 8 | import java.util.List; 9 | 10 | 11 | @Data 12 | @AllArgsConstructor 13 | @NoArgsConstructor 14 | @Entity 15 | @Table(name = "author") 16 | public class Author { 17 | 18 | @Id 19 | @GeneratedValue(strategy = GenerationType.IDENTITY) 20 | private int id; 21 | @Column(nullable = false) 22 | private String firstName; 23 | @Column(nullable = false) 24 | private String lastName; 25 | @OneToMany(mappedBy = "author", cascade = CascadeType.ALL) 26 | private List books; 27 | 28 | } -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/pets/pet-add/pet-add.component.css: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/vets/vet-add/vet-add.component.css: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | true 8 | 9 | 10 | 11 | 12 | %-5level %logger{0} - %msg%n 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/owners/owner-add/owner-add.component.css: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/pets/pet-edit/pet-edit.component.css: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/pets/pet-list/pet-list.component.css: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/vets/vet-edit/vet-edit.component.css: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/vets/vet-list/vet-list.component.css: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/visits/visit-add/visit-add.component.css: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/mapper/SpecialtyMapper.java: -------------------------------------------------------------------------------- 1 | package org.springframework.samples.petclinic.mapper; 2 | 3 | import org.mapstruct.Mapper; 4 | import org.springframework.samples.petclinic.rest.dto.SpecialtyDto; 5 | import org.springframework.samples.petclinic.model.Specialty; 6 | 7 | import java.util.Collection; 8 | 9 | /** 10 | * Map Specialty & SpecialtyDto using mapstruct 11 | */ 12 | @Mapper 13 | public interface SpecialtyMapper { 14 | Specialty toSpecialty(SpecialtyDto specialtyDto); 15 | 16 | SpecialtyDto toSpecialtyDto(Specialty specialty); 17 | 18 | Collection toSpecialtyDtos(Collection specialties); 19 | 20 | Collection toSpecialtys(Collection specialties); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/owners/owner-edit/owner-edit.component.css: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/visits/visit-edit/visit-edit.component.css: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/visits/visit-list/visit-list.component.css: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/js/libs/EventDispatcher.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author mrdoob / http://mrdoob.com/ 3 | */ 4 | 5 | var EventDispatcher=function(){};Object.assign(EventDispatcher.prototype,{addEventListener:function(i,t){void 0===this._listeners&&(this._listeners={});var e=this._listeners;void 0===e[i]&&(e[i]=[]),-1===e[i].indexOf(t)&&e[i].push(t)},hasEventListener:function(i,t){if(void 0===this._listeners)return!1;var e=this._listeners;return void 0!==e[i]&&-1!==e[i].indexOf(t)},removeEventListener:function(i,t){if(void 0!==this._listeners){var e=this._listeners[i];if(void 0!==e){var s=e.indexOf(t);-1!==s&&e.splice(s,1)}}},dispatchEvent:function(i){if(void 0!==this._listeners){var t=this._listeners[i.type];if(void 0!==t){i.target=this;var e=[],s=0,n=t.length;for(s=0;s toPetTypeDtos(Collection petTypes); 24 | } 25 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/owners/owner-list/owner-list.component.css: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | #ownersByLastName 20 | { 21 | display:none; 22 | } 23 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/resources/application-postgresql.properties: -------------------------------------------------------------------------------- 1 | # uncomment for init database (first start) 2 | #spring.sql.init.mode=always 3 | #spring.sql.init.schema-locations=classpath*:db/postgresql/initDB.sql 4 | #spring.sql.init.data-locations=classpath*:db/postgresql/populateDB.sql 5 | 6 | # PostgreSQL config start 7 | #---------------------------------------------------------------- 8 | spring.datasource.url=jdbc:postgresql://mypostgres:5432/petclinic 9 | spring.datasource.username=petclinic 10 | spring.datasource.password=petclinic 11 | spring.datasource.driver-class-name=org.postgresql.Driver 12 | spring.jpa.database=POSTGRESQL 13 | spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect 14 | spring.jpa.hibernate.ddl-auto=create 15 | #---------------------------------------------------------------- 16 | # PostgreSQL config end 17 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // Protractor configuration file, see link for more information 2 | // https://github.com/angular/protractor/blob/master/lib/config.ts 3 | 4 | const { SpecReporter } = require('jasmine-spec-reporter'); 5 | 6 | exports.config = { 7 | allScriptsTimeout: 11000, 8 | specs: [ 9 | './e2e/**/*.e2e-spec.ts' 10 | ], 11 | capabilities: { 12 | 'browserName': 'chrome' 13 | }, 14 | directConnect: true, 15 | baseUrl: 'http://localhost:4200/', 16 | framework: 'jasmine', 17 | jasmineNodeOpts: { 18 | showColors: true, 19 | defaultTimeoutInterval: 30000, 20 | print: function() {} 21 | }, 22 | onPrepare() { 23 | require('ts-node').register({ 24 | project: 'e2e/tsconfig.e2e.json' 25 | }); 26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/mapper/VisitMapper.java: -------------------------------------------------------------------------------- 1 | package org.springframework.samples.petclinic.mapper; 2 | 3 | import org.mapstruct.Mapper; 4 | import org.mapstruct.Mapping; 5 | import org.springframework.samples.petclinic.rest.dto.VisitDto; 6 | import org.springframework.samples.petclinic.model.Visit; 7 | import org.springframework.samples.petclinic.rest.dto.VisitFieldsDto; 8 | 9 | import java.util.Collection; 10 | 11 | /** 12 | * Map Visit & VisitDto using mapstruct 13 | */ 14 | @Mapper(uses = PetMapper.class) 15 | public interface VisitMapper { 16 | Visit toVisit(VisitDto visitDto); 17 | 18 | Visit toVisit(VisitFieldsDto visitFieldsDto); 19 | 20 | @Mapping(source = "pet.id", target = "petId") 21 | VisitDto toVisitDto(Visit visit); 22 | 23 | Collection toVisitsDto(Collection visits); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/assets/less/responsive.less: -------------------------------------------------------------------------------- 1 | @media (max-width: 768px) { 2 | .navbar-toggle { 3 | position:absolute; 4 | z-index: 9999; 5 | left:0px; 6 | top:0px; 7 | } 8 | 9 | .navbar a.navbar-brand { 10 | display: block; 11 | margin: 0 auto 0 auto; 12 | width: 148px; 13 | height: 50px; 14 | float: none; 15 | background: url("../images/spring-logo-dataflow-mobile.png") 0 center no-repeat; 16 | } 17 | 18 | .homepage-billboard .homepage-subtitle { 19 | font-size: 21px; 20 | line-height: 21px; 21 | } 22 | 23 | .navbar a.navbar-brand span { 24 | display: none; 25 | } 26 | 27 | .navbar { 28 | border-top-width: 0; 29 | } 30 | 31 | .xd-container { 32 | margin-top: 20px; 33 | margin-bottom: 30px; 34 | } 35 | 36 | .index-page--subtitle { 37 | margin-top: 10px; 38 | margin-bottom: 30px; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/mapper/OwnerMapper.java: -------------------------------------------------------------------------------- 1 | package org.springframework.samples.petclinic.mapper; 2 | 3 | import org.mapstruct.Mapper; 4 | import org.springframework.samples.petclinic.rest.dto.OwnerDto; 5 | import org.springframework.samples.petclinic.model.Owner; 6 | import org.springframework.samples.petclinic.rest.dto.OwnerFieldsDto; 7 | 8 | import java.util.Collection; 9 | import java.util.List; 10 | 11 | /** 12 | * Maps Owner & OwnerDto using Mapstruct 13 | */ 14 | @Mapper(uses = PetMapper.class) 15 | public interface OwnerMapper { 16 | 17 | OwnerDto toOwnerDto(Owner owner); 18 | 19 | Owner toOwner(OwnerDto ownerDto); 20 | 21 | Owner toOwner(OwnerFieldsDto ownerDto); 22 | 23 | List toOwnerDtoCollection(Collection ownerCollection); 24 | 25 | Collection toOwners(Collection ownerDtos); 26 | } 27 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/pettypes/pettype.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | /** 20 | * @author Vitaliy Fedoriv 21 | */ 22 | 23 | export interface PetType { 24 | id: number; 25 | name: string; 26 | } 27 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/js/tabs.js: -------------------------------------------------------------------------------- 1 | document.addEventListener('DOMContentLoaded', function() { 2 | var tabs = document.getElementsByClassName('nav-tabs'), 3 | updateAddress = function(e) { 4 | if(history.pushState && e.target.dataset.link) { 5 | history.pushState(null, null, '#' + e.target.dataset.link); 6 | } 7 | }; 8 | if (tabs.length > 0) { 9 | tabs = tabs[0].querySelectorAll('li'); 10 | for (var i = 0; i < tabs.length; i++) { 11 | tabs[i].addEventListener('click', updateAddress); 12 | var linkTag = tabs[i].querySelector('a'); 13 | if (location.hash !== '') { 14 | var currentHash = location.hash.substr(1); 15 | if (currentHash === linkTag.dataset.link) { 16 | linkTag.click(); 17 | } 18 | } 19 | } 20 | } 21 | }); 22 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/specialties/specialty.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | /** 20 | * @author Vitaliy Fedoriv 21 | */ 22 | 23 | export interface Specialty { 24 | id: number; 25 | name: string; 26 | } 27 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package org.springframework.samples.petclinic.mapper; 2 | 3 | import org.mapstruct.Mapper; 4 | import org.springframework.samples.petclinic.rest.dto.RoleDto; 5 | import org.springframework.samples.petclinic.rest.dto.UserDto; 6 | import org.springframework.samples.petclinic.model.Role; 7 | import org.springframework.samples.petclinic.model.User; 8 | 9 | import java.util.Collection; 10 | 11 | /** 12 | * Map User/Role & UserDto/RoleDto using mapstruct 13 | */ 14 | @Mapper 15 | public interface UserMapper { 16 | Role toRole(RoleDto roleDto); 17 | 18 | RoleDto toRoleDto(Role role); 19 | 20 | Collection toRoleDtos(Collection roles); 21 | 22 | User toUser(UserDto userDto); 23 | 24 | UserDto toUserDto(User user); 25 | 26 | Collection toRoles(Collection roleDtos); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/docker-compose-tmp.yaml: -------------------------------------------------------------------------------- 1 | version: "3.9" 2 | services: 3 | java-app: 4 | build: 5 | context: . 6 | container_name: javaApp 7 | depends_on: 8 | - mypostgres 9 | ports: 10 | - "9966:9966" 11 | networks: 12 | - keploy-network 13 | mypostgres: 14 | image: "postgres:15.2" 15 | container_name: mypostgres 16 | ports: 17 | - "5432:5432" 18 | networks: 19 | - keploy-network 20 | volumes: 21 | - /Users/achanandhi/Documents/java-quickstart-fix/samples-java/spring-petclinic/spring-petclinic-rest/src/main/resources/db/postgresql/initDB.sql:/docker-entrypoint-initdb.d/initDB.sql 22 | environment: 23 | POSTGRES_USER: petclinic 24 | POSTGRES_PASSWORD: petclinic 25 | POSTGRES_DB: petclinic 26 | networks: 27 | keploy-network: 28 | external: true 29 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | /** 20 | * @author Vitaliy Fedoriv 21 | */ 22 | 23 | export const environment = { 24 | production: true, 25 | REST_API_URL: 'http://localhost:9966/petclinic/api/' 26 | }; 27 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/styles.css: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | /* You can add global styles to this file, and also import other style files */ 20 | @import url('./assets/css/petclinic.css'); 21 | @import "@angular/material/prebuilt-themes/indigo-pink.css"; 22 | 23 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/images/coverage-badge-documentation.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | documentation 7 | 2% 8 | 9 | 10 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/--feature-request.yaml: -------------------------------------------------------------------------------- 1 | name: Feature request 2 | description: Suggest a feature to improve Keploy 3 | title: "[feature]: " 4 | labels: [feature] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Thank you for taking the time to request a feature for Keploy 10 | - type: checkboxes 11 | attributes: 12 | label: Is there an existing feature request for this? 13 | description: Please search to see if an issue related to this feature request/feature request already exists 14 | options: 15 | - label: I have searched the existing issues 16 | required: true 17 | - type: textarea 18 | attributes: 19 | label: Summary 20 | description: One paragraph description of the feature 21 | validations: 22 | required: true 23 | - type: textarea 24 | attributes: 25 | label: Why should this be worked on? 26 | description: A concise description of the problems or use cases for this feature request 27 | validations: 28 | required: true -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/testing/dummy.component.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | /** 20 | * @author Vitaliy Fedoriv 21 | */ 22 | 23 | import {Component} from '@angular/core'; 24 | 25 | @Component({ 26 | template: '' 27 | }) 28 | export class DummyComponent { 29 | 30 | } 31 | -------------------------------------------------------------------------------- /Contributing/How-To-Do-Continuous-Integration.md: -------------------------------------------------------------------------------- 1 | # Continuous Integration Tools 2 | 3 | Continuous integration is a DevOps software development practice where developers regularly merge their code changes into a central repository, after which automated builds and tests are run. 4 | 5 | While not yet implemented, Keploy intends to utilise Continuous Integration Tools. Continuous Integration allows multiple developers to work on a software project while integrating their changes and maintaining the stability and quality of the software. 6 | 7 | Continuous Integration fosters innovation by ensuring that ongoing improvements are always available and compatible to a set of users. This would allow a user developing their own countries implementation could progressively add new data and features while maintaining a functioning, reproducible system 8 | 9 | Two Integration Tools have been identified for Continuous Integration with Keploy: 10 | 11 | - We use Github Actions to supports Continuous Integration and testing . 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/visits/visit.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | /** 20 | * @author Vitaliy Fedoriv 21 | */ 22 | 23 | import {Pet} from '../pets/pet'; 24 | 25 | export interface Visit { 26 | id: number; 27 | date: string; 28 | description: string; 29 | pet: Pet; 30 | petId?: number; 31 | } 32 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/e2e/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../.eslintrc.json", 3 | "ignorePatterns": [ 4 | "!**/*" 5 | ], 6 | "overrides": [ 7 | { 8 | "files": [ 9 | "*.ts" 10 | ], 11 | "parserOptions": { 12 | "project": [ 13 | "e2e/tsconfig.app.json", 14 | "e2e/tsconfig.spec.json", 15 | "e2e/e2e/tsconfig.json" 16 | ], 17 | "createDefaultProgram": true 18 | }, 19 | "rules": { 20 | "@angular-eslint/directive-selector": [ 21 | "error", 22 | { 23 | "type": "attribute", 24 | "style": "camelCase" 25 | } 26 | ], 27 | "@angular-eslint/component-selector": [ 28 | "error", 29 | { 30 | "type": "element", 31 | "style": "kebab-case" 32 | } 33 | ] 34 | } 35 | }, 36 | { 37 | "files": [ 38 | "*.html" 39 | ], 40 | "rules": {} 41 | } 42 | ] 43 | } 44 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/vets/vet.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | /** 20 | * @author Vitaliy Fedoriv 21 | */ 22 | 23 | import {Specialty} from '../specialties/specialty'; 24 | 25 | export interface Vet { 26 | id: number; 27 | firstName: string; 28 | lastName: string; 29 | specialties: Specialty[]; 30 | } 31 | -------------------------------------------------------------------------------- /spring-boot-postgres-graphql/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | # Enable GraphiQL gui 3 | spring.graphql.graphiql.enabled=true 4 | 5 | # Configuration PostgreSQL datasource 6 | spring.datasource.url=jdbc:postgresql://localhost:5432/library_demo 7 | spring.datasource.username=postgres 8 | spring.datasource.password=root 9 | hibernate.jta.track_by_thread=false 10 | spring.jpa.open-in-view=false 11 | spring.jpa.defer-datasource-initialization=true 12 | spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect 13 | 14 | 15 | # Driver JDBC configuration 16 | spring.datasource.driver-class-name=org.postgresql.Driver 17 | 18 | # Table auto-generation 19 | spring.jpa.hibernate.ddl-auto=create 20 | 21 | # Insert static record in DB 22 | spring.sql.init.mode=always 23 | #spring.sql.init.data-locations= 24 | 25 | 26 | # Logging SQL configuration 27 | spring.jpa.show-sql=true 28 | spring.jpa.properties.hibernate.format_sql=true 29 | spring.jpa.properties.hibernate.show_sql=true 30 | 31 | # Change server port 32 | server.port=8081 -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/js/libs/custom-elements-es5-adapter.js: -------------------------------------------------------------------------------- 1 | /** 2 | @license @nocompile 3 | Copyright (c) 2018 The Polymer Project Authors. All rights reserved. 4 | This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | Code distributed by Google as part of the polymer project is also 8 | subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | (function () { 11 | 'use strict'; 12 | 13 | (function(){if(void 0===window.Reflect||void 0===window.customElements||window.customElements.hasOwnProperty('polyfillWrapFlushCallback'))return;const a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)},HTMLElement.prototype=a.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,a);})(); 14 | 15 | }()); 16 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/e2e/app.po.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | import { browser, by, element } from 'protractor'; 20 | 21 | export class SpringPetclinicAngularPage { 22 | navigateTo() { 23 | return browser.get('/'); 24 | } 25 | 26 | getParagraphText() { 27 | return element(by.css('app-root h1')).getText(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/typings.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | // Typings reference file, you can add your own global typings here 20 | // https://www.typescriptlang.org/docs/handbook/writing-declaration-files.html 21 | /* SystemJS module definition */ 22 | declare var module: NodeModule; 23 | interface NodeModule { 24 | id: string; 25 | } 26 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/repository/jpa/JpaUserRepositoryImpl.java: -------------------------------------------------------------------------------- 1 | package org.springframework.samples.petclinic.repository.jpa; 2 | 3 | import jakarta.persistence.EntityManager; 4 | import jakarta.persistence.PersistenceContext; 5 | 6 | import org.springframework.context.annotation.Profile; 7 | import org.springframework.dao.DataAccessException; 8 | import org.springframework.samples.petclinic.model.User; 9 | import org.springframework.samples.petclinic.repository.UserRepository; 10 | import org.springframework.stereotype.Repository; 11 | 12 | @Repository 13 | @Profile("jpa") 14 | public class JpaUserRepositoryImpl implements UserRepository { 15 | 16 | @PersistenceContext 17 | private EntityManager em; 18 | 19 | @Override 20 | public void save(User user) throws DataAccessException { 21 | if (this.em.find(User.class, user.getUsername()) == null) { 22 | this.em.persist(user); 23 | } else { 24 | this.em.merge(user); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/pettypes/pettype-add/pettype-add.component.ts: -------------------------------------------------------------------------------- 1 | import {Component, EventEmitter, OnInit, Output} from '@angular/core'; 2 | import {PetType} from '../pettype'; 3 | import {PetTypeService} from '../pettype.service'; 4 | 5 | @Component({ 6 | selector: 'app-pettype-add', 7 | templateUrl: './pettype-add.component.html', 8 | styleUrls: ['./pettype-add.component.css'] 9 | }) 10 | export class PettypeAddComponent implements OnInit { 11 | pettype: PetType; 12 | errorMessage: string; 13 | @Output() newPetType = new EventEmitter(); 14 | 15 | constructor(private pettypeService: PetTypeService) { 16 | this.pettype = {} as PetType; 17 | } 18 | 19 | ngOnInit() { 20 | } 21 | 22 | onSubmit(pettype: PetType) { 23 | pettype.id = null; 24 | this.pettypeService.addPetType(pettype).subscribe( 25 | newPettype => { 26 | this.pettype = newPettype; 27 | this.newPetType.emit(this.pettype); 28 | }, 29 | error => this.errorMessage = error as any 30 | ); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /spring-boot-xml/naive-spring-boot/.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 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | /** 20 | * @author Vitaliy Fedoriv 21 | */ 22 | 23 | import {Component} from '@angular/core'; 24 | 25 | @Component({ 26 | selector: 'app-root', 27 | templateUrl: './app.component.html', 28 | styleUrls: ['./app.component.css'] 29 | }) 30 | export class AppComponent { 31 | 32 | } 33 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/owners/owner.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | /** 20 | * @author Vitaliy Fedoriv 21 | */ 22 | 23 | import {Pet} from '../pets/pet'; 24 | 25 | export interface Owner { 26 | id: number; 27 | firstName: string; 28 | lastName: string; 29 | address: string; 30 | city: string; 31 | telephone: string; 32 | pets: Pet[]; 33 | } 34 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/model/PetType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2013 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.samples.petclinic.model; 17 | 18 | import jakarta.persistence.Entity; 19 | import jakarta.persistence.Table; 20 | 21 | /** 22 | * @author Juergen Hoeller 23 | * Can be Cat, Dog, Hamster... 24 | */ 25 | @Entity 26 | @Table(name = "types") 27 | public class PetType extends NamedEntity { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG DOCKER_HUB="docker.io" 2 | ARG NGINX_VERSION="1.17.6" 3 | ARG NODE_VERSION="16.3-alpine" 4 | 5 | FROM $DOCKER_HUB/library/node:$NODE_VERSION as build 6 | 7 | 8 | COPY . /workspace/ 9 | 10 | ARG NPM_REGISTRY=" https://registry.npmjs.org" 11 | 12 | RUN echo "registry = \"$NPM_REGISTRY\"" > /workspace/.npmrc && \ 13 | cd /workspace/ && \ 14 | npm install && \ 15 | npm run build 16 | 17 | FROM $DOCKER_HUB/library/nginx:$NGINX_VERSION AS runtime 18 | 19 | 20 | COPY --from=build /workspace/dist/ /usr/share/nginx/html/ 21 | 22 | RUN chmod a+rwx /var/cache/nginx /var/run /var/log/nginx && \ 23 | sed -i.bak 's/listen\(.*\)80;/listen 8080;/' /etc/nginx/conf.d/default.conf && \ 24 | sed -i.bak 's/^user/#user/' /etc/nginx/nginx.conf 25 | 26 | 27 | EXPOSE 8080 28 | 29 | USER nginx 30 | 31 | HEALTHCHECK CMD [ "service", "nginx", "status" ] 32 | 33 | 34 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt: -------------------------------------------------------------------------------- 1 | ================================================================================ 2 | === Spring PetClinic sample application - MySQL Configuration === 3 | ================================================================================ 4 | 5 | @author Sam Brannen 6 | @author Costin Leau 7 | 8 | -------------------------------------------------------------------------------- 9 | 10 | 1) Download and install the MySQL database (e.g., MySQL Community Server 5.7.x), 11 | which can be found here: http://dev.mysql.com/downloads/mysql/ 12 | Alternatively, you may use the official MySQL docker image. Refer to the 13 | README.md for the Docker command line. 14 | 15 | 16 | 2) Create the PetClinic database and user by executing the "db/mysql/initDB.sql" 17 | and "db/mysql/populateDB.sql" scripts. Or uncomment strings 18 | #spring.datasource.schema=classpath*:db/mysql/initDB.sql 19 | #spring.datasource.data=classpath*:db/mysql/populateDB.sql 20 | in application-mysql.properties file at the first time you run the app. -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/model/Role.java: -------------------------------------------------------------------------------- 1 | package org.springframework.samples.petclinic.model; 2 | 3 | import jakarta.persistence.Column; 4 | import jakarta.persistence.Entity; 5 | import jakarta.persistence.JoinColumn; 6 | import jakarta.persistence.ManyToOne; 7 | import jakarta.persistence.Table; 8 | import jakarta.persistence.UniqueConstraint; 9 | 10 | import com.fasterxml.jackson.annotation.JsonIgnore; 11 | 12 | @Entity 13 | @Table(name = "roles" ,uniqueConstraints = @UniqueConstraint(columnNames = {"username", "role"})) 14 | public class Role extends BaseEntity { 15 | 16 | @ManyToOne 17 | @JoinColumn(name = "username") 18 | @JsonIgnore 19 | private User user; 20 | 21 | @Column( name = "role") 22 | private String name; 23 | 24 | public User getUser() { 25 | return user; 26 | } 27 | 28 | public void setUser(User user) { 29 | this.user = user; 30 | } 31 | 32 | public String getName() { 33 | return name; 34 | } 35 | 36 | public void setName(String name) { 37 | this.name = name; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /.github/License-Apache_2.0-blue.svg: -------------------------------------------------------------------------------- 1 | License: Apache 2.0LicenseApache 2.0 -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/model/Specialty.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2013 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.samples.petclinic.model; 17 | 18 | import jakarta.persistence.Entity; 19 | import jakarta.persistence.Table; 20 | 21 | /** 22 | * Models a {@link Vet Vet's} specialty (for example, dentistry). 23 | * 24 | * @author Juergen Hoeller 25 | */ 26 | @Entity 27 | @Table(name = "specialties") 28 | public class Specialty extends NamedEntity { 29 | 30 | } 31 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/styles/original.css: -------------------------------------------------------------------------------- 1 | .navbar-default .navbar-brand, .menu ul.list li.title { 2 | font-weight: bold; 3 | color: #3c3c3c; 4 | padding-bottom: 5px; 5 | } 6 | 7 | .menu ul.list li a[data-type="chapter-link"], .menu ul.list li.chapter .simple { 8 | font-weight: bold; 9 | border-top: 1px solid #ddd; 10 | border-bottom: 1px solid #ddd; 11 | font-size: 14px; 12 | } 13 | 14 | .menu ul.list li a[href="./routes.html"] { 15 | border-bottom: none; 16 | } 17 | 18 | .menu ul.list > li:nth-child(2) { 19 | display: none; 20 | } 21 | 22 | .menu ul.list li.chapter ul.links { 23 | background: #fff; 24 | padding-left: 0; 25 | } 26 | 27 | .menu ul.list li.chapter ul.links li { 28 | border-bottom: 1px solid #ddd; 29 | padding-left: 20px; 30 | } 31 | 32 | .menu ul.list li.chapter ul.links li:last-child { 33 | border-bottom: none; 34 | } 35 | 36 | .menu ul.list li a.active { 37 | color: inherit; 38 | font-weight: bold; 39 | } 40 | 41 | #book-search-input { 42 | margin-bottom: 0; 43 | border-bottom: none; 44 | } 45 | .menu ul.list li.divider { 46 | margin: 0; 47 | } 48 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/pets/pet.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | /** 20 | * @author Vitaliy Fedoriv 21 | */ 22 | 23 | import {Owner} from '../owners/owner'; 24 | import {Visit} from '../visits/visit'; 25 | import {PetType} from '../pettypes/pettype'; 26 | 27 | export interface Pet { 28 | id: number; 29 | ownerId: number; 30 | name: string; 31 | birthDate: string; 32 | type: PetType; 33 | owner: Owner; 34 | visits: Visit[]; 35 | } 36 | -------------------------------------------------------------------------------- /spring-boot-xml/naive-spring-boot/src/main/java/com/example/XML/entities/User.java: -------------------------------------------------------------------------------- 1 | package com.example.XML.entities; 2 | 3 | import jakarta.xml.bind.annotation.XmlElement; 4 | import jakarta.xml.bind.annotation.XmlRootElement; 5 | 6 | @XmlRootElement(name = "User") 7 | public class User { 8 | @XmlElement(name = "name") 9 | private String name; 10 | 11 | @XmlElement(name = "age") 12 | private int age; 13 | 14 | @XmlElement(name = "mobile") 15 | private String mobile; 16 | 17 | public User() {} 18 | 19 | public User(String name, int age, String mobile) { 20 | this.name = name; 21 | this.age = age; 22 | this.mobile = mobile; 23 | } 24 | 25 | public String getName() { 26 | return name; 27 | } 28 | 29 | public void setName(String name) { 30 | this.name = name; 31 | } 32 | 33 | public int getAge() { 34 | return age; 35 | } 36 | 37 | public void setAge(int age) { 38 | this.age = age; 39 | } 40 | 41 | public String getMobile() { 42 | return mobile; 43 | } 44 | 45 | public void setMobile(String mobile) { 46 | this.mobile = mobile; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/parts/welcome/welcome.component.html: -------------------------------------------------------------------------------- 1 | 18 | 19 |

Welcome to Petclinic

20 | 21 |
22 |
23 | 24 |

Welcome

25 |
26 |
27 | pets logo 28 |
29 |
30 |
31 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/repository/springdatajpa/PetRepositoryOverride.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.samples.petclinic.repository.springdatajpa; 18 | 19 | import org.springframework.context.annotation.Profile; 20 | import org.springframework.samples.petclinic.model.Pet; 21 | 22 | /** 23 | * @author Vitaliy Fedoriv 24 | * 25 | */ 26 | 27 | @Profile("spring-data-jpa") 28 | public interface PetRepositoryOverride { 29 | 30 | void delete(Pet pet); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/parts/page-not-found/page-not-found.component.html: -------------------------------------------------------------------------------- 1 | 18 | 19 |

Oops! Page not found !

20 | 21 |
22 |
23 | 24 |

Not Found - 404 error

25 |
26 |
27 | pets logo 28 |
29 |
30 |
31 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/parts/welcome/welcome.component.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | 20 | /** 21 | * @author Vitaliy Fedoriv 22 | */ 23 | 24 | import {Component, OnInit} from '@angular/core'; 25 | 26 | @Component({ 27 | selector: 'app-welcome', 28 | templateUrl: './welcome.component.html', 29 | styleUrls: ['./welcome.component.css'] 30 | }) 31 | export class WelcomeComponent implements OnInit { 32 | 33 | constructor() { 34 | } 35 | 36 | ngOnInit() { 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/repository/springdatajpa/VisitRepositoryOverride.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.samples.petclinic.repository.springdatajpa; 18 | 19 | import org.springframework.context.annotation.Profile; 20 | import org.springframework.samples.petclinic.model.Visit; 21 | 22 | /** 23 | * @author Vitaliy Fedoriv 24 | * 25 | */ 26 | 27 | @Profile("spring-data-jpa") 28 | public interface VisitRepositoryOverride { 29 | 30 | void delete(Visit visit); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/resources/db/postgresql/petclinic_db_setup_postgresql.txt: -------------------------------------------------------------------------------- 1 | ================================================================================ 2 | === Spring PetClinic sample application - PostgreSQL Configuration === 3 | ================================================================================ 4 | 5 | @author Vitaliy Fedoriv 6 | @autor Antoine Rey 7 | 8 | -------------------------------------------------------------------------------- 9 | 10 | 1) Download and install the PostgreSQL database, 11 | which can be found here: https://www.postgresql.org/download/ 12 | 13 | 14 | 2) Open psql and create the PetClinic database: 15 | 16 | CREATE DATABASE petclinic 17 | WITH OWNER = postgres 18 | ENCODING = 'UTF8' 19 | TABLESPACE = pg_default 20 | CONNECTION LIMIT = -1; 21 | 22 | 3) Create the PetClinic tables by executing the "db/postgresql/initDB.sql". 23 | Then execute "db/mysql/populateDB.sql" script. 24 | Or uncomment strings 25 | #spring.datasource.schema=classpath*:db/postgresql/initDB.sql 26 | #spring.datasource.data=classpath*:db/postgresql/populateDB.sql 27 | in application-postgresql.properties file at the first time you run the app. -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | 23 | SpringPetclinicAngular 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | Loading... 35 | 36 | 37 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/mapper/PetMapper.java: -------------------------------------------------------------------------------- 1 | package org.springframework.samples.petclinic.mapper; 2 | 3 | import org.mapstruct.Mapper; 4 | import org.mapstruct.Mapping; 5 | import org.springframework.samples.petclinic.rest.dto.PetDto; 6 | import org.springframework.samples.petclinic.rest.dto.PetFieldsDto; 7 | import org.springframework.samples.petclinic.rest.dto.PetTypeDto; 8 | import org.springframework.samples.petclinic.model.Pet; 9 | import org.springframework.samples.petclinic.model.PetType; 10 | 11 | import java.util.Collection; 12 | 13 | /** 14 | * Map Pet & PetDto using mapstruct 15 | */ 16 | @Mapper 17 | public interface PetMapper { 18 | 19 | @Mapping(source = "owner.id", target = "ownerId") 20 | PetDto toPetDto(Pet pet); 21 | 22 | Collection toPetsDto(Collection pets); 23 | 24 | Collection toPets(Collection pets); 25 | 26 | Pet toPet(PetDto petDto); 27 | 28 | Pet toPet(PetFieldsDto petFieldsDto); 29 | 30 | PetTypeDto toPetTypeDto(PetType petType); 31 | 32 | PetType toPetType(PetTypeDto petTypeDto); 33 | 34 | Collection toPetTypeDtos(Collection petTypes); 35 | } 36 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/repository/springdatajpa/PetTypeRepositoryOverride.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.samples.petclinic.repository.springdatajpa; 18 | 19 | import org.springframework.context.annotation.Profile; 20 | import org.springframework.samples.petclinic.model.PetType; 21 | 22 | /** 23 | * @author Vitaliy Fedoriv 24 | * 25 | */ 26 | 27 | @Profile("spring-data-jpa") 28 | public interface PetTypeRepositoryOverride { 29 | 30 | void delete(PetType petType); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/main.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | // import './polyfills.ts'; 20 | 21 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 22 | import { enableProdMode } from '@angular/core'; 23 | import { environment } from './environments/environment'; 24 | import { AppModule } from './app/app.module'; 25 | 26 | if (environment.production) { 27 | enableProdMode(); 28 | } 29 | 30 | platformBrowserDynamic().bootstrapModule(AppModule) 31 | .catch(err => console.log(err)); 32 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/repository/springdatajpa/SpecialtyRepositoryOverride.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.samples.petclinic.repository.springdatajpa; 18 | 19 | import org.springframework.context.annotation.Profile; 20 | import org.springframework.samples.petclinic.model.Specialty; 21 | 22 | /** 23 | * @author Vitaliy Fedoriv 24 | * 25 | */ 26 | 27 | @Profile("spring-data-jpa") 28 | public interface SpecialtyRepositoryOverride { 29 | 30 | void delete(Specialty specialty); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /user-manager/src/main/java/com/example/user/exception/GlobalExceptionHandler.java: -------------------------------------------------------------------------------- 1 | package com.example.user.exception; 2 | 3 | import org.springframework.http.HttpStatus; 4 | import org.springframework.http.ResponseEntity; 5 | import org.springframework.web.bind.annotation.ControllerAdvice; 6 | import org.springframework.web.bind.annotation.ExceptionHandler; 7 | import org.springframework.web.context.request.WebRequest; 8 | 9 | import java.util.Date; 10 | 11 | @ControllerAdvice 12 | public class GlobalExceptionHandler { 13 | 14 | @ExceptionHandler(ResourceNotFoundException.class) 15 | public ResponseEntity resourceNotFoundException(ResourceNotFoundException ex, WebRequest request) { 16 | ErrorDetails errorDetails = new ErrorDetails(new Date(), ex.getMessage(), request.getDescription(false)); 17 | return new ResponseEntity<>(errorDetails, HttpStatus.NOT_FOUND); 18 | } 19 | 20 | @ExceptionHandler 21 | public ResponseEntity globalExceptionHandler(Exception ex, WebRequest request) { 22 | ErrorDetails errorDetails = new ErrorDetails(new Date(), ex.getMessage(), request.getDescription(false)); 23 | return new ResponseEntity<>(errorDetails, HttpStatus.INTERNAL_SERVER_ERROR); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /employee-manager/src/main/java/com/example/demo/exception/GlobalExceptionHandler.java: -------------------------------------------------------------------------------- 1 | package com.example.demo.exception; 2 | 3 | import org.springframework.http.HttpStatus; 4 | import org.springframework.http.ResponseEntity; 5 | import org.springframework.web.bind.annotation.ControllerAdvice; 6 | import org.springframework.web.bind.annotation.ExceptionHandler; 7 | import org.springframework.web.context.request.WebRequest; 8 | 9 | import java.util.Date; 10 | 11 | @ControllerAdvice 12 | public class GlobalExceptionHandler { 13 | 14 | @ExceptionHandler(ResourceNotFoundException.class) 15 | public ResponseEntity resourceNotFoundException(ResourceNotFoundException ex, WebRequest request) { 16 | ErrorDetails errorDetails = new ErrorDetails(new Date(), ex.getMessage(), request.getDescription(false)); 17 | return new ResponseEntity<>(errorDetails, HttpStatus.NOT_FOUND); 18 | } 19 | 20 | @ExceptionHandler 21 | public ResponseEntity globalExceptionHandler(Exception ex, WebRequest request) { 22 | ErrorDetails errorDetails = new ErrorDetails(new Date(), ex.getMessage(), request.getDescription(false)); 23 | return new ResponseEntity<>(errorDetails, HttpStatus.INTERNAL_SERVER_ERROR); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /spring-boot-xml/naive-spring-boot/README.md: -------------------------------------------------------------------------------- 1 |

Sample java spring boot with xml

2 |

This project is a Spring Boot application that serves a simple REST API endpoint returning XML responses.

3 | 4 |

How to Run

5 |

Ensure you have Java 17 installed. Then, follow these steps:

6 |
    7 |
  1. Clone the repository
  2. 8 |
  3. Navigate into the project directory
  4. 9 |
  5. Build the project: mvn clean install
  6. 10 |
  7. Run the application: mvn spring-boot:run
  8. 11 |
12 | 13 |

API Endpoints

14 |

Get User (Returns XML)

15 |

Endpoint: GET /api/user

16 | 17 |

Testing with Curl

18 |

To make a request using curl, use the following command:

19 |
20 | curl -X GET -H "Accept: application/xml" http://localhost:8080/api/user
21 | 
22 | 23 |

Expected XML Response

24 |
25 | 
26 | <User>
27 | <name>John Doe</name>
28 | <age>30</age>
29 | <phone>0101233333</phone>
30 | </User>
31 | 
32 | 
33 | 34 |

Dependencies

35 |
    36 |
  • Spring Boot
  • 37 |
  • Spring Web
  • 38 |
  • JAXB for XML serialization
  • 39 |
-------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/parts/page-not-found/page-not-found.component.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | 20 | /** 21 | * @author Vitaliy Fedoriv 22 | */ 23 | 24 | import {Component, OnInit} from '@angular/core'; 25 | 26 | @Component({ 27 | selector: 'app-page-not-found', 28 | templateUrl: './page-not-found.component.html', 29 | styleUrls: ['./page-not-found.component.css'] 30 | }) 31 | export class PageNotFoundComponent implements OnInit { 32 | 33 | constructor() { 34 | } 35 | 36 | ngOnInit() { 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/security/DisableSecurityConfig.java: -------------------------------------------------------------------------------- 1 | package org.springframework.samples.petclinic.security; 2 | 3 | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | import org.springframework.security.config.annotation.web.builders.HttpSecurity; 7 | import org.springframework.security.web.SecurityFilterChain; 8 | 9 | /** 10 | * Starting from Spring Boot 2, if Spring Security is present, endpoints are secured by default 11 | * using Spring Security’s content-negotiation strategy. 12 | */ 13 | @Configuration 14 | @ConditionalOnProperty(name = "petclinic.security.enable", havingValue = "false") 15 | public class DisableSecurityConfig { 16 | 17 | @Bean 18 | public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { 19 | // @formatter:off 20 | http 21 | .authorizeHttpRequests((authz) -> authz 22 | .anyRequest().permitAll() 23 | ) 24 | .csrf() 25 | .disable(); 26 | // @formatter:on 27 | return http.build(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /spring-mysql-redis/src/main/java/org/example/todo/service/TodoService.java: -------------------------------------------------------------------------------- 1 | package org.example.todo.service; 2 | 3 | import org.example.todo.model.Todo; 4 | import org.example.todo.repository.TodoRepository; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | import org.springframework.cache.annotation.CacheEvict; 8 | import org.springframework.cache.annotation.CachePut; 9 | import org.springframework.cache.annotation.Cacheable; 10 | import java.util.List; 11 | import java.util.Optional; 12 | 13 | @Service 14 | public class TodoService { 15 | 16 | @Autowired 17 | private TodoRepository todoRepository; 18 | 19 | @Cacheable(value = "todos", key = "#id") 20 | public Optional findById(Long id) { 21 | return todoRepository.findById(id); 22 | } 23 | 24 | @Cacheable(value = "todos") 25 | public List findAll() { 26 | return todoRepository.findAll(); 27 | } 28 | 29 | @CachePut(value = "todos", key = "#todo.id") 30 | public Todo save(Todo todo) { 31 | return todoRepository.save(todo); 32 | } 33 | 34 | @CacheEvict(value = "todos", key = "#id") 35 | public void deleteById(Long id) { 36 | todoRepository.deleteById(id); 37 | } 38 | } -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | // The file contents for the current environment will overwrite these during build. 20 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do 21 | // `ng build --env=prod` then `environment.prod.ts` will be used instead. 22 | // The list of which env maps to which file can be found in `.angular-cli.json`. 23 | 24 | export const environment = { 25 | production: false, 26 | REST_API_URL: 'http://localhost:9966/petclinic/api/' 27 | }; 28 | -------------------------------------------------------------------------------- /spring-boot-mongo/keploy/test-set-0/tests/test-4.yaml: -------------------------------------------------------------------------------- 1 | version: api.keploy.io/v1beta1 2 | kind: Http 3 | name: test-4 4 | spec: 5 | metadata: {} 6 | req: 7 | method: DELETE 8 | proto_major: 1 9 | proto_minor: 1 10 | url: http://localhost:8080/potions/21fac58b-8c6c-4d4a-bef8-0034324bae29 11 | header: 12 | Accept: '*/*' 13 | Host: localhost:8080 14 | User-Agent: curl/7.81.0 15 | body: "" 16 | body_type: "" 17 | timestamp: 2023-11-28T18:28:24.09510735+05:30 18 | resp: 19 | status_code: 200 20 | header: 21 | Content-Type: application/json 22 | Date: Tue, 28 Nov 2023 12:58:24 GMT 23 | body: '"OK"' 24 | body_type: "" 25 | status_message: "" 26 | proto_major: 0 27 | proto_minor: 0 28 | timestamp: 2023-11-28T18:28:27.678879794+05:30 29 | objects: [] 30 | assertions: 31 | noise: 32 | header.Date: [] 33 | created: 1701176307 34 | curl: | 35 | curl --request DELETE \ 36 | --url http://localhost:8080/potions/21fac58b-8c6c-4d4a-bef8-0034324bae29 \ 37 | --header 'Accept: */*' \ 38 | --header 'Host: localhost:8080' \ 39 | --header 'User-Agent: curl/7.81.0' \ 40 | -------------------------------------------------------------------------------- /spring-mysql-redis/keploy/test-set-0/tests/test-5.yaml: -------------------------------------------------------------------------------- 1 | version: api.keploy.io/v1beta1 2 | kind: Http 3 | name: test-5 4 | spec: 5 | metadata: {} 6 | req: 7 | method: GET 8 | proto_major: 1 9 | proto_minor: 1 10 | url: http://localhost:8080/api/todos/1 11 | header: 12 | Accept: '*/*' 13 | Host: localhost:8080 14 | User-Agent: curl/7.88.1 15 | body: "" 16 | timestamp: 2024-08-14T12:00:33.599205188+05:30 17 | resp: 18 | status_code: 200 19 | header: 20 | Content-Type: application/json 21 | Date: Wed, 14 Aug 2024 06:30:33 GMT 22 | body: '{"id":1,"title":"Learn Spring Boot","description":"Read the Spring Boot documentation and write some sample code","completed":false}' 23 | status_message: OK 24 | proto_major: 0 25 | proto_minor: 0 26 | timestamp: 2024-08-14T12:00:36.677795688+05:30 27 | objects: [] 28 | assertions: 29 | noise: 30 | header.Date: [] 31 | created: 1723617036 32 | curl: | 33 | curl --request GET \ 34 | --url http://localhost:8080/api/todos/1 \ 35 | --header 'Host: localhost:8080' \ 36 | --header 'User-Agent: curl/7.88.1' \ 37 | --header 'Accept: */*' \ 38 | -------------------------------------------------------------------------------- /spring-mysql-redis/keploy/test-set-0/tests/test-6.yaml: -------------------------------------------------------------------------------- 1 | version: api.keploy.io/v1beta1 2 | kind: Http 3 | name: test-6 4 | spec: 5 | metadata: {} 6 | req: 7 | method: GET 8 | proto_major: 1 9 | proto_minor: 1 10 | url: http://localhost:8080/api/todos/1 11 | header: 12 | Accept: '*/*' 13 | Host: localhost:8080 14 | User-Agent: curl/7.88.1 15 | body: "" 16 | timestamp: 2024-08-14T12:00:42.793580844+05:30 17 | resp: 18 | status_code: 200 19 | header: 20 | Content-Type: application/json 21 | Date: Wed, 14 Aug 2024 06:30:42 GMT 22 | body: '{"id":1,"title":"Learn Spring Boot","description":"Read the Spring Boot documentation and write some sample code","completed":false}' 23 | status_message: OK 24 | proto_major: 0 25 | proto_minor: 0 26 | timestamp: 2024-08-14T12:00:45.831164107+05:30 27 | objects: [] 28 | assertions: 29 | noise: 30 | header.Date: [] 31 | created: 1723617045 32 | curl: | 33 | curl --request GET \ 34 | --url http://localhost:8080/api/todos/1 \ 35 | --header 'Host: localhost:8080' \ 36 | --header 'User-Agent: curl/7.88.1' \ 37 | --header 'Accept: */*' \ 38 | -------------------------------------------------------------------------------- /spring-mysql-redis/keploy/test-set-0/tests/test-7.yaml: -------------------------------------------------------------------------------- 1 | version: api.keploy.io/v1beta1 2 | kind: Http 3 | name: test-7 4 | spec: 5 | metadata: {} 6 | req: 7 | method: GET 8 | proto_major: 1 9 | proto_minor: 1 10 | url: http://localhost:8080/api/todos/1 11 | header: 12 | Accept: '*/*' 13 | Host: localhost:8080 14 | User-Agent: curl/7.88.1 15 | body: "" 16 | timestamp: 2024-08-14T12:00:58.100905676+05:30 17 | resp: 18 | status_code: 200 19 | header: 20 | Content-Type: application/json 21 | Date: Wed, 14 Aug 2024 06:30:58 GMT 22 | body: '{"id":1,"title":"Learn Spring Boot","description":"Read the Spring Boot documentation and write some sample code","completed":false}' 23 | status_message: OK 24 | proto_major: 0 25 | proto_minor: 0 26 | timestamp: 2024-08-14T12:01:01.141191243+05:30 27 | objects: [] 28 | assertions: 29 | noise: 30 | header.Date: [] 31 | created: 1723617061 32 | curl: | 33 | curl --request GET \ 34 | --url http://localhost:8080/api/todos/1 \ 35 | --header 'User-Agent: curl/7.88.1' \ 36 | --header 'Accept: */*' \ 37 | --header 'Host: localhost:8080' \ 38 | -------------------------------------------------------------------------------- /employee-manager/keploy/test-set-0/tests/test-2.yaml: -------------------------------------------------------------------------------- 1 | # Generated by Keploy (2.5.2) 2 | version: api.keploy.io/v1beta1 3 | kind: Http 4 | name: test-2 5 | spec: 6 | metadata: {} 7 | req: 8 | method: GET 9 | proto_major: 1 10 | proto_minor: 1 11 | url: http://localhost:8080/api/employees/1 12 | header: 13 | Accept: '*/*' 14 | Host: localhost:8080 15 | User-Agent: curl/8.7.1 16 | body: "" 17 | timestamp: 2025-04-16T15:26:01.73971932Z 18 | resp: 19 | status_code: 200 20 | header: 21 | Content-Type: application/json 22 | Date: Wed, 16 Apr 2025 15:26:01 GMT 23 | body: '{"id":1,"firstName":"Myke","lastName":"Tyson","email":"mt@gmail.com","timestamp":1744817151}' 24 | status_message: OK 25 | proto_major: 0 26 | proto_minor: 0 27 | timestamp: 2025-04-16T15:26:04.868476251Z 28 | objects: [] 29 | assertions: 30 | noise: 31 | header.Date: [] 32 | created: 1744817164 33 | curl: | 34 | curl --request GET \ 35 | --url http://localhost:8080/api/employees/1 \ 36 | --header 'Host: localhost:8080' \ 37 | --header 'User-Agent: curl/8.7.1' \ 38 | --header 'Accept: */*' \ 39 | respType: json 40 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # active profiles config 2 | # 3 | # application use two active profiles 4 | # 5 | # one - for select database 6 | # ------------------------------------------------ 7 | # When using HSQL, use: hsqldb 8 | # When using MySQL, use: mysql 9 | # When using PostgeSQL, use: postgresql 10 | # ------------------------------------------------ 11 | # 12 | # one for select repository layer 13 | # ------------------------------------------------ 14 | # When using Spring jpa, use: jpa 15 | # When using Spring JDBC, use: jdbc 16 | # When using Spring Data JPA, use: spring-data-jpa 17 | # ------------------------------------------------ 18 | 19 | spring.profiles.active=postgresql,spring-data-jpa 20 | 21 | # ------------------------------------------------ 22 | 23 | server.port=9966 24 | server.servlet.context-path=/petclinic/ 25 | 26 | spring.messages.basename=messages/messages 27 | spring.jpa.open-in-view=false 28 | 29 | logging.level.org.springframework=INFO 30 | #logging.level.org.springframework=DEBUG 31 | 32 | #logging.level.org.hibernate.SQL=DEBUG 33 | #logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE 34 | 35 | # enable the desired authentication type 36 | # by default the authentication is disabled 37 | petclinic.security.enable=false 38 | 39 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/specialties/spec-resolver.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | import {Injectable} from '@angular/core'; 20 | import {Specialty} from './specialty'; 21 | 22 | import {SpecialtyService} from './specialty.service'; 23 | import {Observable} from 'rxjs'; 24 | 25 | /** 26 | * @author Vitaliy Fedoriv 27 | */ 28 | 29 | @Injectable() 30 | export class SpecResolver { 31 | 32 | constructor(private specialtyService: SpecialtyService) { } 33 | 34 | resolve(): Observable | Promise | Specialty[] { 35 | return this.specialtyService.getSpecialties(); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/styles/reset.css: -------------------------------------------------------------------------------- 1 | /* http://meyerweb.com/eric/tools/css/reset/ 2 | v2.0 | 20110126 3 | License: none (public domain) 4 | */ 5 | 6 | html, body, div, span, applet, object, iframe, 7 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 8 | a, abbr, acronym, address, big, cite, code, 9 | del, dfn, em, img, ins, kbd, q, s, samp, 10 | small, strike, strong, sub, sup, tt, var, 11 | b, u, i, center, 12 | dl, dt, dd, ol, ul, li, 13 | fieldset, form, label, legend, 14 | table, caption, tbody, tfoot, thead, tr, th, td, 15 | article, aside, canvas, details, embed, 16 | figure, figcaption, footer, header, hgroup, 17 | menu, nav, output, ruby, section, summary, 18 | time, mark, audio, video { 19 | margin: 0; 20 | padding: 0; 21 | border: 0; 22 | font-size: 100%; 23 | font: inherit; 24 | vertical-align: baseline; 25 | } 26 | /* HTML5 display-role reset for older browsers */ 27 | article, aside, details, figcaption, figure, 28 | footer, header, hgroup, menu, nav, section { 29 | display: block; 30 | } 31 | body { 32 | line-height: 1; 33 | } 34 | ol, ul { 35 | list-style: none; 36 | } 37 | blockquote, q { 38 | quotes: none; 39 | } 40 | blockquote:before, blockquote:after, 41 | q:before, q:after { 42 | content: ''; 43 | content: none; 44 | } 45 | table { 46 | border-collapse: collapse; 47 | border-spacing: 0; 48 | } -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/e2e/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | 20 | import { SpringPetclinicAngularPage } from './app.po'; 21 | 22 | describe('spring-petclinic-angular App', () => { 23 | let page: SpringPetclinicAngularPage; 24 | 25 | beforeEach(() => { 26 | page = new SpringPetclinicAngularPage(); 27 | }); 28 | 29 | it('should display app works message', done => { 30 | page.navigateTo(); 31 | // page.getParagraphText() 32 | // .then(msg => expect(msg).toEqual('app works!')) 33 | // .then(done, done.fail); 34 | expect(page.getParagraphText()).toEqual('app works!'); 35 | }); 36 | }); 37 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/service/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.springframework.samples.petclinic.service; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.samples.petclinic.model.User; 5 | import org.springframework.samples.petclinic.model.Role; 6 | import org.springframework.samples.petclinic.repository.UserRepository; 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.transaction.annotation.Transactional; 9 | 10 | @Service 11 | public class UserServiceImpl implements UserService { 12 | 13 | @Autowired 14 | private UserRepository userRepository; 15 | 16 | @Override 17 | @Transactional 18 | public void saveUser(User user) { 19 | 20 | if(user.getRoles() == null || user.getRoles().isEmpty()) { 21 | throw new IllegalArgumentException("User must have at least a role set!"); 22 | } 23 | 24 | for (Role role : user.getRoles()) { 25 | if(!role.getName().startsWith("ROLE_")) { 26 | role.setName("ROLE_" + role.getName()); 27 | } 28 | 29 | if(role.getUser() == null) { 30 | role.setUser(user); 31 | } 32 | } 33 | 34 | userRepository.save(user); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | browsers: ['Chrome', 'ChromeHeadless', 'ChromeHeadlessCI'], 7 | customLaunchers: { 8 | ChromeHeadlessCI: { 9 | base: 'ChromeHeadless', 10 | flags: ['--no-sandbox'] 11 | } 12 | }, 13 | basePath: '', 14 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 15 | plugins: [ 16 | require('karma-jasmine'), 17 | require('karma-chrome-launcher'), 18 | require('karma-jasmine-html-reporter'), 19 | require('karma-coverage-istanbul-reporter'), 20 | require('@angular-devkit/build-angular/plugins/karma') 21 | ], 22 | client:{ 23 | clearContext: false // leave Jasmine Spec Runner output visible in browser 24 | }, 25 | coverageIstanbulReporter: { 26 | dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ], 27 | fixWebpackSourcePaths: true 28 | }, 29 | 30 | reporters: ['progress', 'kjhtml'], 31 | port: 9876, 32 | colors: true, 33 | logLevel: config.LOG_INFO, 34 | autoWatch: true, 35 | browsers: ['Chrome'], 36 | singleRun: false 37 | }); 38 | }; 39 | -------------------------------------------------------------------------------- /spring-boot-xml/naive-spring-boot/keploy/test-set-1/tests/test-1.yaml: -------------------------------------------------------------------------------- 1 | # Generated by Keploy (2-dev) 2 | version: api.keploy.io/v1beta1 3 | kind: Http 4 | name: test-1 5 | spec: 6 | metadata: {} 7 | req: 8 | method: GET 9 | proto_major: 1 10 | proto_minor: 1 11 | url: http://localhost:8080/api/user 12 | header: 13 | Accept: application/xml 14 | Host: localhost:8080 15 | User-Agent: curl/7.88.1 16 | body: "" 17 | timestamp: 2025-03-06T15:41:11.988665142+05:30 18 | resp: 19 | body: 20 | User: 21 | age: "30" 22 | mobile: "0101233333" 23 | name: John Does 24 | status_code: 200 25 | header: 26 | Content-Type: application/xml 27 | Date: Thu, 06 Mar 2025 10:11:12 GMT 28 | status_message: OK 29 | proto_major: 0 30 | proto_minor: 0 31 | timestamp: 2025-03-06T15:41:15.041036767+05:30 32 | objects: [] 33 | assertions: 34 | noise: 35 | header.Date: [] 36 | created: 1741255875 37 | curl: | 38 | curl --request GET \ 39 | --url http://localhost:8080/api/user \ 40 | --header 'Accept: application/xml' \ 41 | --header 'Host: localhost:8080' \ 42 | --header 'User-Agent: curl/7.88.1' \ 43 | respType: xml 44 | -------------------------------------------------------------------------------- /spring-boot-xml/naive-spring-boot/keploy/test-set-1/tests/test-2.yaml: -------------------------------------------------------------------------------- 1 | # Generated by Keploy (2-dev) 2 | version: api.keploy.io/v1beta1 3 | kind: Http 4 | name: test-2 5 | spec: 6 | metadata: {} 7 | req: 8 | method: GET 9 | proto_major: 1 10 | proto_minor: 1 11 | url: http://localhost:8080/api/user 12 | header: 13 | Accept: application/xml 14 | Host: localhost:8080 15 | User-Agent: curl/7.88.1 16 | body: "" 17 | timestamp: 2025-03-06T15:41:16.64255575+05:30 18 | resp: 19 | body: 20 | User: 21 | age: "30" 22 | mobile: "0101233333" 23 | name: John Doe 24 | status_code: 200 25 | header: 26 | Content-Type: application/xml 27 | Date: Thu, 06 Mar 2025 10:11:16 GMT 28 | status_message: OK 29 | proto_major: 0 30 | proto_minor: 0 31 | timestamp: 2025-03-06T15:41:19.740844643+05:30 32 | objects: [] 33 | assertions: 34 | noise: 35 | header.Date: [] 36 | created: 1741255879 37 | curl: | 38 | curl --request GET \ 39 | --url http://localhost:8080/api/user \ 40 | --header 'Accept: application/xml' \ 41 | --header 'Host: localhost:8080' \ 42 | --header 'User-Agent: curl/7.88.1' \ 43 | respType: xml 44 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/js/libs/innersvg.js: -------------------------------------------------------------------------------- 1 | /** 2 | * innerHTML property for SVGElement 3 | * Copyright(c) 2010, Jeff Schiller 4 | * 5 | * Licensed under the Apache License, Version 2 6 | * 7 | * Minor modifications by Chris Price to only polyfill when required. 8 | */ 9 | !function(e){if(e&&!("innerHTML"in e.prototype)){var t=function(e,r){var i=e.nodeType;if(3==i)r.push(e.textContent.replace(/&/,"&").replace(/",">"));else if(1==i){if(r.push("<",e.tagName),e.hasAttributes())for(var n=e.attributes,s=0,o=n.length;s");for(var h=e.childNodes,s=0,o=h.length;s")}else r.push("/>")}else{if(8!=i)throw"Error serializing XML. Unhandled node of type: "+i;r.push("\x3c!--",e.nodeValue,"--\x3e")}};Object.defineProperty(e.prototype,"innerHTML",{get:function(){for(var e=[],r=this.firstChild;r;)t(r,e),r=r.nextSibling;return e.join("")},set:function(e){for(;this.firstChild;)this.removeChild(this.firstChild);try{var t=new DOMParser;t.async=!1,sXML=""+e+"";for(var r=t.parseFromString(sXML,"text/xml").documentElement.firstChild;r;)this.appendChild(this.ownerDocument.importNode(r,!0)),r=r.nextSibling}catch(e){throw new Error("Error parsing XML string")}}})}}((0,eval)("this").SVGElement); -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/test/java/org/springframework/samples/petclinic/service/clinicService/ClinicServiceJdbcTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2013 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.samples.petclinic.service.clinicService; 17 | 18 | import org.springframework.boot.test.context.SpringBootTest; 19 | import org.springframework.test.context.ActiveProfiles; 20 | 21 | /** 22 | *

Integration test using the jdbc profile. 23 | * 24 | * @author Thomas Risberg 25 | * @author Michael Isvy 26 | * @see AbstractClinicServiceTests AbstractClinicServiceTests for more details.

27 | */ 28 | @SpringBootTest 29 | @ActiveProfiles({"jdbc", "hsqldb"}) 30 | class ClinicServiceJdbcTests extends AbstractClinicServiceTests { 31 | 32 | } 33 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/test/resources/application.properties: -------------------------------------------------------------------------------- 1 | # active profiles config 2 | # 3 | # application use two active profiles 4 | # 5 | # one for select repository layer 6 | # ------------------------------------------------ 7 | # When using HSQL, use: hsqldb 8 | # When using MySQL, use: mysql 9 | # When using PostgeSQL, use: postgresql 10 | # ------------------------------------------------ 11 | # 12 | # one - for select database 13 | # ------------------------------------------------ 14 | # When using Spring jpa, use: jpa 15 | # When using Spring JDBC, use: jdbc 16 | # When using Spring Data JPA, use: spring-data-jpa 17 | # ------------------------------------------------ 18 | 19 | spring.profiles.active=hsqldb,spring-data-jpa 20 | 21 | # ------------------------------------------------ 22 | 23 | server.port=9966 24 | server.servlet.context-path=/petclinic/ 25 | spring.jpa.open-in-view=false 26 | 27 | spring.messages.basename=messages/messages 28 | logging.level.org.springframework=INFO 29 | #logging.level.org.springframework=DEBUG 30 | 31 | #logging.level.org.hibernate.SQL=DEBUG 32 | #logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE 33 | 34 | # enable the desired authentication type 35 | # by default the authentication is disabled 36 | security.ignored=/** 37 | basic.authentication.enabled=true 38 | petclinic.security.enable=true 39 | 40 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/repository/springdatajpa/SpringDataPetTypeRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.samples.petclinic.repository.springdatajpa; 18 | 19 | import org.springframework.context.annotation.Profile; 20 | import org.springframework.data.repository.Repository; 21 | import org.springframework.samples.petclinic.model.PetType; 22 | import org.springframework.samples.petclinic.repository.PetTypeRepository; 23 | 24 | /** 25 | * @author Vitaliy Fedoriv 26 | * 27 | */ 28 | 29 | @Profile("spring-data-jpa") 30 | public interface SpringDataPetTypeRepository extends PetTypeRepository, Repository, PetTypeRepositoryOverride { 31 | 32 | } 33 | -------------------------------------------------------------------------------- /user-manager/keploy/test-set-0/tests/test-2.yaml: -------------------------------------------------------------------------------- 1 | version: api.keploy.io/v1beta1 2 | kind: Http 3 | name: test-2 4 | spec: 5 | metadata: {} 6 | req: 7 | method: GET 8 | proto_major: 1 9 | proto_minor: 1 10 | url: http://localhost:8081/api/user/1 11 | header: 12 | Accept: '*/*' 13 | Accept-Encoding: gzip 14 | Host: localhost:8081 15 | User-Agent: curl/8.4.0 16 | body: "" 17 | body_type: "" 18 | timestamp: 2023-11-30T01:03:51.391502092+08:00 19 | resp: 20 | status_code: 200 21 | header: 22 | Content-Type: application/json 23 | Date: Wed, 29 Nov 2023 17:03:51 GMT 24 | body: '{"id":1,"name":"Dan","age":23,"birthday":"2000-1-1"}' 25 | body_type: "" 26 | status_message: "" 27 | proto_major: 0 28 | proto_minor: 0 29 | timestamp: 2023-11-30T01:03:55.298236898+08:00 30 | objects: [] 31 | assertions: 32 | noise: 33 | body.age: [] 34 | body.birthday: [] 35 | header.Date: [] 36 | created: 1701277435 37 | curl: | 38 | curl --request GET \ 39 | --url http://localhost:8081/api/user/1 \ 40 | --header 'Host: localhost:8081' \ 41 | --header 'User-Agent: curl/8.4.0' \ 42 | --header 'Accept: */*' \ 43 | --header 'Accept-Encoding: gzip' \ 44 | -------------------------------------------------------------------------------- /spring-boot-mongo/keploy/test-set-0/tests/test-1.yaml: -------------------------------------------------------------------------------- 1 | version: api.keploy.io/v1beta1 2 | kind: Http 3 | name: test-1 4 | spec: 5 | metadata: {} 6 | req: 7 | method: GET 8 | proto_major: 1 9 | proto_minor: 1 10 | url: http://localhost:8080/potions 11 | header: 12 | Accept: '*/*' 13 | Host: localhost:8080 14 | User-Agent: curl/7.81.0 15 | body: "" 16 | body_type: "" 17 | timestamp: 2023-11-28T18:27:09.657931672+05:30 18 | resp: 19 | status_code: 200 20 | header: 21 | Content-Type: application/json 22 | Date: Tue, 28 Nov 2023 12:57:10 GMT 23 | body: '[{"id":"62f27cad-c9c9-425b-91f0-a6cd26201a00","name":"Strength Potion v2","description":"Enhances the drinker''s physical strength temporarily.","bottle":3,"quantity":150}]' 24 | body_type: "" 25 | status_message: "" 26 | proto_major: 0 27 | proto_minor: 0 28 | timestamp: 2023-11-28T18:27:13.791686894+05:30 29 | objects: [] 30 | assertions: 31 | noise: 32 | body.quantity: [] 33 | header.Date: [] 34 | created: 1701176233 35 | curl: | 36 | curl --request GET \ 37 | --url http://localhost:8080/potions \ 38 | --header 'Host: localhost:8080' \ 39 | --header 'User-Agent: curl/7.81.0' \ 40 | --header 'Accept: */*' \ 41 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/repository/PetTypeRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.samples.petclinic.repository; 18 | 19 | import java.util.Collection; 20 | 21 | import org.springframework.dao.DataAccessException; 22 | import org.springframework.samples.petclinic.model.PetType; 23 | 24 | /** 25 | * @author Vitaliy Fedoriv 26 | * 27 | */ 28 | 29 | public interface PetTypeRepository { 30 | 31 | PetType findById(int id) throws DataAccessException; 32 | 33 | Collection findAll() throws DataAccessException; 34 | 35 | void save(PetType petType) throws DataAccessException; 36 | 37 | void delete(PetType petType) throws DataAccessException; 38 | 39 | } 40 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/styles/stripe.css: -------------------------------------------------------------------------------- 1 | .navbar-default .navbar-brand { 2 | color: #0099e5; 3 | } 4 | 5 | .menu ul.list li a[data-type="chapter-link"], .menu ul.list li.chapter .simple { 6 | color: #939da3; 7 | text-transform: uppercase; 8 | } 9 | 10 | .content h1, .content h2, .content h3, .content h4, .content h5 { 11 | color: #292e31; 12 | font-weight: normal; 13 | } 14 | 15 | .content { 16 | color: #4c555a; 17 | } 18 | 19 | .menu ul.list li.title { 20 | padding: 5px 0; 21 | } 22 | 23 | a { 24 | color: #0099e5; 25 | text-decoration: none; 26 | } 27 | a:hover { 28 | color: #292e31; 29 | text-decoration: none; 30 | } 31 | 32 | .menu ul.list li:nth-child(2) { 33 | margin-top: 0; 34 | } 35 | 36 | .menu ul.list li.title a, .navbar a { 37 | color: #0099e5; 38 | text-decoration: none; 39 | font-size: 16px; 40 | } 41 | 42 | .menu ul.list li a.active { 43 | color: #0099e5; 44 | } 45 | 46 | code { 47 | box-sizing: border-box; 48 | display: inline-block; 49 | padding: 0 5px; 50 | background: #fafcfc; 51 | border-radius: 4px; 52 | color: #b93d6a; 53 | font-size: 13px; 54 | line-height: 20px 55 | } 56 | 57 | pre { 58 | margin: 0; 59 | padding: 12px 12px; 60 | background: #272b2d; 61 | border-radius: 5px; 62 | font-size: 13px; 63 | line-height: 1.5em; 64 | font-weight: 500 65 | } 66 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/vets/vet-resolver.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2018 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; 20 | import {Observable} from 'rxjs'; 21 | import {Injectable} from '@angular/core'; 22 | import {VetService} from './vet.service'; 23 | import {Vet} from './vet'; 24 | 25 | /** 26 | * @author Vitaliy Fedoriv 27 | */ 28 | 29 | @Injectable() 30 | export class VetResolver { 31 | 32 | constructor(private vetService: VetService) { } 33 | 34 | resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable | Promise | Vet { 35 | return this.vetService.getVetById(route.paramMap.get('id')); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | body { 19 | margin: 0; 20 | padding: 0; 21 | display: flex; 22 | flex-direction: column; 23 | min-height: 100vh; 24 | } 25 | 26 | .main-wrapper { 27 | flex: 1; 28 | } 29 | 30 | div.navbar-header { 31 | padding: inherit; 32 | } 33 | 34 | .content-wrapper { 35 | min-height: calc(100% - 8rem); 36 | } 37 | 38 | .footer-wrapper { 39 | background-color: #f8f9fa; 40 | text-align: center; 41 | position: fixed; 42 | bottom: 0; 43 | width: 100%; 44 | height: 8rem; 45 | } 46 | 47 | @media screen and (max-width: 768px) { 48 | .content-wrapper { 49 | margin-bottom: calc(8rem - 30px); 50 | 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/visits/visit-list/visit-list.component.html: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 34 | 35 |
Visit DateDescriptionActions
{{ visit.date }}{{ visit.description }} 31 | 32 | 33 |
36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/repository/springdatajpa/SpringDataSpecialtyRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.samples.petclinic.repository.springdatajpa; 18 | 19 | import org.springframework.context.annotation.Profile; 20 | import org.springframework.data.repository.Repository; 21 | import org.springframework.samples.petclinic.model.Specialty; 22 | import org.springframework.samples.petclinic.repository.SpecialtyRepository; 23 | 24 | 25 | /** 26 | * @author Vitaliy Fedoriv 27 | * 28 | */ 29 | 30 | @Profile("spring-data-jpa") 31 | public interface SpringDataSpecialtyRepository extends SpecialtyRepository, Repository, SpecialtyRepositoryOverride { 32 | 33 | } 34 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/specialties/specialty-add/specialty-add.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

New Specialty

4 |
5 | 8 |
12 | Loading... 13 |
Name is required.
14 |
15 | 16 |
17 |
18 | 19 |
20 | 21 | Name is required 22 |
23 | 24 |
25 |
26 |
27 |
28 |
-------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/repository/SpecialtyRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.samples.petclinic.repository; 18 | 19 | import java.util.Collection; 20 | 21 | import org.springframework.dao.DataAccessException; 22 | import org.springframework.samples.petclinic.model.Specialty; 23 | 24 | /** 25 | * @author Vitaliy Fedoriv 26 | * 27 | */ 28 | 29 | public interface SpecialtyRepository { 30 | 31 | Specialty findById(int id) throws DataAccessException; 32 | 33 | Collection findAll() throws DataAccessException; 34 | 35 | void save(Specialty specialty) throws DataAccessException; 36 | 37 | void delete(Specialty specialty) throws DataAccessException; 38 | 39 | } 40 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/test/java/org/springframework/samples/petclinic/service/userService/AbstractUserServiceTests.java: -------------------------------------------------------------------------------- 1 | package org.springframework.samples.petclinic.service.userService; 2 | 3 | import org.junit.jupiter.api.BeforeEach; 4 | import org.junit.jupiter.api.Test; 5 | import org.mockito.MockitoAnnotations; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.samples.petclinic.model.User; 8 | import org.springframework.samples.petclinic.service.UserService; 9 | 10 | import static org.hamcrest.CoreMatchers.is; 11 | import static org.hamcrest.MatcherAssert.assertThat; 12 | 13 | public abstract class AbstractUserServiceTests { 14 | 15 | @Autowired 16 | private UserService userService; 17 | 18 | @BeforeEach 19 | public void init() { 20 | MockitoAnnotations.openMocks(this); 21 | } 22 | 23 | @Test 24 | public void shouldAddUser() throws Exception { 25 | User user = new User(); 26 | user.setUsername("username"); 27 | user.setPassword("password"); 28 | user.setEnabled(true); 29 | user.addRole("OWNER_ADMIN"); 30 | 31 | userService.saveUser(user); 32 | assertThat(user.getRoles().parallelStream().allMatch(role -> role.getName().startsWith("ROLE_")), is(true)); 33 | assertThat(user.getRoles().parallelStream().allMatch(role -> role.getUser() != null), is(true)); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/repository/springdatajpa/SpringDataVetRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2013 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.samples.petclinic.repository.springdatajpa; 17 | 18 | import org.springframework.context.annotation.Profile; 19 | import org.springframework.data.repository.Repository; 20 | import org.springframework.samples.petclinic.model.Vet; 21 | import org.springframework.samples.petclinic.repository.VetRepository; 22 | 23 | /** 24 | * Spring Data JPA specialization of the {@link VetRepository} interface 25 | * 26 | * @author Michael Isvy 27 | * @since 15.1.2013 28 | */ 29 | 30 | @Profile("spring-data-jpa") 31 | public interface SpringDataVetRepository extends VetRepository, Repository { 32 | } 33 | -------------------------------------------------------------------------------- /spring-boot-xml/naive-spring-boot/src/main/java/com/example/XML/entities/UserList.java: -------------------------------------------------------------------------------- 1 | package com.example.XML.entities; 2 | 3 | import jakarta.xml.bind.annotation.XmlElement; 4 | import jakarta.xml.bind.annotation.XmlRootElement; 5 | import java.util.List; 6 | import java.util.ArrayList; 7 | 8 | @XmlRootElement(name = "UserList") 9 | public class UserList { 10 | 11 | @XmlElement(name = "groupName") 12 | private String groupName; 13 | 14 | @XmlElement(name = "User") 15 | private List users; 16 | 17 | // No-arg constructor required by JAXB 18 | public UserList() { 19 | this.groupName = "Default Group"; // Set a default name 20 | this.users = new ArrayList<>(); 21 | } 22 | 23 | public UserList(String groupName, List users) { 24 | this.groupName = groupName; 25 | this.users = users != null ? users : new ArrayList<>(); 26 | } 27 | 28 | public String getGroupName() { 29 | return groupName; 30 | } 31 | 32 | public void setGroupName(String groupName) { 33 | this.groupName = groupName; 34 | } 35 | 36 | public List getUsers() { 37 | return users; 38 | } 39 | 40 | public void setUsers(List users) { 41 | this.users = users != null ? users : new ArrayList<>(); 42 | } 43 | 44 | public void addUser(User user) { 45 | if (user != null) { 46 | this.users.add(user); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/parts/parts.module.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | /** 20 | * @author Vitaliy Fedoriv 21 | */ 22 | 23 | import {NgModule} from '@angular/core'; 24 | import {CommonModule} from '@angular/common'; 25 | import {FormsModule} from '@angular/forms'; 26 | import {PageNotFoundComponent} from './page-not-found/page-not-found.component'; 27 | import {WelcomeComponent} from './welcome/welcome.component'; 28 | 29 | @NgModule({ 30 | imports: [ 31 | CommonModule, 32 | FormsModule 33 | ], 34 | declarations: [ 35 | PageNotFoundComponent, 36 | WelcomeComponent 37 | ], 38 | exports: [ 39 | PageNotFoundComponent, 40 | WelcomeComponent 41 | ] 42 | 43 | }) 44 | export class PartsModule { 45 | } 46 | 47 | -------------------------------------------------------------------------------- /spring-boot-mongo/keploy/test-set-0/tests/test-3.yaml: -------------------------------------------------------------------------------- 1 | version: api.keploy.io/v1beta1 2 | kind: Http 3 | name: test-3 4 | spec: 5 | metadata: {} 6 | req: 7 | method: GET 8 | proto_major: 1 9 | proto_minor: 1 10 | url: http://localhost:8080/potions/21fac58b-8c6c-4d4a-bef8-0034324bae29 11 | header: 12 | Accept: '*/*' 13 | Host: localhost:8080 14 | User-Agent: curl/7.81.0 15 | body: "" 16 | body_type: "" 17 | timestamp: 2023-11-28T18:28:12.036393267+05:30 18 | resp: 19 | status_code: 200 20 | header: 21 | Content-Type: application/json 22 | Date: Tue, 28 Nov 2023 12:58:12 GMT 23 | body: '{"id":"21fac58b-8c6c-4d4a-bef8-0034324bae29","name":"Strength Potion v2","description":"Enhances the drinker''s physical strength temporarily.","bottle":3,"quantity":150}' 24 | body_type: "" 25 | status_message: "" 26 | proto_major: 0 27 | proto_minor: 0 28 | timestamp: 2023-11-28T18:28:15.914028567+05:30 29 | objects: [] 30 | assertions: 31 | noise: 32 | body.quantity: [] 33 | header.Date: [] 34 | created: 1701176295 35 | curl: | 36 | curl --request GET \ 37 | --url http://localhost:8080/potions/21fac58b-8c6c-4d4a-bef8-0034324bae29 \ 38 | --header 'Host: localhost:8080' \ 39 | --header 'User-Agent: curl/7.81.0' \ 40 | --header 'Accept: */*' \ 41 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | /** 20 | * @author Vitaliy Fedoriv 21 | */ 22 | 23 | import {NgModule} from '@angular/core'; 24 | import {RouterModule, Routes} from '@angular/router'; 25 | import {PageNotFoundComponent} from './parts/page-not-found/page-not-found.component'; 26 | import {WelcomeComponent} from './parts/welcome/welcome.component'; 27 | 28 | const appRoutes: Routes = [ 29 | {path: 'welcome', component: WelcomeComponent}, 30 | {path: '', component: WelcomeComponent}, 31 | {path: '**', component: PageNotFoundComponent} 32 | ]; 33 | 34 | @NgModule({ 35 | imports: [RouterModule.forRoot(appRoutes, {})], 36 | exports: [RouterModule] 37 | }) 38 | 39 | export class AppRoutingModule { 40 | } 41 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/repository/springdatajpa/SpringDataVisitRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.samples.petclinic.repository.springdatajpa; 17 | 18 | import org.springframework.context.annotation.Profile; 19 | import org.springframework.data.repository.Repository; 20 | import org.springframework.samples.petclinic.model.Visit; 21 | import org.springframework.samples.petclinic.repository.VisitRepository; 22 | 23 | /** 24 | * Spring Data JPA specialization of the {@link VisitRepository} interface 25 | * 26 | * @author Michael Isvy 27 | * @author Vitaliy Fedoriv 28 | */ 29 | 30 | @Profile("spring-data-jpa") 31 | public interface SpringDataVisitRepository extends VisitRepository, Repository, VisitRepositoryOverride { 32 | } 33 | -------------------------------------------------------------------------------- /spring-boot-postgres-graphql/src/main/java/com/keploy/springbootpostgresgraphql/controller/BookController.java: -------------------------------------------------------------------------------- 1 | package com.keploy.springbootpostgresgraphql.controller; 2 | 3 | import com.keploy.springbootpostgresgraphql.entity.Author; 4 | import com.keploy.springbootpostgresgraphql.entity.Book; 5 | import com.keploy.springbootpostgresgraphql.repository.AuthorRepository; 6 | import com.keploy.springbootpostgresgraphql.repository.BookRepository; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.graphql.data.method.annotation.Argument; 9 | import org.springframework.graphql.data.method.annotation.QueryMapping; 10 | import org.springframework.stereotype.Controller; 11 | 12 | import java.util.List; 13 | 14 | @Controller 15 | public class BookController { 16 | 17 | @Autowired 18 | BookRepository bookRepository; 19 | @Autowired 20 | AuthorRepository authorRepository; 21 | 22 | @QueryMapping 23 | public Book getBookByName(@Argument String name) { 24 | return bookRepository.findBookByName(name); 25 | } 26 | 27 | @QueryMapping 28 | public List getAllBooks() { 29 | return bookRepository.findAll(); 30 | } 31 | 32 | @QueryMapping 33 | public Author getAuthorById(@Argument int id) { 34 | return authorRepository.findAuthorById(id); 35 | } 36 | 37 | @QueryMapping 38 | public List getAllAuthors() { 39 | return authorRepository.findAll(); 40 | } 41 | 42 | 43 | } 44 | -------------------------------------------------------------------------------- /user-manager/src/main/java/com/example/user/controller/UserController.java: -------------------------------------------------------------------------------- 1 | package com.example.user.controller; 2 | 3 | import com.example.user.model.User; 4 | import com.example.user.service.UserService; 5 | import org.springframework.http.HttpStatus; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.*; 8 | 9 | import javax.validation.Valid; 10 | 11 | @RestController 12 | @RequestMapping("/api/") 13 | public class UserController { 14 | 15 | private final UserService userService; 16 | 17 | public UserController(UserService userService) { 18 | this.userService = userService; 19 | } 20 | 21 | @GetMapping("/user/{id}") 22 | public ResponseEntity getUserById(@PathVariable(value = "id") Long userId) { 23 | return ResponseEntity.ok().body(userService.getUserById(userId)); 24 | } 25 | 26 | @PostMapping("/user") 27 | public User createUser(@RequestBody User user) { 28 | return userService.createUser(user); 29 | } 30 | 31 | @PutMapping("/user/{id}") 32 | public ResponseEntity updateUser(@PathVariable(value = "id") Long userId, @Valid @RequestBody User user) { 33 | return ResponseEntity.ok().body(userService.updateUser(userId, user)); 34 | } 35 | 36 | @DeleteMapping("/user/{id}") 37 | public HttpStatus deleteUser(@PathVariable(value = "id") Long userId) { 38 | userService.deleteUser(userId); 39 | return HttpStatus.OK; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/parts/welcome/welcome.component.css: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | /* Center all HTML components */ 19 | body, html { 20 | height: 100%; 21 | margin: 0; 22 | display: flex; 23 | flex-direction: column; 24 | justify-content: center; 25 | align-items: center; 26 | } 27 | 28 | .container-fluid { 29 | display: flex; 30 | flex-direction: column; 31 | justify-content: center; 32 | align-items: center; 33 | } 34 | 35 | .container.xd-container { 36 | text-align: center; 37 | } 38 | 39 | .row { 40 | display: flex; 41 | justify-content: center; 42 | align-items: center; 43 | } 44 | 45 | .col-md-12 { 46 | text-align: center; 47 | } 48 | 49 | .img-responsive { 50 | display: block; 51 | margin: 0 auto; 52 | } 53 | 54 | .title { 55 | text-align: center; 56 | padding-top: 2rem; 57 | } 58 | -------------------------------------------------------------------------------- /Contributing/How-To-Create-a-Repository.md: -------------------------------------------------------------------------------- 1 | # Create Repository 2 | 3 | A repository contains all of your project's files and each file's revision history. You can discuss and manage your project's work within the repository. Keploy uses repositories to store files, revision history, carry out discussions, manage the project work and accept contributions from our diverse contributors. To get started with creating a repository, please follow these steps: 4 | 5 | If you are a member of the keploy organization, define a new repository: 6 | 7 | - Use a short version of your title as the repository name: keploy/repository-name. 8 | - Use the full title as the description of the repository. 9 | - Make the repository public. 10 | - Instead of initialising it with a README. We can directly select this template repository while creating a new public repo as the base. 11 | - Create your repository. 12 | - If you are not a member of the Keploy organization, the Keploy team will create the repository for you and invite you as an external member to take charge of the project. Follow these steps: 13 | 14 | Navigate to the template repository. 15 | Click Issues. 16 | Click the green button Get Started in the Feature Request box. 17 | Use the title of your project as the title of the requested features. 18 | In the body of the Issue, provide the abstract of your project first. Then follow the template to the extent it is useful and provide as much information as possible. 19 | Attach files, screenshots and/or animated GIFs 20 | Click the green button "Submit New Issue" at the bottom right corner. -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic/repository/jdbc/JdbcPet.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2013 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.samples.petclinic.repository.jdbc; 17 | 18 | import org.springframework.samples.petclinic.model.Pet; 19 | 20 | /** 21 | * Subclass of Pet that carries temporary id properties which are only relevant for a JDBC implementation of the 22 | * PetRepository. 23 | * 24 | * @author Juergen Hoeller 25 | */ 26 | public class JdbcPet extends Pet { 27 | 28 | private int typeId; 29 | 30 | private int ownerId; 31 | 32 | public int getTypeId() { 33 | return this.typeId; 34 | } 35 | 36 | public void setTypeId(int typeId) { 37 | this.typeId = typeId; 38 | } 39 | 40 | public int getOwnerId() { 41 | return this.ownerId; 42 | } 43 | 44 | public void setOwnerId(int ownerId) { 45 | this.ownerId = ownerId; 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/docs/styles/laravel.css: -------------------------------------------------------------------------------- 1 | .navbar-default .navbar-brand { 2 | color: #f4645f; 3 | text-decoration: none; 4 | font-size: 16px; 5 | } 6 | 7 | .menu ul.list li a[data-type="chapter-link"], .menu ul.list li.chapter .simple { 8 | color: #525252; 9 | border-bottom: 1px dashed rgba(0,0,0,.1); 10 | } 11 | 12 | .content h1, .content h2, .content h3, .content h4, .content h5 { 13 | color: #292e31; 14 | font-weight: normal; 15 | } 16 | 17 | .content { 18 | color: #4c555a; 19 | } 20 | 21 | a { 22 | color: #f4645f; 23 | text-decoration: underline; 24 | } 25 | a:hover { 26 | color: #f1362f; 27 | } 28 | 29 | .menu ul.list li:nth-child(2) { 30 | margin-top: 0; 31 | } 32 | 33 | .menu ul.list li.title a { 34 | color: #f4645f; 35 | text-decoration: none; 36 | font-size: 16px; 37 | } 38 | 39 | .menu ul.list li a { 40 | color: #f4645f; 41 | text-decoration: none; 42 | } 43 | .menu ul.list li a.active { 44 | color: #f4645f; 45 | font-weight: bold; 46 | } 47 | 48 | code { 49 | box-sizing: border-box; 50 | display: inline-block; 51 | padding: 0 5px; 52 | background: #f0f2f1; 53 | border-radius: 3px; 54 | color: #b93d6a; 55 | font-size: 13px; 56 | line-height: 20px; 57 | box-shadow: 0 1px 1px rgba(0,0,0,.125); 58 | } 59 | 60 | pre { 61 | margin: 0; 62 | padding: 12px 12px; 63 | background: rgba(238,238,238,.35); 64 | border-radius: 3px; 65 | font-size: 13px; 66 | line-height: 1.5em; 67 | font-weight: 500; 68 | box-shadow: 0 1px 1px rgba(0,0,0,.125); 69 | } 70 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/visits/visits-routing.module.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | /** 20 | * @author Vitaliy Fedoriv 21 | */ 22 | 23 | import {NgModule} from '@angular/core'; 24 | import {RouterModule, Routes} from '@angular/router'; 25 | import {VisitListComponent} from './visit-list/visit-list.component'; 26 | import {VisitEditComponent} from './visit-edit/visit-edit.component'; 27 | import {VisitAddComponent} from './visit-add/visit-add.component'; 28 | 29 | const visitRoutes: Routes = [ 30 | {path: 'visits', component: VisitListComponent}, 31 | {path: 'visits/add', component: VisitAddComponent}, 32 | {path: 'visits/:id/edit', component: VisitEditComponent} 33 | 34 | ]; 35 | 36 | 37 | @NgModule({ 38 | imports: [ 39 | RouterModule.forChild(visitRoutes) 40 | ], 41 | exports: [ 42 | RouterModule 43 | ] 44 | }) 45 | export class VisitsRoutingModule { 46 | } 47 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/pettypes/pettypes-routing.module.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | 20 | /** 21 | * @author Vitaliy Fedoriv 22 | */ 23 | 24 | import {NgModule} from '@angular/core'; 25 | import {RouterModule, Routes} from '@angular/router'; 26 | import {PettypeListComponent} from './pettype-list/pettype-list.component'; 27 | import {PettypeAddComponent} from './pettype-add/pettype-add.component'; 28 | import {PettypeEditComponent} from './pettype-edit/pettype-edit.component'; 29 | 30 | const pettypesRoutes: Routes = [ 31 | {path: 'pettypes', component: PettypeListComponent}, 32 | {path: 'pettypes/add', component: PettypeAddComponent}, 33 | {path: 'pettypes/:id/edit', component: PettypeEditComponent} 34 | ]; 35 | 36 | @NgModule({ 37 | imports: [RouterModule.forChild(pettypesRoutes)], 38 | exports: [RouterModule] 39 | }) 40 | 41 | export class PettypesRoutingModule { 42 | } 43 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/vets/vet.service.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | /* tslint:disable:no-unused-variable */ 20 | 21 | /** 22 | * @author Vitaliy Fedoriv 23 | */ 24 | 25 | import { inject, TestBed, waitForAsync } from '@angular/core/testing'; 26 | import {VetService} from './vet.service'; 27 | import {HttpClient} from '@angular/common/http'; 28 | import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing'; 29 | 30 | describe('VetService', () => { 31 | beforeEach(() => { 32 | TestBed.configureTestingModule({ 33 | // Import the HttpClient mocking services 34 | imports: [HttpClientTestingModule], 35 | providers: [VetService] 36 | }); 37 | }); 38 | 39 | it('should ...', waitForAsync(inject([HttpTestingController], (vetService: VetService, http: HttpClient) => { 40 | expect(vetService).toBeTruthy(); 41 | }))); 42 | }); 43 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/pets/pet.service.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | /* tslint:disable:no-unused-variable */ 20 | 21 | 22 | /** 23 | * @author Vitaliy Fedoriv 24 | */ 25 | 26 | import { inject, TestBed, waitForAsync } from '@angular/core/testing'; 27 | import {PetService} from './pet.service'; 28 | import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing'; 29 | import {HttpClient} from '@angular/common/http'; 30 | 31 | describe('PetService', () => { 32 | beforeEach(() => { 33 | TestBed.configureTestingModule({ 34 | // Import the HttpClient mocking services 35 | imports: [HttpClientTestingModule], 36 | providers: [PetService] 37 | }); 38 | }); 39 | 40 | it('should ...', waitForAsync(inject([HttpTestingController], (petService: PetService, http: HttpClient) => { 41 | expect(petService).toBeTruthy(); 42 | }))); 43 | }); 44 | -------------------------------------------------------------------------------- /spring-petclinic/spring-petclinic-angular/src/app/visits/visit.service.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright 2016-2017 the original author or authors. 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * * you may not use this file except in compliance with the License. 7 | * * 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, software 12 | * * distributed under the License is distributed on an "AS IS" BASIS, 13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * * See the License for the specific language governing permissions and 15 | * * limitations under the License. 16 | * 17 | */ 18 | 19 | /* tslint:disable:no-unused-variable */ 20 | 21 | /** 22 | * @author Vitaliy Fedoriv 23 | */ 24 | 25 | import { inject, TestBed, waitForAsync } from '@angular/core/testing'; 26 | import {VisitService} from './visit.service'; 27 | import {HttpClient} from '@angular/common/http'; 28 | import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing'; 29 | 30 | describe('VisitService', () => { 31 | beforeEach(() => { 32 | TestBed.configureTestingModule({ 33 | // Import the HttpClient mocking services 34 | imports: [HttpClientTestingModule], 35 | providers: [VisitService] 36 | }); 37 | }); 38 | 39 | it('should ...', waitForAsync(inject([HttpTestingController], (visitService: VisitService, http: HttpClient) => { 40 | expect(visitService).toBeTruthy(); 41 | }))); 42 | }); 43 | --------------------------------------------------------------------------------