├── .gitattributes ├── .idea ├── .gitignore ├── compiler.xml ├── discord.xml ├── jarRepositories.xml ├── jpa-buddy.xml ├── misc.xml ├── runConfigurations.xml ├── sqldialects.xml ├── uiDesigner.xml └── vcs.xml ├── Diagram.dwg ├── README.md ├── advertisement-service ├── pom.xml ├── src │ └── main │ │ ├── java │ │ └── com │ │ │ └── pelinhangisi │ │ │ └── advertisementservice │ │ │ ├── AdvertisementServiceApplication.java │ │ │ ├── config │ │ │ ├── RabbitConfig.java │ │ │ └── SpringFoxConfig.java │ │ │ ├── controller │ │ │ └── AdvertisementController.java │ │ │ ├── dto │ │ │ ├── AdvertisementDto.java │ │ │ └── UserRequest.java │ │ │ ├── entity │ │ │ ├── Advertisement.java │ │ │ ├── AdvertisementStatus.java │ │ │ ├── BaseEntityModel.java │ │ │ └── PriorityType.java │ │ │ ├── repository │ │ │ └── AdvertisementRepository.java │ │ │ └── service │ │ │ ├── AdvertisementService.java │ │ │ └── AdvertisementServiceImpl.java │ │ └── resources │ │ ├── advertisements.sql │ │ ├── application.properties │ │ └── banner.txt └── target │ ├── advertisement-service-1.0-SNAPSHOT.jar │ ├── classes │ ├── advertisements.sql │ ├── application.properties │ ├── banner.txt │ └── com │ │ └── pelinhangisi │ │ └── advertisementservice │ │ ├── AdvertisementServiceApplication.class │ │ ├── config │ │ ├── RabbitConfig.class │ │ └── SpringFoxConfig.class │ │ ├── controller │ │ └── AdvertisementController.class │ │ ├── dto │ │ ├── AdvertisementDto$AdvertisementDtoBuilder.class │ │ ├── AdvertisementDto.class │ │ ├── UserRequest$UserRequestBuilder.class │ │ └── UserRequest.class │ │ ├── entity │ │ ├── Advertisement.class │ │ ├── AdvertisementStatus.class │ │ ├── BaseEntityModel.class │ │ └── PriorityType.class │ │ ├── repository │ │ └── AdvertisementRepository.class │ │ └── service │ │ ├── AdvertisementService.class │ │ └── AdvertisementServiceImpl.class │ ├── final-project.jar │ ├── maven-archiver │ └── pom.properties │ └── maven-status │ └── maven-compiler-plugin │ ├── compile │ └── default-compile │ │ ├── createdFiles.lst │ │ └── inputFiles.lst │ └── testCompile │ └── default-testCompile │ └── inputFiles.lst ├── api-gateway ├── pom.xml ├── src │ └── main │ │ ├── java │ │ └── com │ │ │ └── pelinhangisi │ │ │ └── apigateway │ │ │ ├── ApiGatewayApplication.java │ │ │ └── config │ │ │ └── SecurityConfig.java │ │ └── resources │ │ ├── application.properties │ │ └── banner.txt └── target │ ├── api-gateway-1.0-SNAPSHOT.jar │ ├── classes │ ├── application.properties │ ├── banner.txt │ └── com │ │ └── pelinhangisi │ │ └── apigateway │ │ ├── ApiGatewayApplication.class │ │ └── config │ │ └── SecurityConfig.class │ ├── final-project.jar │ ├── maven-archiver │ └── pom.properties │ └── maven-status │ └── maven-compiler-plugin │ ├── compile │ └── default-compile │ │ ├── createdFiles.lst │ │ └── inputFiles.lst │ └── testCompile │ └── default-testCompile │ └── inputFiles.lst ├── discovery-server ├── pom.xml ├── src │ └── main │ │ ├── java │ │ └── com │ │ │ └── pelinhangisi │ │ │ └── discoveryserver │ │ │ ├── DiscoveryServerApplication.java │ │ │ └── config │ │ │ └── SecurityConfig.java │ │ └── resources │ │ ├── application.properties │ │ └── banner.txt └── target │ ├── classes │ ├── application.properties │ ├── banner.txt │ └── com │ │ └── pelinhangisi │ │ └── discoveryserver │ │ ├── DiscoveryServerApplication.class │ │ └── config │ │ └── SecurityConfig.class │ ├── discovery-server-1.0-SNAPSHOT.jar │ ├── final-project.jar │ ├── maven-archiver │ └── pom.properties │ └── maven-status │ └── maven-compiler-plugin │ ├── compile │ └── default-compile │ │ ├── createdFiles.lst │ │ └── inputFiles.lst │ └── testCompile │ └── default-testCompile │ └── inputFiles.lst ├── docs ├── SwaggerDocs.json ├── ornek-post.txt └── realm.json ├── pom.xml ├── reports-service ├── pom.xml ├── src │ └── main │ │ ├── java │ │ └── com │ │ │ └── pelinhangisi │ │ │ └── reportsservice │ │ │ ├── ReportsServiceApplication.java │ │ │ ├── config │ │ │ └── RabbitConfig.java │ │ │ ├── dto │ │ │ └── AdvertisementDto.java │ │ │ ├── entity │ │ │ └── Reports.java │ │ │ ├── repository │ │ │ └── ReportsRepository.java │ │ │ └── service │ │ │ └── ReportsService.java │ │ └── resources │ │ ├── application.properties │ │ └── banner.txt └── target │ ├── classes │ ├── application.properties │ ├── banner.txt │ └── com │ │ └── pelinhangisi │ │ └── reportsservice │ │ ├── ReportsServiceApplication.class │ │ ├── config │ │ └── RabbitConfig.class │ │ ├── dto │ │ ├── AdvertisementDto$AdvertisementDtoBuilder.class │ │ └── AdvertisementDto.class │ │ ├── entity │ │ └── Reports.class │ │ ├── repository │ │ └── ReportsRepository.class │ │ └── service │ │ └── ReportsService.class │ ├── final-project.jar │ ├── maven-archiver │ └── pom.properties │ ├── maven-status │ └── maven-compiler-plugin │ │ ├── compile │ │ └── default-compile │ │ │ ├── createdFiles.lst │ │ │ └── inputFiles.lst │ │ └── testCompile │ │ └── default-testCompile │ │ └── inputFiles.lst │ └── reports-service-1.0-SNAPSHOT.jar └── user-service ├── pom.xml ├── src ├── main │ ├── java │ │ └── com │ │ │ └── pelinhangisi │ │ │ └── userservice │ │ │ ├── UserServiceApplication.java │ │ │ ├── config │ │ │ ├── ModelMapperConfig.java │ │ │ └── SpringFoxConfig.java │ │ │ ├── controller │ │ │ └── UserController.java │ │ │ ├── dto │ │ │ └── UserRequest.java │ │ │ ├── entity │ │ │ └── User.java │ │ │ ├── repository │ │ │ └── UserRepository.java │ │ │ └── service │ │ │ └── UserService.java │ └── resources │ │ ├── application.properties │ │ ├── banner.txt │ │ └── users.sql └── test │ └── java │ └── com │ └── pelinhangisi │ └── userservice │ └── UserServiceApplicationTests.java └── target ├── classes ├── application.properties ├── banner.txt ├── com │ └── pelinhangisi │ │ └── userservice │ │ ├── UserServiceApplication.class │ │ ├── config │ │ ├── ModelMapperConfig.class │ │ └── SpringFoxConfig.class │ │ ├── controller │ │ └── UserController.class │ │ ├── dto │ │ ├── UserRequest$UserRequestBuilder.class │ │ └── UserRequest.class │ │ ├── entity │ │ ├── User$UserBuilder.class │ │ └── User.class │ │ ├── repository │ │ └── UserRepository.class │ │ └── service │ │ └── UserService.class └── users.sql ├── final-project.jar ├── maven-archiver └── pom.properties ├── maven-status └── maven-compiler-plugin │ ├── compile │ └── default-compile │ │ ├── createdFiles.lst │ │ └── inputFiles.lst │ └── testCompile │ └── default-testCompile │ ├── createdFiles.lst │ └── inputFiles.lst ├── test-classes └── com │ └── pelinhangisi │ └── userservice │ └── UserServiceApplicationTests.class └── user-service-1.0-SNAPSHOT.jar /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Editor-based HTTP Client requests 5 | /httpRequests/ 6 | # Datasource local storage ignored files 7 | /dataSources/ 8 | /dataSources.local.xml 9 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /.idea/discord.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | -------------------------------------------------------------------------------- /.idea/jarRepositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | -------------------------------------------------------------------------------- /.idea/jpa-buddy.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 11 | 12 | 13 | 14 | 15 | 16 | 18 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/sqldialects.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/uiDesigner.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Diagram.dwg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/Diagram.dwg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Emlak İlan Sistemi 2 | Emlakjet Java Spring Boot Bootcamp Final Project

3 | 4 | 5 | ## PROJE KONUSU 6 | 7 | Emlak İlan Sistemi 8 | Proje Konusu: 9 | Bir ilan sistemi için, ilan bilgilerini alıp ilan kaydı oluşturan, belli kriterlere göre ilan sorgulamalarının 10 | yapılabildiği restful bir uygulamanın Spring Boot framework kullanılarak yazılması 11 | Gereksinimler: 12 | 13 | - Kullanıcıdan ad-soyad, telefon, email, password bilgileri alınarak, kullanıcı kaydı 14 | yapılmalıdır. 15 | - Kaydedilen kullanıcının sisteme giriş yapabilmesi için bir authentication servisi 16 | bulunmalıdır. 17 | - Sistemde kayıtlı bir yönetici kullanıcı olmalıdır. 18 | - Kullanıcıların ilan kaydı oluşturabildiği ve güncelleyebildiği bir servis bulunmalıdır. 19 | - İlan kaydı oluşturulduktan sonra veya güncellendikten sonra pasif olmalı, yönetici 20 | kullanıcı bu ilanı onaylamalı veya reddedebilmelidir. (Onay için servis bulunmalı bu 21 | servis yalnızca yönetici kullanıcı tarafından çalıştırılabilmelidir.) 22 | - Oluşturulan ve onaylanan son 10 ilanı listeleyen bir servis olmalıdır. 23 | - Yönetici için, pasif ilanların görüntülenebildiği bir servis olmalıdır. (Görüntülenen 24 | ilanları onaylayabilmek için ilan onay urlleri de döndürülebilir.) 25 | - Onaylanan ilanlar message queue ya alınmalıdır. 26 | - Message queue’daki ilanlar raporlama servisi tarafından alınarak her ilan için rapor 27 | oluşturulmalıdır. (“... ilanı … kullanıcısı tarafından … gün önce oluşturulmuştur. İlan 28 | … kere görüntülenmiştir.” Şeklinde bir metin oluşturulup veritabanına kaydedilebilir. 29 | Görüntülenme sayısı için ilan servisinden bilgi alınabilir. Görüntülenme sayısı her 30 | istekte bir artırılabilir. ”) 31 | - Raporlama servisi rapor oluşturmak için bir api sunmalıdır. Ilan id ile istek 32 | yapıldığında oluşturulan rapor güncellenmelidir. 33 | - Uygulama docker üzerinde çalışmalıdır. 34 | - Uygulama mikroservis mimarisi ile gerçekleştirilmeli ve haberleşmede message broker 35 | kullanılmalıdır.
36 | 37 | 38 | nodejs spring postgresql postman 39 | 40 | - [x] Java (Programming Language) 41 | - [x] Spring Boot (Application Platform) 42 | - [x] Spring Data JPA (Data Persistance) 43 | - [x] H2 Database 44 | - [x] Swagger 45 | - [x] RabbitMQ 46 | - [x] Maven 47 | - [x] Spring Security-Authentication (Keycloak) 48 | - [x] Postman 49 | - [x] JUnit ve Mockito (Unit Testing) 50 | - [ ] Docker ...future 51 | 52 | 53 | ## PROJE DIAGRAM 54 | 55 | 56 | ![1](https://user-images.githubusercontent.com/96151920/179437421-333c13ee-64fb-4360-9a15-262254cfc81a.JPG) 57 | ![222](https://user-images.githubusercontent.com/96151920/179439034-13246b18-0fab-43ef-90dc-4c8b8f920db6.JPG) 58 | ![wedwf](https://user-images.githubusercontent.com/96151920/179439066-3ebeb2d6-decf-47d3-a8f6-9c7aac879d67.JPG) 59 | ![4444444](https://user-images.githubusercontent.com/96151920/179439143-14d572b6-e349-421b-b9c4-a2676c23bcd7.JPG) 60 | 61 |
62 | 63 | ## Proje Kullanım Akışı 64 | * İlk etapta Discovery Server ayağa kaldırılır ve böylece Eureka yani bağlı olduğumuz microservislerin ayakta olanlarının portlarını rahat bir şekilde görebiliriz. 65 | 66 | 67 | ![8 eureka](https://user-images.githubusercontent.com/96151920/179439843-07eea857-1c5a-44fe-8846-4dda2d9aa125.JPG) 68 | 69 |
70 | 71 | * İkinci olarak Api-Gateway ayağa kaldırılır ve biz bütün Security sistemimizi burası üzerinden yönetiriz. Security için OAuth2 ve Keycloack kullanmamız gereklidir. Keycloak ilk etapta terminalde 72 | ``` 73 | docker run -p 8181:8080 -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin quay.io/keycloak/keycloak:18.0.2 start-dev 74 | ``` 75 | komutu ile açmamız gerekiyor. http://localhost:8181 üzerinden keycloack kısmına bağlanıp "defaul username" : "admin" / "defaul password" : "admin" olarak giriş yapılır. Arkasından yapılması gereken işlemler ilk etapta "realm" ismi oluşturup "Client" oluşturup Servisler kısmını "On" haline getirip daha sonra Token alıp diğer servislerimize postman üzerinden istek atabilmek adına bu tokenları kullanmayı sağlar. Aynı zamanda application.properties kısmına da token endpoint eklemesi yapılması gerekir. Adım adım fotoğraflar ektedir.
76 | ![k1](https://user-images.githubusercontent.com/96151920/179440484-5942970f-ca44-49eb-88fa-5fbb99ad643e.JPG) 77 | 78 | ![k2](https://user-images.githubusercontent.com/96151920/179440498-c0975d92-1a5a-4f4a-9624-598e267f6715.JPG) 79 | ![oauth2 token alma](https://user-images.githubusercontent.com/96151920/179440604-1813eb68-aabb-4b91-a12b-cfe23ec9ea47.JPG) 80 | ![sasa](https://user-images.githubusercontent.com/96151920/179440632-7d5752ca-ef03-47de-a253-512920cf7841.JPG) 81 | 82 | 83 | ## Swagger Üzerinden Aldığımız Endpointler 84 | 85 | ![sasasasasa](https://user-images.githubusercontent.com/96151920/179439630-acee63d0-e97f-45ae-b299-b059c30604bc.JPG) 86 | 87 | 88 | ![1111](https://user-images.githubusercontent.com/96151920/179439639-d9489e34-77cd-4117-a6f7-c8dccc623c90.JPG) 89 | 90 | 91 | 92 |
93 | 94 | ## Postman Üzerinden Atılan İsteklere Örnekler, Kullanıcı ve İlan Ekleme Üzerine 95 | 96 | * Postman Üzerinde User oluşturup Console kısmında "Kullanıcı {id} ile kaydedildi" mesajı alındı 97 | 98 | ![1 postman signup isteği konsolda new user saved yazısı](https://user-images.githubusercontent.com/96151920/179439363-29a00977-ae84-4d4a-ba9c-93ec534523db.JPG) 99 | 100 | 101 | ![5 token kullanarak get isteği yapabilmemiz](https://user-images.githubusercontent.com/96151920/179439457-0360371c-d8e2-43fd-8787-69094deafa80.JPG) 102 | 103 |

104 | 105 | 106 | ![6 ilan ekleme](https://user-images.githubusercontent.com/96151920/179439524-1fe89941-1cff-4706-bed8-7e2fccf8afae.JPG) 107 | 108 |

109 | 110 | ## Integration Test Altyapısı Denendi Ve Çalıştığı Test Edildi 111 | ![7 test passed](https://user-images.githubusercontent.com/96151920/181358696-a2ebdec2-fc4f-487b-9ebd-16944f028009.JPG) 112 | 113 | 114 |

115 | 116 | # BİRAZ DA "İŞİN KEYİFLİ TARAFLARI"NA DEĞİNELİM 117 | 118 | 119 | ![A1](https://user-images.githubusercontent.com/96151920/179442406-8b28c5ca-7714-4044-afe9-0a0dfcd8c447.JPG) 120 | ![A2](https://user-images.githubusercontent.com/96151920/179442460-8a4f9a3b-8263-4790-bd8d-0205e554af21.JPG) 121 | ![A3](https://user-images.githubusercontent.com/96151920/179442482-0b88cb46-5c42-4f5f-89e4-a3590c0ad09f.JPG) 122 | ![A4](https://user-images.githubusercontent.com/96151920/179442528-3b4505ac-1d49-414f-9004-67870e738950.JPG) 123 | ![A5](https://user-images.githubusercontent.com/96151920/179442548-0447e59b-f54a-41b2-818b-379129a5da9d.JPG) 124 | 125 | -------------------------------------------------------------------------------- /advertisement-service/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | Emlakjet-Final-Project 7 | com.pelinhangisi 8 | 1.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | advertisement-service 13 | 14 | 15 | 17 16 | 17 17 | 18 | 19 | 20 | 21 | 22 | org.springframework.boot 23 | spring-boot-starter-data-jpa 24 | 25 | 26 | org.springframework.boot 27 | spring-boot-starter-web 28 | 29 | 30 | 31 | org.springframework.boot 32 | spring-boot-devtools 33 | runtime 34 | true 35 | 36 | 37 | org.postgresql 38 | postgresql 39 | runtime 40 | 41 | 42 | 43 | org.springframework.boot 44 | spring-boot-starter-amqp 45 | 46 | 47 | 48 | org.springframework.amqp 49 | spring-rabbit-test 50 | test 51 | 52 | 53 | 54 | org.springframework.cloud 55 | spring-cloud-starter-netflix-eureka-client 56 | 57 | 58 | 59 | io.springfox 60 | springfox-swagger2 61 | 3.0.0 62 | 63 | 64 | 65 | io.springfox 66 | springfox-boot-starter 67 | 3.0.0 68 | 69 | 70 | 71 | io.springfox 72 | springfox-swagger-ui 73 | 2.9.2 74 | 75 | 76 | 77 | 78 | 79 | 80 | org.springframework.boot 81 | spring-boot-maven-plugin 82 | 83 | 84 | 85 | org.projectlombok 86 | lombok 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /advertisement-service/src/main/java/com/pelinhangisi/advertisementservice/AdvertisementServiceApplication.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.advertisementservice; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cloud.netflix.eureka.EnableEurekaClient; 6 | 7 | @SpringBootApplication 8 | @EnableEurekaClient 9 | public class AdvertisementServiceApplication { 10 | public static void main(String[] args) { 11 | SpringApplication.run(AdvertisementServiceApplication.class,args); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /advertisement-service/src/main/java/com/pelinhangisi/advertisementservice/config/RabbitConfig.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.advertisementservice.config; 2 | 3 | import org.springframework.amqp.core.Binding; 4 | import org.springframework.amqp.core.BindingBuilder; 5 | import org.springframework.amqp.core.DirectExchange; 6 | import org.springframework.amqp.core.Queue; 7 | import org.springframework.amqp.rabbit.connection.ConnectionFactory; 8 | import org.springframework.amqp.rabbit.core.RabbitTemplate; 9 | import org.springframework.amqp.support.converter.MessageConverter; 10 | import org.springframework.amqp.support.converter.SimpleMessageConverter; 11 | import org.springframework.beans.factory.annotation.Value; 12 | import org.springframework.context.annotation.Bean; 13 | import org.springframework.context.annotation.Configuration; 14 | 15 | @Configuration 16 | public class RabbitConfig { 17 | @Value("${queue.name}") 18 | private String queueName; 19 | 20 | @Value("${spring.rabbitmq.template.exchange}") 21 | private String topicExchangeName; 22 | 23 | @Value("${spring.rabbitmq.template.routing-key}") 24 | private String routingName; 25 | 26 | @Bean 27 | public Queue queue() { 28 | return new Queue(queueName, true); 29 | } 30 | 31 | @Bean 32 | DirectExchange directExchange(){ 33 | return new DirectExchange(topicExchangeName); 34 | } 35 | 36 | @Bean 37 | Binding binding(Queue queue, DirectExchange directExchange){ 38 | return BindingBuilder.bind(queue).to(directExchange).with(routingName); 39 | } 40 | 41 | @Bean 42 | MessageConverter messageConverter() { 43 | 44 | return new SimpleMessageConverter(); 45 | } 46 | 47 | 48 | @Bean 49 | RabbitTemplate rabbitTemplate(ConnectionFactory connectionFactory) { 50 | RabbitTemplate rabbitTemplate = new RabbitTemplate(connectionFactory); 51 | rabbitTemplate.setMessageConverter(messageConverter()); 52 | return rabbitTemplate; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /advertisement-service/src/main/java/com/pelinhangisi/advertisementservice/config/SpringFoxConfig.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.advertisementservice.config; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import springfox.documentation.builders.PathSelectors; 6 | import springfox.documentation.builders.RequestHandlerSelectors; 7 | 8 | import springfox.documentation.spi.DocumentationType; 9 | import springfox.documentation.spring.web.plugins.Docket; 10 | 11 | import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc; 12 | 13 | 14 | @Configuration 15 | @EnableSwagger2WebMvc 16 | public class SpringFoxConfig { 17 | @Bean 18 | public Docket api() { 19 | return new Docket(DocumentationType.SWAGGER_2) 20 | .select() 21 | .apis(RequestHandlerSelectors.any()) 22 | .paths(PathSelectors.any()) 23 | .build(); 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /advertisement-service/src/main/java/com/pelinhangisi/advertisementservice/controller/AdvertisementController.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.advertisementservice.controller; 2 | 3 | import com.pelinhangisi.advertisementservice.dto.AdvertisementDto; 4 | import com.pelinhangisi.advertisementservice.entity.Advertisement; 5 | import com.pelinhangisi.advertisementservice.service.AdvertisementService; 6 | import lombok.RequiredArgsConstructor; 7 | import org.springframework.data.domain.Page; 8 | import org.springframework.http.ResponseEntity; 9 | import org.springframework.web.bind.annotation.*; 10 | 11 | import java.awt.print.Pageable; 12 | import java.util.Optional; 13 | 14 | @RestController 15 | @RequestMapping("/api/v1/advertisement") 16 | @RequiredArgsConstructor 17 | public class AdvertisementController { 18 | 19 | private final AdvertisementService advertisementService; 20 | 21 | @PostMapping("/create") 22 | public ResponseEntity createAdvertisement(@RequestBody AdvertisementDto advertisementDto){ 23 | return ResponseEntity.ok(advertisementService.save(advertisementDto)); 24 | } 25 | 26 | @PutMapping("/update") 27 | public ResponseEntity> updateAdvertisement(@PathVariable String id, @RequestBody AdvertisementDto advertisementDto){ 28 | return ResponseEntity.ok(advertisementService.update(id, advertisementDto)); 29 | } 30 | 31 | @GetMapping("/getlist") 32 | public ResponseEntity> getAll(Pageable pageable){ 33 | return ResponseEntity.ok(advertisementService.getPagination(pageable)); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /advertisement-service/src/main/java/com/pelinhangisi/advertisementservice/dto/AdvertisementDto.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.advertisementservice.dto; 2 | 3 | 4 | import lombok.AllArgsConstructor; 5 | import lombok.Builder; 6 | import lombok.Data; 7 | import lombok.NoArgsConstructor; 8 | 9 | import java.io.Serializable; 10 | import java.math.BigDecimal; 11 | import java.time.LocalDateTime; 12 | 13 | 14 | @Data 15 | @Builder 16 | @NoArgsConstructor 17 | @AllArgsConstructor 18 | public class AdvertisementDto implements Serializable { 19 | 20 | private String id; 21 | private String title; 22 | private String description; 23 | private BigDecimal price; 24 | private String assignee; 25 | private LocalDateTime advertisementDate; 26 | private String priorityType; 27 | private String advertisementStatus; 28 | private String userId; 29 | } 30 | -------------------------------------------------------------------------------- /advertisement-service/src/main/java/com/pelinhangisi/advertisementservice/dto/UserRequest.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.advertisementservice.dto; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Builder; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | 8 | 9 | @Data 10 | @AllArgsConstructor 11 | @NoArgsConstructor 12 | @Builder 13 | public class UserRequest { 14 | private String id; 15 | private String username; 16 | private String firstname; 17 | private String lastname; 18 | private String email; 19 | } 20 | -------------------------------------------------------------------------------- /advertisement-service/src/main/java/com/pelinhangisi/advertisementservice/entity/Advertisement.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.advertisementservice.entity; 2 | 3 | import lombok.*; 4 | import org.hibernate.annotations.GenericGenerator; 5 | 6 | import javax.persistence.*; 7 | import java.math.BigDecimal; 8 | import java.time.LocalDateTime; 9 | 10 | 11 | 12 | @Entity 13 | @Table(name= "advertisements") 14 | @EqualsAndHashCode(of = "id") 15 | @NoArgsConstructor 16 | @AllArgsConstructor 17 | public class Advertisement extends BaseEntityModel { 18 | @Id 19 | @Getter 20 | @GeneratedValue(generator = "UUID") 21 | @GenericGenerator(name= "UUID", strategy = "org.hibernate.id.UUIDGenerator") 22 | @Column(name = "id") 23 | private String id; 24 | 25 | @Getter 26 | @Setter 27 | @Column(name = "title", length = 50) 28 | private String title; 29 | 30 | @Getter 31 | @Setter 32 | @Column(name = "description", length = 5000) 33 | private String description; 34 | 35 | @Getter 36 | @Setter 37 | @Column(name = "price") 38 | private BigDecimal price; 39 | 40 | @Getter 41 | @Setter 42 | @Column(name = "assignee", length = 50) 43 | private String assignee; 44 | 45 | @Getter 46 | @Setter 47 | @Column(name = "advertisement_date") 48 | private LocalDateTime advertisementDate; 49 | 50 | @Getter 51 | @Setter 52 | @Enumerated(EnumType.ORDINAL) 53 | @Column(name = "priority_type") 54 | private PriorityType priorityType; 55 | 56 | @Getter 57 | @Setter 58 | @Enumerated(EnumType.ORDINAL) 59 | @Column(name = "advertisement_status") 60 | private AdvertisementStatus advertisementStatus; 61 | 62 | 63 | 64 | 65 | } 66 | -------------------------------------------------------------------------------- /advertisement-service/src/main/java/com/pelinhangisi/advertisementservice/entity/AdvertisementStatus.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.advertisementservice.entity; 2 | 3 | import lombok.Getter; 4 | 5 | @Getter 6 | public enum AdvertisementStatus { 7 | ACTIVE("Aktif İlan"), 8 | PASSIVE("Pasif İlan"); 9 | 10 | private String label; 11 | AdvertisementStatus(String label){ 12 | this.label=label; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /advertisement-service/src/main/java/com/pelinhangisi/advertisementservice/entity/BaseEntityModel.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.advertisementservice.entity; 2 | 3 | import org.springframework.data.annotation.CreatedDate; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.MappedSuperclass; 7 | import java.io.Serializable; 8 | import java.util.Date; 9 | 10 | @MappedSuperclass 11 | public abstract class BaseEntityModel implements Serializable { 12 | 13 | @CreatedDate 14 | @Column(name = "created_at") 15 | private Date createdAt; 16 | 17 | @Column(name = "updated_at") 18 | private Date updatedAt; 19 | } 20 | -------------------------------------------------------------------------------- /advertisement-service/src/main/java/com/pelinhangisi/advertisementservice/entity/PriorityType.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.advertisementservice.entity; 2 | 3 | import lombok.Getter; 4 | 5 | @Getter 6 | public enum PriorityType { 7 | URGENT ("Acil"), 8 | LOW ("Düşük Öncelikli"), 9 | HIGH ("Yüksek Öncelikli"); 10 | 11 | private String label; 12 | PriorityType(String label){ 13 | this.label=label; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /advertisement-service/src/main/java/com/pelinhangisi/advertisementservice/repository/AdvertisementRepository.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.advertisementservice.repository; 2 | 3 | import com.pelinhangisi.advertisementservice.entity.Advertisement; 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 AdvertisementRepository extends JpaRepository { 11 | 12 | List findFirst10ByOrderByCreatedAtDesc(); 13 | } 14 | -------------------------------------------------------------------------------- /advertisement-service/src/main/java/com/pelinhangisi/advertisementservice/service/AdvertisementService.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.advertisementservice.service; 2 | 3 | import com.pelinhangisi.advertisementservice.dto.AdvertisementDto; 4 | import com.pelinhangisi.advertisementservice.entity.Advertisement; 5 | import org.springframework.data.domain.Page; 6 | 7 | import java.awt.print.Pageable; 8 | import java.util.List; 9 | import java.util.Optional; 10 | 11 | 12 | public interface AdvertisementService { 13 | 14 | void createAdvertisement(AdvertisementDto advertisementDto); 15 | 16 | AdvertisementDto save(AdvertisementDto advertisementDto); 17 | 18 | Optional update(String id, AdvertisementDto AdvertisementDto); 19 | 20 | Optional getById(String advertisementId); 21 | 22 | List findFirst10ByOrderByCreatedAtDesc(AdvertisementDto advertisementDto); 23 | 24 | Page getPagination(Pageable pageable); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /advertisement-service/src/main/java/com/pelinhangisi/advertisementservice/service/AdvertisementServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.advertisementservice.service; 2 | 3 | import com.pelinhangisi.advertisementservice.dto.AdvertisementDto; 4 | import com.pelinhangisi.advertisementservice.entity.Advertisement; 5 | import com.pelinhangisi.advertisementservice.entity.AdvertisementStatus; 6 | import com.pelinhangisi.advertisementservice.entity.PriorityType; 7 | import com.pelinhangisi.advertisementservice.repository.AdvertisementRepository; 8 | import lombok.RequiredArgsConstructor; 9 | import lombok.extern.slf4j.Slf4j; 10 | import org.springframework.amqp.core.Queue; 11 | import org.springframework.amqp.rabbit.core.RabbitTemplate; 12 | import org.springframework.data.domain.Page; 13 | import org.springframework.stereotype.Service; 14 | import org.springframework.transaction.annotation.Transactional; 15 | 16 | import java.awt.print.Pageable; 17 | import java.time.LocalDateTime; 18 | import java.util.List; 19 | import java.util.Optional; 20 | 21 | @Service 22 | @RequiredArgsConstructor 23 | @Slf4j 24 | public class AdvertisementServiceImpl implements AdvertisementService{ 25 | 26 | private final AdvertisementRepository advertisementRepository; 27 | private final RabbitTemplate rabbitTemplate; 28 | private final Queue queue; 29 | 30 | 31 | @Override 32 | @Transactional 33 | public AdvertisementDto save(AdvertisementDto advertisementDto) { 34 | //advertisement entity 35 | if(advertisementDto.getDescription() == null) 36 | throw new IllegalArgumentException("Description can not be null"); 37 | 38 | Advertisement advertisement = new Advertisement(); 39 | advertisement.setDescription(advertisementDto.getDescription()); 40 | advertisement.setAdvertisementDate(advertisementDto.getAdvertisementDate()); 41 | advertisement.setTitle(advertisementDto.getTitle()); 42 | advertisement.setPrice(advertisementDto.getPrice()); 43 | advertisement.setAdvertisementStatus(AdvertisementStatus.valueOf(advertisementDto.getAdvertisementStatus())); 44 | advertisement.setPriorityType(PriorityType.valueOf(advertisementDto.getPriorityType())); 45 | log.info("New advertisement added {}", advertisement.getAdvertisementDate()); 46 | advertisement = advertisementRepository.save(advertisement); // postgresql db ye kaydedildi 47 | //oluşan nesne döner 48 | advertisementDto.setId(advertisement.getId()); 49 | return advertisementDto; 50 | } 51 | 52 | 53 | @Override 54 | @Transactional 55 | public Optional update(String id , AdvertisementDto advertisementDto) { 56 | return advertisementRepository.findById(id).map(item -> { 57 | item.setAssignee(advertisementDto.getAssignee()); 58 | item.setPrice(advertisementDto.getPrice()); 59 | item.setTitle(advertisementDto.getTitle()); 60 | item.setPriorityType(PriorityType.valueOf(advertisementDto.getPriorityType())); 61 | item.setAdvertisementStatus(AdvertisementStatus.valueOf(advertisementDto.getAdvertisementStatus())); 62 | return advertisementRepository.save(item); 63 | }); 64 | } 65 | 66 | @Override 67 | public Optional getById(String advertisementId) { 68 | return advertisementRepository.findById(advertisementId); 69 | } 70 | 71 | @Override 72 | public List findFirst10ByOrderByCreatedAtDesc(AdvertisementDto advertisementDto) { 73 | return advertisementRepository.findFirst10ByOrderByCreatedAtDesc(); 74 | } 75 | 76 | @Override 77 | public Page getPagination(Pageable pageable) { 78 | return null; 79 | } 80 | 81 | 82 | @Override 83 | public void createAdvertisement(AdvertisementDto advertisementDto) { 84 | Advertisement advertisement = new Advertisement(); 85 | advertisement.setPriorityType(PriorityType.URGENT); 86 | advertisement.setAdvertisementStatus(AdvertisementStatus.ACTIVE); 87 | advertisement.setAdvertisementDate(LocalDateTime.now()); 88 | advertisement.setPrice(advertisementDto.getPrice()); 89 | advertisement.setTitle(advertisementDto.getTitle()); 90 | advertisementRepository.save(advertisement); 91 | 92 | rabbitTemplate.convertAndSend(queue.getName(), advertisementDto); 93 | 94 | } 95 | } 96 | 97 | 98 | -------------------------------------------------------------------------------- /advertisement-service/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | server.port= 7071 2 | 3 | spring.datasource.url = jdbc:postgresql://localhost:5432/advertisement-service 4 | spring.datasource.username= postgres 5 | spring.datasource.password= postgres 6 | spring.jpa.properties.hibernate.dialect= org.hibernate.dialect.PostgreSQLDialect 7 | spring.jpa.hibernate.ddl-auto=update 8 | spring.datasource.driver-class-name=org.postgresql.Driver 9 | 10 | queue.name = advertisement-queue 11 | 12 | spring.rabbitmq.template.exchange=advertisement-exchange 13 | spring.rabbitmq.template.routing-key=advertisement-routing 14 | 15 | eureka.client.serviceUrl.defaultZone= http://eureka:password@localhost:8761/eureka 16 | spring.application.name=advertisement-service 17 | -------------------------------------------------------------------------------- /advertisement-service/src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | ,--. ,--. ,--. ,--. 2 | ,--,--. ,-| | ,--. ,--. ,---. ,--.--. ,-' '-. `--' ,---. ,---. ,--,--,--. ,---. ,--,--, ,-' '-. 3 | ' ,-. | ' .-. | \ `' / | .-. : | .--' '-. .-' ,--. ( .-' | .-. : | | | .-. : | \ '-. .-' 4 | \ '-' | \ `-' | \ / \ --. | | | | | | .-' `) \ --. | | | | \ --. | || | | | 5 | `--`--' `---' `--' `----' `--' `--' `--' `----' `----' `--`--`--' `----' `--''--' `--' -------------------------------------------------------------------------------- /advertisement-service/target/advertisement-service-1.0-SNAPSHOT.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/advertisement-service/target/advertisement-service-1.0-SNAPSHOT.jar -------------------------------------------------------------------------------- /advertisement-service/target/classes/advertisements.sql: -------------------------------------------------------------------------------- 1 | create table advertisements ( 2 | title VARCHAR(50), 3 | description VARCHAR(50), 4 | price VARCHAR(50), 5 | assignee VARCHAR(50), 6 | priority_type INT, 7 | advertisement_status INT, 8 | created_at DATE, 9 | updated_at DATE, 10 | advertisement_date DATE 11 | ); 12 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Web Designer I', 'Mozilla/5.0 (Windows NT 6.1; rv:15.0) Gecko/20120716 Firefox/15.0a2', '$5.54', 'Innotype', 1, 1, '9/10/2021', '9/30/2021', '12/24/2021'); 13 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Marketing Manager', 'Mozilla/5.0 (Windows NT 5.2) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 Safari/534.30', '$2.61', 'Thoughtworks', 2, 2, '7/31/2021', '5/20/2022', '4/18/2022'); 14 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Marketing Assistant', 'Mozilla/5.0 (Windows NT 7.1) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 Safari/534.30', '$3.00', 'Tekfly', 3, 3, '9/7/2021', '1/23/2022', '1/29/2022'); 15 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('General Manager', 'Mozilla/5.0 (X11; CrOS i686 1193.158.0) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7', '$2.42', 'Vidoo', 4, 4, '7/13/2022', '7/8/2022', '2/27/2022'); 16 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Financial Analyst', 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.43 Safari/534.24', '$7.35', 'Topicstorm', 5, 5, '10/5/2021', '10/10/2021', '3/19/2022'); 17 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Senior Quality Engineer', 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0 Safari/533.16', '$1.28', 'Riffpath', 6, 6, '2/13/2022', '12/24/2021', '2/26/2022'); 18 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Help Desk Operator', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.803.0 Safari/535.1', '$6.17', 'Bubblemix', 7, 7, '8/4/2021', '4/2/2022', '10/19/2021'); 19 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Software Engineer I', 'Mozilla/5.0 (Windows; U; Windows NT 6.1; sv-SE) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4', '$2.16', 'Oyonder', 8, 8, '5/12/2022', '2/12/2022', '10/2/2021'); 20 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Product Engineer', 'Mozilla/5.0 (Windows NT 5.2) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.813.0 Safari/535.1', '$2.16', 'Tanoodle', 9, 9, '9/8/2021', '2/3/2022', '5/29/2022'); 21 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Programmer Analyst I', 'Mozilla/5.0 (Windows NT 6.0; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.699.0 Safari/534.24', '$1.29', 'Einti', 10, 10, '8/1/2021', '3/28/2022', '12/29/2021'); 22 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Financial Analyst', 'Mozilla/5.0 (Windows NT 5.2; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.41 Safari/535.1', '$1.63', 'Yotz', 11, 11, '3/2/2022', '1/2/2022', '1/14/2022'); 23 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Food Chemist', 'Mozilla/5.0 (Windows; U; Windows NT 6.0; fr-FR) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5', '$4.01', 'Skaboo', 12, 12, '8/7/2021', '12/29/2021', '11/10/2021'); 24 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Payment Adjustment Coordinator', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_0) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.803.0 Safari/535.1', '$8.18', 'Voolith', 13, 13, '10/17/2021', '12/23/2021', '8/15/2021'); 25 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Quality Control Specialist', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.810.0 Safari/535.1', '$6.15', 'Bubblebox', 14, 14, '3/28/2022', '6/3/2022', '4/7/2022'); 26 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Account Representative II', 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_1 like Mac OS X; zh-tw) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8G4 Safari/6533.18.5', '$1.88', 'Trilith', 15, 15, '10/3/2021', '6/4/2022', '11/21/2021'); 27 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Occupational Therapist', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.824.0 Safari/535.1', '$6.88', 'Quinu', 16, 16, '4/22/2022', '12/14/2021', '9/17/2021'); 28 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Recruiter', 'Mozilla/6.0 (Windows NT 6.2; WOW64; rv:16.0.1) Gecko/20121011 Firefox/16.0.1', '$4.89', 'Twitterlist', 17, 17, '8/18/2021', '12/23/2021', '8/28/2021'); 29 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Administrative Assistant III', 'Mozilla/5.0 (iPad; CPU OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko ) Version/5.1 Mobile/9B176 Safari/7534.48.3', '$9.43', 'Skinix', 18, 18, '5/8/2022', '10/10/2021', '6/11/2022'); 30 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Nuclear Power Engineer', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1062.0 Safari/536.3', '$2.67', 'Avamm', 19, 19, '4/18/2022', '12/9/2021', '10/9/2021'); 31 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Technical Writer', 'Mozilla/5.0 (X11; CrOS i686 12.0.742.91) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.93 Safari/534.30', '$6.10', 'Kwilith', 20, 20, '10/23/2021', '2/28/2022', '11/27/2021'); 32 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Legal Assistant', 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; HTC-P715a; en-ca) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16', '$7.46', 'Jabberstorm', 21, 21, '8/3/2021', '5/11/2022', '5/11/2022'); 33 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Information Systems Manager', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19', '$5.15', 'Dynava', 22, 22, '8/6/2021', '2/25/2022', '4/13/2022'); 34 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Nurse Practicioner', 'Mozilla/5.0 (X11; U; Linux armv7l; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16', '$5.81', 'Skyba', 23, 23, '11/13/2021', '6/18/2022', '8/6/2021'); 35 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Information Systems Manager', 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36', '$0.55', 'Brainsphere', 24, 24, '1/20/2022', '12/31/2021', '5/11/2022'); 36 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Financial Analyst', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36', '$1.56', 'Brightdog', 25, 25, '7/1/2022', '2/10/2022', '12/17/2021'); 37 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Account Coordinator', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36', '$2.68', 'Yabox', 26, 26, '7/1/2022', '8/28/2021', '3/21/2022'); 38 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('VP Marketing', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Ubuntu/10.10 Chromium/14.0.808.0 Chrome/14.0.808.0 Safari/535.1', '$4.99', 'Topdrive', 27, 27, '11/23/2021', '11/5/2021', '6/11/2022'); 39 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Desktop Support Technician', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1623.0 Safari/537.36', '$6.98', 'Topicware', 28, 28, '9/24/2021', '6/30/2022', '10/2/2021'); 40 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Paralegal', 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.113 Safari/534.30', '$2.20', 'Bubblemix', 29, 29, '5/2/2022', '1/21/2022', '7/27/2021'); 41 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Registered Nurse', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.65 Safari/535.11', '$6.86', 'Wikizz', 30, 30, '4/25/2022', '3/15/2022', '4/27/2022'); 42 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Technical Writer', 'Mozilla/5.0 (iPod; U; CPU iPhone OS 4_2_1 like Mac OS X; he-il) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5', '$4.87', 'Bluejam', 31, 31, '1/16/2022', '10/4/2021', '8/27/2021'); 43 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Research Nurse', 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; ja-jp) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27', '$4.92', 'Feedfire', 32, 32, '5/12/2022', '10/4/2021', '9/17/2021'); 44 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Senior Sales Associate', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.2 (KHTML, like Gecko) Ubuntu/11.04 Chromium/15.0.871.0 Chrome/15.0.871.0 Safari/535.2', '$2.97', 'Photospace', 33, 33, '9/15/2021', '2/16/2022', '11/17/2021'); 45 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Structural Engineer', 'Mozilla/5.0 (Windows NT 6.0; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.699.0 Safari/534.24', '$8.19', 'Flipopia', 34, 34, '9/4/2021', '6/26/2022', '8/25/2021'); 46 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Registered Nurse', 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20120101 Firefox/29.0', '$5.72', 'Oodoo', 35, 35, '7/10/2022', '6/21/2022', '5/9/2022'); 47 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Technical Writer', 'Mozilla/5.0 (Windows NT 6.4; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2225.0 Safari/537.36', '$9.86', 'Trilith', 36, 36, '11/3/2021', '1/21/2022', '7/27/2021'); 48 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Biostatistician II', 'Mozilla/5.0 (X11; Linux x86_64; rv:28.0) Gecko/20100101 Firefox/28.0', '$8.86', 'Meedoo', 37, 37, '5/10/2022', '8/14/2021', '1/21/2022'); 49 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Assistant Professor', 'Mozilla/5.0 (Windows NT 5.1; rv:21.0) Gecko/20130331 Firefox/21.0', '$4.39', 'Zoonoodle', 38, 38, '4/25/2022', '2/26/2022', '4/4/2022'); 50 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Account Coordinator', 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.11 (KHTML, like Gecko) Ubuntu/11.10 Chromium/17.0.963.65 Chrome/17.0.963.65 Safari/535.11', '$3.34', 'Oodoo', 39, 39, '11/7/2021', '3/6/2022', '4/18/2022'); 51 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Research Associate', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.24 (KHTML, like Gecko) Ubuntu/10.10 Chromium/12.0.703.0 Chrome/12.0.703.0 Safari/534.24', '$4.90', 'Quatz', 40, 40, '1/26/2022', '3/1/2022', '7/17/2021'); 52 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Director of Sales', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.6 (KHTML, like Gecko) Chrome/20.0.1092.0 Safari/536.6', '$5.27', 'Skimia', 41, 41, '2/5/2022', '8/24/2021', '4/13/2022'); 53 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Human Resources Assistant I', 'Mozilla/5.0 (X11; Linux i586; rv:31.0) Gecko/20100101 Firefox/31.0', '$9.86', 'Eadel', 42, 42, '6/28/2022', '8/4/2021', '7/13/2022'); 54 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Junior Executive', 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.41 Safari/535.1', '$2.46', 'Dabvine', 43, 43, '10/15/2021', '7/21/2021', '6/9/2022'); 55 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Librarian', 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko Firefox/11.0', '$0.26', 'Muxo', 44, 44, '12/10/2021', '11/6/2021', '3/9/2022'); 56 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Tax Accountant', 'Mozilla/5.0 (Windows; U; Windows NT 6.0; tr-TR) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5', '$6.99', 'Flashpoint', 45, 45, '7/31/2021', '2/19/2022', '8/10/2021'); 57 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Health Coach IV', 'Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US) AppleWebKit/533.17.8 (KHTML, like Gecko) Version/5.0.1 Safari/533.17.8', '$4.31', 'Babbleset', 46, 46, '5/12/2022', '7/9/2022', '9/10/2021'); 58 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Paralegal', 'Mozilla/5.0 (Windows; U; Windows NT 6.1; es-ES) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0 Safari/533.16', '$6.95', 'Skinte', 47, 47, '12/22/2021', '11/3/2021', '6/26/2022'); 59 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Account Representative I', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.1 Safari/537.36', '$1.00', 'Edgetag', 48, 48, '10/25/2021', '1/16/2022', '3/29/2022'); 60 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Operator', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.12 Safari/534.24', '$2.43', 'BlogXS', 49, 49, '3/25/2022', '1/12/2022', '3/2/2022'); 61 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Administrative Assistant III', 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.6 Safari/537.11', '$0.48', 'Meedoo', 50, 50, '8/25/2021', '4/15/2022', '1/22/2022'); 62 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Internal Auditor', 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1866.237 Safari/537.36', '$0.51', 'Zooxo', 51, 51, '1/25/2022', '1/17/2022', '6/21/2022'); 63 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Research Assistant II', 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20081212 Mozilla/5.0 (Windows; U; Windows NT 5.1; en) AppleWebKit/526.9 (KHTML, like Gecko) Version/4.0dp1 Safari/526.8', '$3.15', 'Skinix', 52, 52, '1/31/2022', '8/5/2021', '2/2/2022'); 64 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Design Engineer', 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; ja-jp) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27', '$9.59', 'Zoombeat', 53, 53, '1/29/2022', '11/5/2021', '8/28/2021'); 65 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Geologist II', 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11', '$6.37', 'Gabcube', 54, 54, '5/4/2022', '2/16/2022', '11/9/2021'); 66 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Marketing Assistant', 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.35 (KHTML, like Gecko) Ubuntu/10.10 Chromium/13.0.764.0 Chrome/13.0.764.0 Safari/534.35', '$9.37', 'Realmix', 55, 55, '1/13/2022', '1/6/2022', '1/25/2022'); 67 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Senior Quality Engineer', 'Mozilla/5.0 (Windows NT 6.1; rv:15.0) Gecko/20120716 Firefox/15.0a2', '$4.22', 'Blogtag', 56, 56, '7/18/2021', '9/7/2021', '3/17/2022'); 68 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Senior Quality Engineer', 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.13 (KHTML, like Gecko) Chrome/24.0.1284.0 Safari/537.13', '$8.08', 'Buzzdog', 57, 57, '3/17/2022', '3/27/2022', '12/28/2021'); 69 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Safety Technician III', 'Mozilla/5.0 ArchLinux (X11; U; Linux x86_64; en-US) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.60 Safari/534.30', '$6.52', 'Ooba', 58, 58, '2/18/2022', '7/28/2021', '2/17/2022'); 70 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Recruiting Manager', 'Mozilla/5.0 (X11; CrOS i686 0.13.507) AppleWebKit/534.35 (KHTML, like Gecko) Chrome/13.0.763.0 Safari/534.35', '$3.58', 'Tagtune', 59, 59, '3/20/2022', '7/6/2022', '3/6/2022'); 71 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Civil Engineer', 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; sv-se) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27', '$6.28', 'Kanoodle', 60, 60, '8/8/2021', '9/28/2021', '11/1/2021'); 72 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('VP Accounting', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.24 Safari/535.1', '$8.98', 'Photospace', 61, 61, '6/1/2022', '6/4/2022', '7/12/2022'); 73 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Registered Nurse', 'Chrome/15.0.860.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/15.0.860.0', '$6.35', 'Edgetag', 62, 62, '2/7/2022', '5/26/2022', '5/31/2022'); 74 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Product Engineer', 'Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:27.0) Gecko/20121011 Firefox/27.0', '$3.11', 'Jazzy', 63, 63, '5/8/2022', '2/20/2022', '7/22/2021'); 75 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Accounting Assistant IV', 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11', '$2.92', 'Kwinu', 64, 64, '5/7/2022', '4/14/2022', '5/15/2022'); 76 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Dental Hygienist', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_3) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.32 Safari/535.1', '$5.18', 'Youtags', 65, 65, '7/20/2021', '4/3/2022', '10/29/2021'); 77 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Senior Sales Associate', 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.20 (KHTML, like Gecko) Chrome/11.0.669.0 Safari/534.20', '$2.33', 'Gabvine', 66, 66, '3/29/2022', '10/13/2021', '8/25/2021'); 78 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Account Coordinator', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.47 Safari/537.36', '$2.75', 'Latz', 67, 67, '5/9/2022', '1/20/2022', '5/10/2022'); 79 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Sales Associate', 'Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0', '$7.43', 'Tagpad', 68, 68, '5/30/2022', '1/13/2022', '7/8/2022'); 80 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Accountant II', 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; nb-no) AppleWebKit/533.16 (KHTML, like Gecko) Version/4.1 Safari/533.16', '$4.46', 'Tagpad', 69, 69, '10/28/2021', '4/29/2022', '12/20/2021'); 81 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Clinical Specialist', 'Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:21.0.0) Gecko/20121011 Firefox/21.0.0', '$5.48', 'Yadel', 70, 70, '2/26/2022', '9/13/2021', '10/7/2021'); 82 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Desktop Support Technician', 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.700.3 Safari/534.24', '$9.59', 'Skimia', 71, 71, '12/14/2021', '3/28/2022', '12/8/2021'); 83 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Automation Specialist IV', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20120421 Firefox/11.0', '$8.82', 'Babblestorm', 72, 72, '3/31/2022', '11/5/2021', '4/10/2022'); 84 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Food Chemist', 'Googlebot/2.1 (+http://www.google.com/bot.html)', '$7.32', 'Quinu', 73, 73, '9/23/2021', '7/19/2021', '8/14/2021'); 85 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Account Representative III', 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36', '$7.11', 'Kazu', 74, 74, '8/6/2021', '2/20/2022', '7/25/2021'); 86 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Social Worker', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Ubuntu/10.10 Chromium/17.0.963.65 Chrome/17.0.963.65 Safari/535.11', '$6.49', 'Kazu', 75, 75, '12/5/2021', '4/7/2022', '7/19/2021'); 87 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Financial Analyst', 'Mozilla/5.0 (Windows NT 5.2; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.41 Safari/535.1', '$3.60', 'Camimbo', 76, 76, '5/8/2022', '11/21/2021', '12/24/2021'); 88 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Media Manager I', 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0a2) Gecko/20110613 Firefox/6.0a2', '$4.17', 'Dablist', 77, 77, '6/30/2022', '2/16/2022', '3/10/2022'); 89 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Community Outreach Specialist', 'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4', '$0.66', 'Skyble', 78, 78, '6/19/2022', '6/28/2022', '6/22/2022'); 90 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Software Engineer I', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.1 Safari/537.36', '$9.43', 'Photojam', 79, 79, '12/13/2021', '6/4/2022', '10/18/2021'); 91 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Software Test Engineer III', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_4) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.100 Safari/534.30', '$0.33', 'Brainlounge', 80, 80, '6/10/2022', '3/11/2022', '1/15/2022'); 92 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Engineer IV', 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1062.0 Safari/536.3', '$3.05', 'Shuffletag', 81, 81, '2/15/2022', '8/18/2021', '10/14/2021'); 93 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Professor', 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; zh-cn) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16', '$3.47', 'Skajo', 82, 82, '8/28/2021', '9/19/2021', '3/17/2022'); 94 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Sales Representative', 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; fr) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16', '$4.71', 'Bubblebox', 83, 83, '3/3/2022', '10/6/2021', '5/26/2022'); 95 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Web Designer I', 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; it-it) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27', '$9.51', 'Thoughtblab', 84, 84, '10/1/2021', '11/2/2021', '6/26/2022'); 96 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Environmental Specialist', 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-au) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16', '$5.99', 'Geba', 85, 85, '11/29/2021', '11/15/2021', '8/6/2021'); 97 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Software Consultant', 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1061.1 Safari/536.3', '$0.43', 'Skajo', 86, 86, '3/21/2022', '1/20/2022', '8/20/2021'); 98 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Payment Adjustment Coordinator', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1664.3 Safari/537.36', '$1.45', 'Rhyzio', 87, 87, '7/1/2022', '1/1/2022', '10/14/2021'); 99 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Compensation Analyst', 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.14 Safari/534.24', '$4.42', 'Bubbletube', 88, 88, '11/18/2021', '1/17/2022', '2/14/2022'); 100 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Registered Nurse', 'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:15.0) Gecko/20100101 Firefox/15.0.1', '$8.40', 'Jabbertype', 89, 89, '10/7/2021', '10/24/2021', '8/6/2021'); 101 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Sales Representative', 'Mozilla/5.0 (Windows NT 6.2; rv:22.0) Gecko/20130405 Firefox/22.0', '$3.91', 'Tekfly', 90, 90, '12/20/2021', '10/12/2021', '1/17/2022'); 102 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Junior Executive', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_6) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.12 Safari/534.24', '$9.16', 'Devpulse', 91, 91, '7/12/2022', '10/26/2021', '1/23/2022'); 103 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('VP Quality Control', 'Mozilla/5.0 (Windows NT 6.0) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.20 Safari/535.1', '$2.68', 'Topicware', 92, 92, '5/23/2022', '10/21/2021', '11/24/2021'); 104 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Sales Representative', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.220 Safari/535.1', '$1.64', 'Wordpedia', 93, 93, '5/9/2022', '7/27/2021', '2/18/2022'); 105 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Environmental Specialist', 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.812.0 Safari/535.1', '$5.94', 'Kwimbee', 94, 94, '9/24/2021', '3/20/2022', '3/16/2022'); 106 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Nuclear Power Engineer', 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.815.0 Safari/535.1', '$2.99', 'Photobug', 95, 95, '6/16/2022', '9/19/2021', '7/4/2022'); 107 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Structural Analysis Engineer', 'Mozilla/5.0 (Windows NT 6.0) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.792.0 Safari/535.1', '$6.01', 'Trudoo', 96, 96, '2/5/2022', '7/7/2022', '1/19/2022'); 108 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Senior Cost Accountant', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.8 (KHTML, like Gecko) Chrome/17.0.940.0 Safari/535.8', '$6.41', 'Voomm', 97, 97, '7/28/2021', '2/26/2022', '1/21/2022'); 109 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Account Coordinator', 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11', '$1.27', 'Skimia', 98, 98, '8/26/2021', '8/29/2021', '1/17/2022'); 110 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('Technical Writer', 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.1 (KHTML, like Gecko) Ubuntu/11.04 Chromium/14.0.825.0 Chrome/14.0.825.0 Safari/535.1', '$2.68', 'Eayo', 99, 99, '8/23/2021', '8/25/2021', '9/7/2021'); 111 | insert into advertisements (title, description, price, assignee, priority_type, advertisement_status, created_at, updated_at, advertisement_date) values ('GIS Technical Architect', 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.17 Safari/537.11', '$1.72', 'Jaxbean', 100, 100, '12/2/2021', '11/16/2021', '9/5/2021'); 112 | -------------------------------------------------------------------------------- /advertisement-service/target/classes/application.properties: -------------------------------------------------------------------------------- 1 | server.port= 7071 2 | 3 | spring.datasource.url = jdbc:postgresql://localhost:5432/advertisement-service 4 | spring.datasource.username= postgres 5 | spring.datasource.password= postgres 6 | spring.jpa.properties.hibernate.dialect= org.hibernate.dialect.PostgreSQLDialect 7 | spring.jpa.hibernate.ddl-auto=update 8 | spring.datasource.driver-class-name=org.postgresql.Driver 9 | 10 | queue.name = advertisement-queue 11 | 12 | spring.rabbitmq.template.exchange=advertisement-exchange 13 | spring.rabbitmq.template.routing-key=advertisement-routing 14 | 15 | eureka.client.serviceUrl.defaultZone= http://eureka:password@localhost:8761/eureka 16 | spring.application.name=advertisement-service 17 | -------------------------------------------------------------------------------- /advertisement-service/target/classes/banner.txt: -------------------------------------------------------------------------------- 1 | ,--. ,--. ,--. ,--. 2 | ,--,--. ,-| | ,--. ,--. ,---. ,--.--. ,-' '-. `--' ,---. ,---. ,--,--,--. ,---. ,--,--, ,-' '-. 3 | ' ,-. | ' .-. | \ `' / | .-. : | .--' '-. .-' ,--. ( .-' | .-. : | | | .-. : | \ '-. .-' 4 | \ '-' | \ `-' | \ / \ --. | | | | | | .-' `) \ --. | | | | \ --. | || | | | 5 | `--`--' `---' `--' `----' `--' `--' `--' `----' `----' `--`--`--' `----' `--''--' `--' -------------------------------------------------------------------------------- /advertisement-service/target/classes/com/pelinhangisi/advertisementservice/AdvertisementServiceApplication.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/advertisement-service/target/classes/com/pelinhangisi/advertisementservice/AdvertisementServiceApplication.class -------------------------------------------------------------------------------- /advertisement-service/target/classes/com/pelinhangisi/advertisementservice/config/RabbitConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/advertisement-service/target/classes/com/pelinhangisi/advertisementservice/config/RabbitConfig.class -------------------------------------------------------------------------------- /advertisement-service/target/classes/com/pelinhangisi/advertisementservice/config/SpringFoxConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/advertisement-service/target/classes/com/pelinhangisi/advertisementservice/config/SpringFoxConfig.class -------------------------------------------------------------------------------- /advertisement-service/target/classes/com/pelinhangisi/advertisementservice/controller/AdvertisementController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/advertisement-service/target/classes/com/pelinhangisi/advertisementservice/controller/AdvertisementController.class -------------------------------------------------------------------------------- /advertisement-service/target/classes/com/pelinhangisi/advertisementservice/dto/AdvertisementDto$AdvertisementDtoBuilder.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/advertisement-service/target/classes/com/pelinhangisi/advertisementservice/dto/AdvertisementDto$AdvertisementDtoBuilder.class -------------------------------------------------------------------------------- /advertisement-service/target/classes/com/pelinhangisi/advertisementservice/dto/AdvertisementDto.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/advertisement-service/target/classes/com/pelinhangisi/advertisementservice/dto/AdvertisementDto.class -------------------------------------------------------------------------------- /advertisement-service/target/classes/com/pelinhangisi/advertisementservice/dto/UserRequest$UserRequestBuilder.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/advertisement-service/target/classes/com/pelinhangisi/advertisementservice/dto/UserRequest$UserRequestBuilder.class -------------------------------------------------------------------------------- /advertisement-service/target/classes/com/pelinhangisi/advertisementservice/dto/UserRequest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/advertisement-service/target/classes/com/pelinhangisi/advertisementservice/dto/UserRequest.class -------------------------------------------------------------------------------- /advertisement-service/target/classes/com/pelinhangisi/advertisementservice/entity/Advertisement.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/advertisement-service/target/classes/com/pelinhangisi/advertisementservice/entity/Advertisement.class -------------------------------------------------------------------------------- /advertisement-service/target/classes/com/pelinhangisi/advertisementservice/entity/AdvertisementStatus.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/advertisement-service/target/classes/com/pelinhangisi/advertisementservice/entity/AdvertisementStatus.class -------------------------------------------------------------------------------- /advertisement-service/target/classes/com/pelinhangisi/advertisementservice/entity/BaseEntityModel.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/advertisement-service/target/classes/com/pelinhangisi/advertisementservice/entity/BaseEntityModel.class -------------------------------------------------------------------------------- /advertisement-service/target/classes/com/pelinhangisi/advertisementservice/entity/PriorityType.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/advertisement-service/target/classes/com/pelinhangisi/advertisementservice/entity/PriorityType.class -------------------------------------------------------------------------------- /advertisement-service/target/classes/com/pelinhangisi/advertisementservice/repository/AdvertisementRepository.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/advertisement-service/target/classes/com/pelinhangisi/advertisementservice/repository/AdvertisementRepository.class -------------------------------------------------------------------------------- /advertisement-service/target/classes/com/pelinhangisi/advertisementservice/service/AdvertisementService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/advertisement-service/target/classes/com/pelinhangisi/advertisementservice/service/AdvertisementService.class -------------------------------------------------------------------------------- /advertisement-service/target/classes/com/pelinhangisi/advertisementservice/service/AdvertisementServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/advertisement-service/target/classes/com/pelinhangisi/advertisementservice/service/AdvertisementServiceImpl.class -------------------------------------------------------------------------------- /advertisement-service/target/final-project.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/advertisement-service/target/final-project.jar -------------------------------------------------------------------------------- /advertisement-service/target/maven-archiver/pom.properties: -------------------------------------------------------------------------------- 1 | #Generated by Maven 2 | #Mon Jul 18 06:38:00 MSK 2022 3 | groupId=com.pelinhangisi 4 | artifactId=advertisement-service 5 | version=1.0-SNAPSHOT 6 | -------------------------------------------------------------------------------- /advertisement-service/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | com\pelinhangisi\advertisementservice\dto\UserRequest.class 2 | com\pelinhangisi\advertisementservice\AdvertisementServiceApplication.class 3 | com\pelinhangisi\advertisementservice\service\AdvertisementService.class 4 | com\pelinhangisi\advertisementservice\entity\PriorityType.class 5 | com\pelinhangisi\advertisementservice\entity\AdvertisementStatus.class 6 | com\pelinhangisi\advertisementservice\controller\AdvertisementController.class 7 | com\pelinhangisi\advertisementservice\config\SpringFoxConfig.class 8 | com\pelinhangisi\advertisementservice\service\AdvertisementServiceImpl.class 9 | com\pelinhangisi\advertisementservice\repository\AdvertisementRepository.class 10 | com\pelinhangisi\advertisementservice\entity\BaseEntityModel.class 11 | com\pelinhangisi\advertisementservice\dto\UserRequest$UserRequestBuilder.class 12 | com\pelinhangisi\advertisementservice\entity\Advertisement.class 13 | com\pelinhangisi\advertisementservice\dto\AdvertisementDto$AdvertisementDtoBuilder.class 14 | com\pelinhangisi\advertisementservice\config\RabbitConfig.class 15 | com\pelinhangisi\advertisementservice\dto\AdvertisementDto.class 16 | -------------------------------------------------------------------------------- /advertisement-service/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\advertisement-service\src\main\java\com\pelinhangisi\advertisementservice\service\AdvertisementServiceImpl.java 2 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\advertisement-service\src\main\java\com\pelinhangisi\advertisementservice\repository\AdvertisementRepository.java 3 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\advertisement-service\src\main\java\com\pelinhangisi\advertisementservice\AdvertisementServiceApplication.java 4 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\advertisement-service\src\main\java\com\pelinhangisi\advertisementservice\dto\UserRequest.java 5 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\advertisement-service\src\main\java\com\pelinhangisi\advertisementservice\entity\PriorityType.java 6 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\advertisement-service\src\main\java\com\pelinhangisi\advertisementservice\controller\AdvertisementController.java 7 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\advertisement-service\src\main\java\com\pelinhangisi\advertisementservice\config\RabbitConfig.java 8 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\advertisement-service\src\main\java\com\pelinhangisi\advertisementservice\entity\AdvertisementStatus.java 9 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\advertisement-service\src\main\java\com\pelinhangisi\advertisementservice\service\AdvertisementService.java 10 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\advertisement-service\src\main\java\com\pelinhangisi\advertisementservice\entity\Advertisement.java 11 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\advertisement-service\src\main\java\com\pelinhangisi\advertisementservice\dto\AdvertisementDto.java 12 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\advertisement-service\src\main\java\com\pelinhangisi\advertisementservice\entity\BaseEntityModel.java 13 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\advertisement-service\src\main\java\com\pelinhangisi\advertisementservice\config\SpringFoxConfig.java 14 | -------------------------------------------------------------------------------- /advertisement-service/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/advertisement-service/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst -------------------------------------------------------------------------------- /api-gateway/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | Emlakjet-Final-Project 7 | com.pelinhangisi 8 | 1.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | api-gateway 13 | 14 | 15 | 17 16 | 17 17 | 18 | 19 | 20 | 21 | org.springframework.cloud 22 | spring-cloud-starter-gateway 23 | 24 | 25 | 26 | org.springframework.cloud 27 | spring-cloud-starter-netflix-eureka-client 28 | 29 | 30 | 31 | org.springframework.boot 32 | spring-boot-starter-oauth2-resource-server 33 | 34 | 35 | 36 | org.springframework.boot 37 | spring-boot-starter-security 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /api-gateway/src/main/java/com/pelinhangisi/apigateway/ApiGatewayApplication.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.apigateway; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cloud.netflix.eureka.EnableEurekaClient; 6 | 7 | @SpringBootApplication 8 | @EnableEurekaClient 9 | public class ApiGatewayApplication { 10 | public static void main(String[] args) { 11 | SpringApplication.run(ApiGatewayApplication.class, args); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /api-gateway/src/main/java/com/pelinhangisi/apigateway/config/SecurityConfig.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.apigateway.config; 2 | 3 | 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity; 7 | import org.springframework.security.config.web.server.ServerHttpSecurity; 8 | import org.springframework.security.web.server.SecurityWebFilterChain; 9 | 10 | @Configuration 11 | @EnableWebFluxSecurity 12 | public class SecurityConfig { 13 | 14 | @Bean 15 | public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity serverHttpSecurity){ 16 | 17 | serverHttpSecurity.csrf() 18 | .disable() 19 | .authorizeExchange(exchange -> exchange 20 | .pathMatchers("/eureka/**") 21 | .permitAll() 22 | .anyExchange() 23 | .authenticated()) 24 | .oauth2ResourceServer(ServerHttpSecurity.OAuth2ResourceServerSpec::jwt); 25 | return serverHttpSecurity.build(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /api-gateway/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | eureka.client.serviceUrl.defaultZone= http://eureka:password@localhost:8761/eureka 2 | spring.application.name=api-gateway 3 | 4 | logging.level.root=INFO 5 | logging.level.org.springframework.cloud.gateway.route.RouteDefinitionLocator= INFO 6 | logging.level.org.springframework.cloud.gateway= TRACE 7 | 8 | ## User Service Route 9 | spring.cloud.gateway.routes[0].id=user-service 10 | spring.cloud.gateway.routes[0].uri=lb://user-service 11 | spring.cloud.gateway.routes[0].predicates[0]=Path=/api/v1/users 12 | 13 | ## Advertisement Service Route 14 | spring.cloud.gateway.routes[1].id=advertisement-service 15 | spring.cloud.gateway.routes[1].uri=lb://advertisement-service 16 | spring.cloud.gateway.routes[1].predicates[0]=Path=/api/v1/advertisement 17 | 18 | ## Discovery Server Route 19 | spring.cloud.gateway.routes[2].id=discovery-server 20 | spring.cloud.gateway.routes[2].uri=http://discovery-server 21 | spring.cloud.gateway.routes[2].predicates[0]=Path=/eureka/web 22 | spring.cloud.gateway.routes[2].filters[0]=SetPath=/ 23 | 24 | ## Discover Server Static Resources Route 25 | spring.cloud.gateway.routes[3].id=discovery-server-static 26 | spring.cloud.gateway.routes[3].uri=http://localhost:8761 27 | spring.cloud.gateway.routes[3].predicates[0]=Path=/eureka/** 28 | 29 | spring.security.oauth2.resourceserver.jwt.issuer-uri=http://localhost:8181/realms/spring-boot-microservices-realm 30 | 31 | -------------------------------------------------------------------------------- /api-gateway/src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | ,--. ,--. 2 | ,--,--. ,---. `--' ,-----. ,---. ,--,--. ,-' '-. ,---. ,--. ,--. ,--,--. ,--. ,--. 3 | ' ,-. | | .-. | ,--. '-----' | .-. | ' ,-. | '-. .-' | .-. : | |.'.| | ' ,-. | \ ' / 4 | \ '-' | | '-' ' | | ' '-' ' \ '-' | | | \ --. | .'. | \ '-' | \ ' 5 | `--`--' | |-' `--' .`- / `--`--' `--' `----' '--' '--' `--`--' .-' / 6 | `--' `---' `---' -------------------------------------------------------------------------------- /api-gateway/target/api-gateway-1.0-SNAPSHOT.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/api-gateway/target/api-gateway-1.0-SNAPSHOT.jar -------------------------------------------------------------------------------- /api-gateway/target/classes/application.properties: -------------------------------------------------------------------------------- 1 | eureka.client.serviceUrl.defaultZone= http://eureka:password@localhost:8761/eureka 2 | spring.application.name=api-gateway 3 | 4 | logging.level.root=INFO 5 | logging.level.org.springframework.cloud.gateway.route.RouteDefinitionLocator= INFO 6 | logging.level.org.springframework.cloud.gateway= TRACE 7 | 8 | ## User Service Route 9 | spring.cloud.gateway.routes[0].id=user-service 10 | spring.cloud.gateway.routes[0].uri=lb://user-service 11 | spring.cloud.gateway.routes[0].predicates[0]=Path=/api/v1/users 12 | 13 | ## Advertisement Service Route 14 | spring.cloud.gateway.routes[1].id=advertisement-service 15 | spring.cloud.gateway.routes[1].uri=lb://advertisement-service 16 | spring.cloud.gateway.routes[1].predicates[0]=Path=/api/v1/advertisement 17 | 18 | ## Discovery Server Route 19 | spring.cloud.gateway.routes[2].id=discovery-server 20 | spring.cloud.gateway.routes[2].uri=http://discovery-server 21 | spring.cloud.gateway.routes[2].predicates[0]=Path=/eureka/web 22 | spring.cloud.gateway.routes[2].filters[0]=SetPath=/ 23 | 24 | ## Discover Server Static Resources Route 25 | spring.cloud.gateway.routes[3].id=discovery-server-static 26 | spring.cloud.gateway.routes[3].uri=http://localhost:8761 27 | spring.cloud.gateway.routes[3].predicates[0]=Path=/eureka/** 28 | 29 | spring.security.oauth2.resourceserver.jwt.issuer-uri=http://localhost:8181/realms/spring-boot-microservices-realm 30 | 31 | -------------------------------------------------------------------------------- /api-gateway/target/classes/banner.txt: -------------------------------------------------------------------------------- 1 | ,--. ,--. 2 | ,--,--. ,---. `--' ,-----. ,---. ,--,--. ,-' '-. ,---. ,--. ,--. ,--,--. ,--. ,--. 3 | ' ,-. | | .-. | ,--. '-----' | .-. | ' ,-. | '-. .-' | .-. : | |.'.| | ' ,-. | \ ' / 4 | \ '-' | | '-' ' | | ' '-' ' \ '-' | | | \ --. | .'. | \ '-' | \ ' 5 | `--`--' | |-' `--' .`- / `--`--' `--' `----' '--' '--' `--`--' .-' / 6 | `--' `---' `---' -------------------------------------------------------------------------------- /api-gateway/target/classes/com/pelinhangisi/apigateway/ApiGatewayApplication.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/api-gateway/target/classes/com/pelinhangisi/apigateway/ApiGatewayApplication.class -------------------------------------------------------------------------------- /api-gateway/target/classes/com/pelinhangisi/apigateway/config/SecurityConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/api-gateway/target/classes/com/pelinhangisi/apigateway/config/SecurityConfig.class -------------------------------------------------------------------------------- /api-gateway/target/final-project.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/api-gateway/target/final-project.jar -------------------------------------------------------------------------------- /api-gateway/target/maven-archiver/pom.properties: -------------------------------------------------------------------------------- 1 | #Generated by Maven 2 | #Mon Jul 18 06:38:12 MSK 2022 3 | groupId=com.pelinhangisi 4 | artifactId=api-gateway 5 | version=1.0-SNAPSHOT 6 | -------------------------------------------------------------------------------- /api-gateway/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | com\pelinhangisi\apigateway\config\SecurityConfig.class 2 | com\pelinhangisi\apigateway\ApiGatewayApplication.class 3 | -------------------------------------------------------------------------------- /api-gateway/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\api-gateway\src\main\java\com\pelinhangisi\apigateway\ApiGatewayApplication.java 2 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\api-gateway\src\main\java\com\pelinhangisi\apigateway\config\SecurityConfig.java 3 | -------------------------------------------------------------------------------- /api-gateway/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/api-gateway/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst -------------------------------------------------------------------------------- /discovery-server/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | Emlakjet-Final-Project 7 | com.pelinhangisi 8 | 1.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | discovery-server 13 | 14 | 15 | 17 16 | 17 17 | 18 | 19 | 20 | 21 | org.springframework.cloud 22 | spring-cloud-starter-netflix-eureka-server 23 | 24 | 25 | 26 | org.springframework.boot 27 | spring-boot-starter-security 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /discovery-server/src/main/java/com/pelinhangisi/discoveryserver/DiscoveryServerApplication.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.discoveryserver; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; 6 | 7 | @SpringBootApplication 8 | @EnableEurekaServer 9 | public class DiscoveryServerApplication { 10 | public static void main(String[] args) { 11 | SpringApplication.run(DiscoveryServerApplication.class,args); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /discovery-server/src/main/java/com/pelinhangisi/discoveryserver/config/SecurityConfig.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.discoveryserver.config; 2 | 3 | import org.springframework.beans.factory.annotation.Value; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; 6 | import org.springframework.security.config.annotation.web.builders.HttpSecurity; 7 | import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; 8 | import org.springframework.security.config.http.SessionCreationPolicy; 9 | import org.springframework.security.crypto.password.NoOpPasswordEncoder; 10 | 11 | @Configuration 12 | public class SecurityConfig extends WebSecurityConfigurerAdapter { 13 | 14 | @Value("${app.eureka.username}") 15 | private String username; 16 | 17 | @Value("${app.eureka.password}") 18 | private String password; 19 | 20 | @Override 21 | public void configure(AuthenticationManagerBuilder auth) throws Exception { 22 | auth.inMemoryAuthentication() 23 | .passwordEncoder(NoOpPasswordEncoder.getInstance()) 24 | .withUser(username).password(password) 25 | .authorities("USER"); 26 | } 27 | 28 | @Override 29 | public void configure(HttpSecurity httpSecurity) throws Exception { 30 | httpSecurity.csrf().disable() 31 | .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS); 32 | httpSecurity.authorizeRequests() 33 | .antMatchers("/v2/api-docs", "/api-docs", 34 | "/configuration/ui", "/configuration/security", 35 | "/swagger-ui/**", "/swagger-resources/**", "/swagger-ui.html", "/webjars/**").permitAll() 36 | .antMatchers("/api/v1/users/**", "/api/v1/advertisement/**").permitAll() 37 | .anyRequest() 38 | .authenticated() 39 | .and() 40 | .httpBasic(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /discovery-server/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | eureka.instance.hostname=localhost 2 | eureka.client.register-with-eureka=false 3 | eureka.client.fetch-registry=false 4 | eureka.client.serviceUrl.defaultZone=http://localhost:8761/eureka/ 5 | server.port=8761 6 | 7 | app.eureka.username=eureka 8 | app.eureka.password=password -------------------------------------------------------------------------------- /discovery-server/src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | ,--. 2 | ,---. ,--.,--. ,--.--. ,---. | |,-. ,--,--. 3 | | .-. : | || | | .--' | .-. : | / ' ,-. | 4 | \ --. ' '' ' | | \ --. | \ \ \ '-' | 5 | `----' `----' `--' `----' `--'`--' `--`--' -------------------------------------------------------------------------------- /discovery-server/target/classes/application.properties: -------------------------------------------------------------------------------- 1 | eureka.instance.hostname=localhost 2 | eureka.client.register-with-eureka=false 3 | eureka.client.fetch-registry=false 4 | eureka.client.serviceUrl.defaultZone=http://localhost:8761/eureka/ 5 | server.port=8761 6 | 7 | app.eureka.username=eureka 8 | app.eureka.password=password -------------------------------------------------------------------------------- /discovery-server/target/classes/banner.txt: -------------------------------------------------------------------------------- 1 | ,--. 2 | ,---. ,--.,--. ,--.--. ,---. | |,-. ,--,--. 3 | | .-. : | || | | .--' | .-. : | / ' ,-. | 4 | \ --. ' '' ' | | \ --. | \ \ \ '-' | 5 | `----' `----' `--' `----' `--'`--' `--`--' -------------------------------------------------------------------------------- /discovery-server/target/classes/com/pelinhangisi/discoveryserver/DiscoveryServerApplication.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/discovery-server/target/classes/com/pelinhangisi/discoveryserver/DiscoveryServerApplication.class -------------------------------------------------------------------------------- /discovery-server/target/classes/com/pelinhangisi/discoveryserver/config/SecurityConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/discovery-server/target/classes/com/pelinhangisi/discoveryserver/config/SecurityConfig.class -------------------------------------------------------------------------------- /discovery-server/target/discovery-server-1.0-SNAPSHOT.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/discovery-server/target/discovery-server-1.0-SNAPSHOT.jar -------------------------------------------------------------------------------- /discovery-server/target/final-project.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/discovery-server/target/final-project.jar -------------------------------------------------------------------------------- /discovery-server/target/maven-archiver/pom.properties: -------------------------------------------------------------------------------- 1 | #Generated by Maven 2 | #Mon Jul 18 06:38:09 MSK 2022 3 | groupId=com.pelinhangisi 4 | artifactId=discovery-server 5 | version=1.0-SNAPSHOT 6 | -------------------------------------------------------------------------------- /discovery-server/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | com\pelinhangisi\discoveryserver\config\SecurityConfig.class 2 | com\pelinhangisi\discoveryserver\DiscoveryServerApplication.class 3 | -------------------------------------------------------------------------------- /discovery-server/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\discovery-server\src\main\java\com\pelinhangisi\discoveryserver\config\SecurityConfig.java 2 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\discovery-server\src\main\java\com\pelinhangisi\discoveryserver\DiscoveryServerApplication.java 3 | -------------------------------------------------------------------------------- /discovery-server/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/discovery-server/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst -------------------------------------------------------------------------------- /docs/SwaggerDocs.json: -------------------------------------------------------------------------------- 1 | // http://localhost:7071/v2/api-docs 2 | 3 | { 4 | "swagger": "2.0", 5 | "info": { 6 | "description": "Api Documentation", 7 | "version": "1.0", 8 | "title": "Api Documentation", 9 | "termsOfService": "urn:tos", 10 | "contact": {}, 11 | "license": { 12 | "name": "Apache 2.0", 13 | "url": "http://www.apache.org/licenses/LICENSE-2.0" 14 | } 15 | }, 16 | "host": "localhost:7071", 17 | "basePath": "/", 18 | "tags": [ 19 | { 20 | "name": "advertisement-controller", 21 | "description": "Advertisement Controller" 22 | }, 23 | { 24 | "name": "basic-error-controller", 25 | "description": "Basic Error Controller" 26 | } 27 | ], 28 | "paths": { 29 | "/api/v1/advertisement/create": { 30 | "post": { 31 | "tags": [ 32 | "advertisement-controller" 33 | ], 34 | "summary": "createAdvertisement", 35 | "operationId": "createAdvertisementUsingPOST", 36 | "consumes": [ 37 | "application/json" 38 | ], 39 | "produces": [ 40 | "*/*" 41 | ], 42 | "parameters": [ 43 | { 44 | "in": "body", 45 | "name": "advertisementDto", 46 | "description": "advertisementDto", 47 | "required": true, 48 | "schema": { 49 | "$ref": "#/definitions/AdvertisementDto" 50 | } 51 | } 52 | ], 53 | "responses": { 54 | "200": { 55 | "description": "OK", 56 | "schema": { 57 | "$ref": "#/definitions/AdvertisementDto" 58 | } 59 | }, 60 | "201": { 61 | "description": "Created" 62 | }, 63 | "401": { 64 | "description": "Unauthorized" 65 | }, 66 | "403": { 67 | "description": "Forbidden" 68 | }, 69 | "404": { 70 | "description": "Not Found" 71 | } 72 | } 73 | } 74 | }, 75 | "/api/v1/advertisement/getlist": { 76 | "get": { 77 | "tags": [ 78 | "advertisement-controller" 79 | ], 80 | "summary": "getAll", 81 | "operationId": "getAllUsingGET", 82 | "produces": [ 83 | "*/*" 84 | ], 85 | "parameters": [ 86 | { 87 | "name": "numberOfPages", 88 | "in": "query", 89 | "required": false, 90 | "type": "integer", 91 | "format": "int32" 92 | } 93 | ], 94 | "responses": { 95 | "200": { 96 | "description": "OK", 97 | "schema": { 98 | "$ref": "#/definitions/Page«AdvertisementDto»" 99 | } 100 | }, 101 | "401": { 102 | "description": "Unauthorized" 103 | }, 104 | "403": { 105 | "description": "Forbidden" 106 | }, 107 | "404": { 108 | "description": "Not Found" 109 | } 110 | } 111 | } 112 | }, 113 | "/api/v1/advertisement/update": { 114 | "put": { 115 | "tags": [ 116 | "advertisement-controller" 117 | ], 118 | "summary": "updateAdvertisement", 119 | "operationId": "updateAdvertisementUsingPUT", 120 | "consumes": [ 121 | "application/json" 122 | ], 123 | "produces": [ 124 | "*/*" 125 | ], 126 | "parameters": [ 127 | { 128 | "in": "body", 129 | "name": "advertisementDto", 130 | "description": "advertisementDto", 131 | "required": true, 132 | "schema": { 133 | "$ref": "#/definitions/AdvertisementDto" 134 | } 135 | }, 136 | { 137 | "name": "id", 138 | "in": "path", 139 | "description": "id", 140 | "required": true, 141 | "type": "string" 142 | } 143 | ], 144 | "responses": { 145 | "200": { 146 | "description": "OK", 147 | "schema": { 148 | "$ref": "#/definitions/Error-ModelName{namespace='java.util', name='Optional«Advertisement»'}" 149 | } 150 | }, 151 | "201": { 152 | "description": "Created" 153 | }, 154 | "401": { 155 | "description": "Unauthorized" 156 | }, 157 | "403": { 158 | "description": "Forbidden" 159 | }, 160 | "404": { 161 | "description": "Not Found" 162 | } 163 | } 164 | } 165 | }, 166 | "/error": { 167 | "get": { 168 | "tags": [ 169 | "basic-error-controller" 170 | ], 171 | "summary": "errorHtml", 172 | "operationId": "errorHtmlUsingGET", 173 | "produces": [ 174 | "text/html" 175 | ], 176 | "responses": { 177 | "200": { 178 | "description": "OK", 179 | "schema": { 180 | "$ref": "#/definitions/ModelAndView" 181 | } 182 | }, 183 | "401": { 184 | "description": "Unauthorized" 185 | }, 186 | "403": { 187 | "description": "Forbidden" 188 | }, 189 | "404": { 190 | "description": "Not Found" 191 | } 192 | } 193 | }, 194 | "head": { 195 | "tags": [ 196 | "basic-error-controller" 197 | ], 198 | "summary": "errorHtml", 199 | "operationId": "errorHtmlUsingHEAD", 200 | "consumes": [ 201 | "application/json" 202 | ], 203 | "produces": [ 204 | "text/html" 205 | ], 206 | "responses": { 207 | "200": { 208 | "description": "OK", 209 | "schema": { 210 | "$ref": "#/definitions/ModelAndView" 211 | } 212 | }, 213 | "204": { 214 | "description": "No Content" 215 | }, 216 | "401": { 217 | "description": "Unauthorized" 218 | }, 219 | "403": { 220 | "description": "Forbidden" 221 | } 222 | } 223 | }, 224 | "post": { 225 | "tags": [ 226 | "basic-error-controller" 227 | ], 228 | "summary": "errorHtml", 229 | "operationId": "errorHtmlUsingPOST", 230 | "consumes": [ 231 | "application/json" 232 | ], 233 | "produces": [ 234 | "text/html" 235 | ], 236 | "responses": { 237 | "200": { 238 | "description": "OK", 239 | "schema": { 240 | "$ref": "#/definitions/ModelAndView" 241 | } 242 | }, 243 | "201": { 244 | "description": "Created" 245 | }, 246 | "401": { 247 | "description": "Unauthorized" 248 | }, 249 | "403": { 250 | "description": "Forbidden" 251 | }, 252 | "404": { 253 | "description": "Not Found" 254 | } 255 | } 256 | }, 257 | "put": { 258 | "tags": [ 259 | "basic-error-controller" 260 | ], 261 | "summary": "errorHtml", 262 | "operationId": "errorHtmlUsingPUT", 263 | "consumes": [ 264 | "application/json" 265 | ], 266 | "produces": [ 267 | "text/html" 268 | ], 269 | "responses": { 270 | "200": { 271 | "description": "OK", 272 | "schema": { 273 | "$ref": "#/definitions/ModelAndView" 274 | } 275 | }, 276 | "201": { 277 | "description": "Created" 278 | }, 279 | "401": { 280 | "description": "Unauthorized" 281 | }, 282 | "403": { 283 | "description": "Forbidden" 284 | }, 285 | "404": { 286 | "description": "Not Found" 287 | } 288 | } 289 | }, 290 | "delete": { 291 | "tags": [ 292 | "basic-error-controller" 293 | ], 294 | "summary": "errorHtml", 295 | "operationId": "errorHtmlUsingDELETE", 296 | "produces": [ 297 | "text/html" 298 | ], 299 | "responses": { 300 | "200": { 301 | "description": "OK", 302 | "schema": { 303 | "$ref": "#/definitions/ModelAndView" 304 | } 305 | }, 306 | "204": { 307 | "description": "No Content" 308 | }, 309 | "401": { 310 | "description": "Unauthorized" 311 | }, 312 | "403": { 313 | "description": "Forbidden" 314 | } 315 | } 316 | }, 317 | "patch": { 318 | "tags": [ 319 | "basic-error-controller" 320 | ], 321 | "summary": "errorHtml", 322 | "operationId": "errorHtmlUsingPATCH", 323 | "consumes": [ 324 | "application/json" 325 | ], 326 | "produces": [ 327 | "text/html" 328 | ], 329 | "responses": { 330 | "200": { 331 | "description": "OK", 332 | "schema": { 333 | "$ref": "#/definitions/ModelAndView" 334 | } 335 | }, 336 | "204": { 337 | "description": "No Content" 338 | }, 339 | "401": { 340 | "description": "Unauthorized" 341 | }, 342 | "403": { 343 | "description": "Forbidden" 344 | } 345 | } 346 | } 347 | } 348 | }, 349 | "definitions": { 350 | "Advertisement": { 351 | "type": "object", 352 | "properties": { 353 | "empty": { 354 | "type": "boolean" 355 | }, 356 | "present": { 357 | "type": "boolean" 358 | } 359 | }, 360 | "title": "Advertisement" 361 | }, 362 | "AdvertisementDto": { 363 | "type": "object", 364 | "properties": { 365 | "advertisementDate": { 366 | "type": "string", 367 | "format": "date-time" 368 | }, 369 | "advertisementStatus": { 370 | "type": "string" 371 | }, 372 | "assignee": { 373 | "type": "string" 374 | }, 375 | "description": { 376 | "type": "string" 377 | }, 378 | "id": { 379 | "type": "string" 380 | }, 381 | "price": { 382 | "type": "number" 383 | }, 384 | "priorityType": { 385 | "type": "string" 386 | }, 387 | "title": { 388 | "type": "string" 389 | }, 390 | "userId": { 391 | "type": "string" 392 | } 393 | }, 394 | "title": "AdvertisementDto" 395 | }, 396 | "ModelAndView": { 397 | "type": "object", 398 | "properties": { 399 | "empty": { 400 | "type": "boolean" 401 | }, 402 | "model": { 403 | "type": "object" 404 | }, 405 | "modelMap": { 406 | "type": "object", 407 | "additionalProperties": { 408 | "type": "object" 409 | } 410 | }, 411 | "reference": { 412 | "type": "boolean" 413 | }, 414 | "status": { 415 | "type": "string", 416 | "enum": [ 417 | "ACCEPTED", 418 | "ALREADY_REPORTED", 419 | "BAD_GATEWAY", 420 | "BAD_REQUEST", 421 | "BANDWIDTH_LIMIT_EXCEEDED", 422 | "CHECKPOINT", 423 | "CONFLICT", 424 | "CONTINUE", 425 | "CREATED", 426 | "DESTINATION_LOCKED", 427 | "EXPECTATION_FAILED", 428 | "FAILED_DEPENDENCY", 429 | "FORBIDDEN", 430 | "FOUND", 431 | "GATEWAY_TIMEOUT", 432 | "GONE", 433 | "HTTP_VERSION_NOT_SUPPORTED", 434 | "IM_USED", 435 | "INSUFFICIENT_SPACE_ON_RESOURCE", 436 | "INSUFFICIENT_STORAGE", 437 | "INTERNAL_SERVER_ERROR", 438 | "I_AM_A_TEAPOT", 439 | "LENGTH_REQUIRED", 440 | "LOCKED", 441 | "LOOP_DETECTED", 442 | "METHOD_FAILURE", 443 | "METHOD_NOT_ALLOWED", 444 | "MOVED_PERMANENTLY", 445 | "MOVED_TEMPORARILY", 446 | "MULTIPLE_CHOICES", 447 | "MULTI_STATUS", 448 | "NETWORK_AUTHENTICATION_REQUIRED", 449 | "NON_AUTHORITATIVE_INFORMATION", 450 | "NOT_ACCEPTABLE", 451 | "NOT_EXTENDED", 452 | "NOT_FOUND", 453 | "NOT_IMPLEMENTED", 454 | "NOT_MODIFIED", 455 | "NO_CONTENT", 456 | "OK", 457 | "PARTIAL_CONTENT", 458 | "PAYLOAD_TOO_LARGE", 459 | "PAYMENT_REQUIRED", 460 | "PERMANENT_REDIRECT", 461 | "PRECONDITION_FAILED", 462 | "PRECONDITION_REQUIRED", 463 | "PROCESSING", 464 | "PROXY_AUTHENTICATION_REQUIRED", 465 | "REQUESTED_RANGE_NOT_SATISFIABLE", 466 | "REQUEST_ENTITY_TOO_LARGE", 467 | "REQUEST_HEADER_FIELDS_TOO_LARGE", 468 | "REQUEST_TIMEOUT", 469 | "REQUEST_URI_TOO_LONG", 470 | "RESET_CONTENT", 471 | "SEE_OTHER", 472 | "SERVICE_UNAVAILABLE", 473 | "SWITCHING_PROTOCOLS", 474 | "TEMPORARY_REDIRECT", 475 | "TOO_EARLY", 476 | "TOO_MANY_REQUESTS", 477 | "UNAUTHORIZED", 478 | "UNAVAILABLE_FOR_LEGAL_REASONS", 479 | "UNPROCESSABLE_ENTITY", 480 | "UNSUPPORTED_MEDIA_TYPE", 481 | "UPGRADE_REQUIRED", 482 | "URI_TOO_LONG", 483 | "USE_PROXY", 484 | "VARIANT_ALSO_NEGOTIATES" 485 | ] 486 | }, 487 | "view": { 488 | "$ref": "#/definitions/View" 489 | }, 490 | "viewName": { 491 | "type": "string" 492 | } 493 | }, 494 | "title": "ModelAndView" 495 | }, 496 | "Pageable": { 497 | "type": "object", 498 | "properties": { 499 | "offset": { 500 | "type": "integer", 501 | "format": "int64" 502 | }, 503 | "pageNumber": { 504 | "type": "integer", 505 | "format": "int32" 506 | }, 507 | "pageSize": { 508 | "type": "integer", 509 | "format": "int32" 510 | }, 511 | "paged": { 512 | "type": "boolean" 513 | }, 514 | "sort": { 515 | "$ref": "#/definitions/Sort" 516 | }, 517 | "unpaged": { 518 | "type": "boolean" 519 | } 520 | }, 521 | "title": "Pageable" 522 | }, 523 | "Page«AdvertisementDto»": { 524 | "type": "object", 525 | "properties": { 526 | "content": { 527 | "type": "array", 528 | "items": { 529 | "$ref": "#/definitions/AdvertisementDto" 530 | } 531 | }, 532 | "empty": { 533 | "type": "boolean" 534 | }, 535 | "first": { 536 | "type": "boolean" 537 | }, 538 | "last": { 539 | "type": "boolean" 540 | }, 541 | "number": { 542 | "type": "integer", 543 | "format": "int32" 544 | }, 545 | "numberOfElements": { 546 | "type": "integer", 547 | "format": "int32" 548 | }, 549 | "pageable": { 550 | "$ref": "#/definitions/Pageable" 551 | }, 552 | "size": { 553 | "type": "integer", 554 | "format": "int32" 555 | }, 556 | "sort": { 557 | "$ref": "#/definitions/Sort" 558 | }, 559 | "totalElements": { 560 | "type": "integer", 561 | "format": "int64" 562 | }, 563 | "totalPages": { 564 | "type": "integer", 565 | "format": "int32" 566 | } 567 | }, 568 | "title": "Page«AdvertisementDto»" 569 | }, 570 | "Sort": { 571 | "type": "object", 572 | "properties": { 573 | "empty": { 574 | "type": "boolean" 575 | }, 576 | "sorted": { 577 | "type": "boolean" 578 | }, 579 | "unsorted": { 580 | "type": "boolean" 581 | } 582 | }, 583 | "title": "Sort" 584 | }, 585 | "View": { 586 | "type": "object", 587 | "properties": { 588 | "contentType": { 589 | "type": "string" 590 | } 591 | }, 592 | "title": "View" 593 | } 594 | } 595 | } 596 | 597 | 598 | 599 | 600 | -------------------------------------------------------------------------------- /docs/ornek-post.txt: -------------------------------------------------------------------------------- 1 | USER 2 | 3 | { 4 | "username":"pelince", 5 | "firstname":"pelin", 6 | "lastname":"hangişi", 7 | "password":"12345", 8 | "email":"pelin@test.com", 9 | "phonenumber": "05425424242" 10 | 11 | } 12 | 13 | ADVERTISEMENT 14 | { 15 | 16 | "title":"Sahibinden", 17 | "description": "Eşyalı Kiralık 2+1", 18 | "price": 5000, 19 | "advertisementDate":"2022-05-05", 20 | "priortyType":"URGENT", 21 | "advertisementStatus": "ACTIVE" 22 | } -------------------------------------------------------------------------------- /docs/realm.json: -------------------------------------------------------------------------------- 1 | { 2 | "issuer": "http://localhost:8181/realms/spring-boot-microservices-realm", 3 | "authorization_endpoint": "http://localhost:8181/realms/spring-boot-microservices-realm/protocol/openid-connect/auth", 4 | "token_endpoint": "http://localhost:8181/realms/spring-boot-microservices-realm/protocol/openid-connect/token", 5 | "introspection_endpoint": "http://localhost:8181/realms/spring-boot-microservices-realm/protocol/openid-connect/token/introspect", 6 | "userinfo_endpoint": "http://localhost:8181/realms/spring-boot-microservices-realm/protocol/openid-connect/userinfo", 7 | "end_session_endpoint": "http://localhost:8181/realms/spring-boot-microservices-realm/protocol/openid-connect/logout", 8 | "frontchannel_logout_session_supported": true, 9 | "frontchannel_logout_supported": true, 10 | "jwks_uri": "http://localhost:8181/realms/spring-boot-microservices-realm/protocol/openid-connect/certs", 11 | "check_session_iframe": "http://localhost:8181/realms/spring-boot-microservices-realm/protocol/openid-connect/login-status-iframe.html", 12 | "grant_types_supported": [ 13 | "authorization_code", 14 | "implicit", 15 | "refresh_token", 16 | "password", 17 | "client_credentials", 18 | "urn:ietf:params:oauth:grant-type:device_code", 19 | "urn:openid:params:grant-type:ciba" 20 | ], 21 | "acr_values_supported": [ 22 | "0", 23 | "1" 24 | ], 25 | "response_types_supported": [ 26 | "code", 27 | "none", 28 | "id_token", 29 | "token", 30 | "id_token token", 31 | "code id_token", 32 | "code token", 33 | "code id_token token" 34 | ], 35 | "subject_types_supported": [ 36 | "public", 37 | "pairwise" 38 | ], 39 | "id_token_signing_alg_values_supported": [ 40 | "PS384", 41 | "ES384", 42 | "RS384", 43 | "HS256", 44 | "HS512", 45 | "ES256", 46 | "RS256", 47 | "HS384", 48 | "ES512", 49 | "PS256", 50 | "PS512", 51 | "RS512" 52 | ], 53 | "id_token_encryption_alg_values_supported": [ 54 | "RSA-OAEP", 55 | "RSA-OAEP-256", 56 | "RSA1_5" 57 | ], 58 | "id_token_encryption_enc_values_supported": [ 59 | "A256GCM", 60 | "A192GCM", 61 | "A128GCM", 62 | "A128CBC-HS256", 63 | "A192CBC-HS384", 64 | "A256CBC-HS512" 65 | ], 66 | "userinfo_signing_alg_values_supported": [ 67 | "PS384", 68 | "ES384", 69 | "RS384", 70 | "HS256", 71 | "HS512", 72 | "ES256", 73 | "RS256", 74 | "HS384", 75 | "ES512", 76 | "PS256", 77 | "PS512", 78 | "RS512", 79 | "none" 80 | ], 81 | "userinfo_encryption_alg_values_supported": [ 82 | "RSA-OAEP", 83 | "RSA-OAEP-256", 84 | "RSA1_5" 85 | ], 86 | "userinfo_encryption_enc_values_supported": [ 87 | "A256GCM", 88 | "A192GCM", 89 | "A128GCM", 90 | "A128CBC-HS256", 91 | "A192CBC-HS384", 92 | "A256CBC-HS512" 93 | ], 94 | "request_object_signing_alg_values_supported": [ 95 | "PS384", 96 | "ES384", 97 | "RS384", 98 | "HS256", 99 | "HS512", 100 | "ES256", 101 | "RS256", 102 | "HS384", 103 | "ES512", 104 | "PS256", 105 | "PS512", 106 | "RS512", 107 | "none" 108 | ], 109 | "request_object_encryption_alg_values_supported": [ 110 | "RSA-OAEP", 111 | "RSA-OAEP-256", 112 | "RSA1_5" 113 | ], 114 | "request_object_encryption_enc_values_supported": [ 115 | "A256GCM", 116 | "A192GCM", 117 | "A128GCM", 118 | "A128CBC-HS256", 119 | "A192CBC-HS384", 120 | "A256CBC-HS512" 121 | ], 122 | "response_modes_supported": [ 123 | "query", 124 | "fragment", 125 | "form_post", 126 | "query.jwt", 127 | "fragment.jwt", 128 | "form_post.jwt", 129 | "jwt" 130 | ], 131 | "registration_endpoint": "http://localhost:8181/realms/spring-boot-microservices-realm/clients-registrations/openid-connect", 132 | "token_endpoint_auth_methods_supported": [ 133 | "private_key_jwt", 134 | "client_secret_basic", 135 | "client_secret_post", 136 | "tls_client_auth", 137 | "client_secret_jwt" 138 | ], 139 | "token_endpoint_auth_signing_alg_values_supported": [ 140 | "PS384", 141 | "ES384", 142 | "RS384", 143 | "HS256", 144 | "HS512", 145 | "ES256", 146 | "RS256", 147 | "HS384", 148 | "ES512", 149 | "PS256", 150 | "PS512", 151 | "RS512" 152 | ], 153 | "introspection_endpoint_auth_methods_supported": [ 154 | "private_key_jwt", 155 | "client_secret_basic", 156 | "client_secret_post", 157 | "tls_client_auth", 158 | "client_secret_jwt" 159 | ], 160 | "introspection_endpoint_auth_signing_alg_values_supported": [ 161 | "PS384", 162 | "ES384", 163 | "RS384", 164 | "HS256", 165 | "HS512", 166 | "ES256", 167 | "RS256", 168 | "HS384", 169 | "ES512", 170 | "PS256", 171 | "PS512", 172 | "RS512" 173 | ], 174 | "authorization_signing_alg_values_supported": [ 175 | "PS384", 176 | "ES384", 177 | "RS384", 178 | "HS256", 179 | "HS512", 180 | "ES256", 181 | "RS256", 182 | "HS384", 183 | "ES512", 184 | "PS256", 185 | "PS512", 186 | "RS512" 187 | ], 188 | "authorization_encryption_alg_values_supported": [ 189 | "RSA-OAEP", 190 | "RSA-OAEP-256", 191 | "RSA1_5" 192 | ], 193 | "authorization_encryption_enc_values_supported": [ 194 | "A256GCM", 195 | "A192GCM", 196 | "A128GCM", 197 | "A128CBC-HS256", 198 | "A192CBC-HS384", 199 | "A256CBC-HS512" 200 | ], 201 | "claims_supported": [ 202 | "aud", 203 | "sub", 204 | "iss", 205 | "auth_time", 206 | "name", 207 | "given_name", 208 | "family_name", 209 | "preferred_username", 210 | "email", 211 | "acr" 212 | ], 213 | "claim_types_supported": [ 214 | "normal" 215 | ], 216 | "claims_parameter_supported": true, 217 | "scopes_supported": [ 218 | "openid", 219 | "address", 220 | "profile", 221 | "phone", 222 | "email", 223 | "microprofile-jwt", 224 | "web-origins", 225 | "acr", 226 | "roles", 227 | "offline_access" 228 | ], 229 | "request_parameter_supported": true, 230 | "request_uri_parameter_supported": true, 231 | "require_request_uri_registration": true, 232 | "code_challenge_methods_supported": [ 233 | "plain", 234 | "S256" 235 | ], 236 | "tls_client_certificate_bound_access_tokens": true, 237 | "revocation_endpoint": "http://localhost:8181/realms/spring-boot-microservices-realm/protocol/openid-connect/revoke", 238 | "revocation_endpoint_auth_methods_supported": [ 239 | "private_key_jwt", 240 | "client_secret_basic", 241 | "client_secret_post", 242 | "tls_client_auth", 243 | "client_secret_jwt" 244 | ], 245 | "revocation_endpoint_auth_signing_alg_values_supported": [ 246 | "PS384", 247 | "ES384", 248 | "RS384", 249 | "HS256", 250 | "HS512", 251 | "ES256", 252 | "RS256", 253 | "HS384", 254 | "ES512", 255 | "PS256", 256 | "PS512", 257 | "RS512" 258 | ], 259 | "backchannel_logout_supported": true, 260 | "backchannel_logout_session_supported": true, 261 | "device_authorization_endpoint": "http://localhost:8181/realms/spring-boot-microservices-realm/protocol/openid-connect/auth/device", 262 | "backchannel_token_delivery_modes_supported": [ 263 | "poll", 264 | "ping" 265 | ], 266 | "backchannel_authentication_endpoint": "http://localhost:8181/realms/spring-boot-microservices-realm/protocol/openid-connect/ext/ciba/auth", 267 | "backchannel_authentication_request_signing_alg_values_supported": [ 268 | "PS384", 269 | "ES384", 270 | "RS384", 271 | "ES256", 272 | "RS256", 273 | "ES512", 274 | "PS256", 275 | "PS512", 276 | "RS512" 277 | ], 278 | "require_pushed_authorization_requests": false, 279 | "pushed_authorization_request_endpoint": "http://localhost:8181/realms/spring-boot-microservices-realm/protocol/openid-connect/ext/par/request", 280 | "mtls_endpoint_aliases": { 281 | "token_endpoint": "http://localhost:8181/realms/spring-boot-microservices-realm/protocol/openid-connect/token", 282 | "revocation_endpoint": "http://localhost:8181/realms/spring-boot-microservices-realm/protocol/openid-connect/revoke", 283 | "introspection_endpoint": "http://localhost:8181/realms/spring-boot-microservices-realm/protocol/openid-connect/token/introspect", 284 | "device_authorization_endpoint": "http://localhost:8181/realms/spring-boot-microservices-realm/protocol/openid-connect/auth/device", 285 | "registration_endpoint": "http://localhost:8181/realms/spring-boot-microservices-realm/clients-registrations/openid-connect", 286 | "userinfo_endpoint": "http://localhost:8181/realms/spring-boot-microservices-realm/protocol/openid-connect/userinfo", 287 | "pushed_authorization_request_endpoint": "http://localhost:8181/realms/spring-boot-microservices-realm/protocol/openid-connect/ext/par/request", 288 | "backchannel_authentication_endpoint": "http://localhost:8181/realms/spring-boot-microservices-realm/protocol/openid-connect/ext/ciba/auth" 289 | } 290 | } -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | com.pelinhangisi 8 | Emlakjet-Final-Project 9 | pom 10 | 1.0-SNAPSHOT 11 | 12 | user-service 13 | advertisement-service 14 | reports-service 15 | discovery-server 16 | api-gateway 17 | 18 | 19 | 20 | 17 21 | 17 22 | 2.5.7 23 | 2.5.7 24 | 2020.0.3 25 | 26 | 27 | 28 | 29 | 30 | org.springframework.boot 31 | spring-boot-dependencies 32 | ${spring.boot.dependencies.version} 33 | import 34 | pom 35 | 36 | 37 | org.springframework.cloud 38 | spring-cloud-dependencies 39 | ${spring-cloud.version} 40 | pom 41 | import 42 | 43 | 44 | org.testcontainers 45 | testcontainers-bom 46 | 1.16.3 47 | pom 48 | import 49 | 50 | 51 | 52 | 53 | 54 | 55 | org.projectlombok 56 | lombok 57 | 58 | 59 | org.springframework.boot 60 | spring-boot-starter-test 61 | 62 | 63 | 64 | io.springfox 65 | springfox-swagger2 66 | 3.0.0 67 | 68 | 69 | 70 | io.springfox 71 | springfox-boot-starter 72 | 3.0.0 73 | 74 | 75 | 76 | io.springfox 77 | springfox-swagger-ui 78 | 2.9.2 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | org.springframework.boot 87 | spring-boot-maven-plugin 88 | ${spring.boot.maven.plugin.version} 89 | 90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /reports-service/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | Emlakjet-Final-Project 7 | com.pelinhangisi 8 | 1.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | reports-service 13 | 14 | 15 | 17 16 | 17 17 | 18 | 19 | 20 | 21 | org.springframework.boot 22 | spring-boot-starter-data-jpa 23 | 24 | 25 | org.springframework.boot 26 | spring-boot-starter-web 27 | 28 | 29 | 30 | org.springframework.boot 31 | spring-boot-devtools 32 | runtime 33 | true 34 | 35 | 36 | org.postgresql 37 | postgresql 38 | runtime 39 | 40 | 41 | 42 | org.springframework.boot 43 | spring-boot-starter-amqp 44 | 45 | 46 | 47 | org.springframework.amqp 48 | spring-rabbit-test 49 | test 50 | 51 | 52 | 53 | org.springframework.cloud 54 | spring-cloud-starter-netflix-eureka-client 55 | 56 | 57 | 58 | 59 | 60 | 61 | org.springframework.boot 62 | spring-boot-maven-plugin 63 | 64 | 65 | 66 | org.projectlombok 67 | lombok 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /reports-service/src/main/java/com/pelinhangisi/reportsservice/ReportsServiceApplication.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.reportsservice; 2 | 3 | 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.cloud.netflix.eureka.EnableEurekaClient; 7 | 8 | @SpringBootApplication 9 | @EnableEurekaClient 10 | public class ReportsServiceApplication { 11 | public static void main(String[] args) { 12 | SpringApplication.run(ReportsServiceApplication.class, args); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /reports-service/src/main/java/com/pelinhangisi/reportsservice/config/RabbitConfig.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.reportsservice.config; 2 | 3 | import org.springframework.amqp.core.Binding; 4 | import org.springframework.amqp.core.BindingBuilder; 5 | import org.springframework.amqp.core.DirectExchange; 6 | import org.springframework.amqp.core.Queue; 7 | import org.springframework.amqp.rabbit.connection.ConnectionFactory; 8 | import org.springframework.amqp.rabbit.core.RabbitTemplate; 9 | import org.springframework.amqp.support.converter.MessageConverter; 10 | import org.springframework.amqp.support.converter.SimpleMessageConverter; 11 | import org.springframework.beans.factory.annotation.Value; 12 | import org.springframework.context.annotation.Bean; 13 | import org.springframework.context.annotation.Configuration; 14 | 15 | @Configuration 16 | public class RabbitConfig { 17 | @Value("${queue.name}") 18 | private String queueName; 19 | 20 | @Value("${spring.rabbitmq.template.exchange}") 21 | private String topicExchangeName; 22 | 23 | @Value("${spring.rabbitmq.template.routing-key}") 24 | private String routingName; 25 | 26 | @Bean 27 | public Queue queue() { 28 | return new Queue(queueName, true); 29 | } 30 | 31 | @Bean 32 | DirectExchange directExchange(){ 33 | return new DirectExchange(topicExchangeName); 34 | } 35 | 36 | @Bean 37 | Binding binding(Queue queue, DirectExchange directExchange){ 38 | return BindingBuilder.bind(queue).to(directExchange).with(routingName); 39 | } 40 | 41 | @Bean 42 | MessageConverter messageConverter() { 43 | 44 | return new SimpleMessageConverter(); 45 | } 46 | 47 | @Bean 48 | RabbitTemplate rabbitTemplate(ConnectionFactory connectionFactory) { 49 | RabbitTemplate rabbitTemplate = new RabbitTemplate(connectionFactory); 50 | rabbitTemplate.setMessageConverter(messageConverter()); 51 | return rabbitTemplate; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /reports-service/src/main/java/com/pelinhangisi/reportsservice/dto/AdvertisementDto.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.reportsservice.dto; 2 | 3 | 4 | import lombok.AllArgsConstructor; 5 | import lombok.Builder; 6 | import lombok.Data; 7 | import lombok.NoArgsConstructor; 8 | 9 | import java.io.Serializable; 10 | import java.math.BigDecimal; 11 | import java.util.Date; 12 | 13 | @Data 14 | @Builder 15 | @NoArgsConstructor 16 | @AllArgsConstructor 17 | public class AdvertisementDto implements Serializable { 18 | 19 | private String id; 20 | private String title; 21 | private String description; 22 | private BigDecimal price; 23 | private String assignee; 24 | private Date advertisementDate; 25 | private String priorityType; 26 | private String advertisementStatus; 27 | private String userId; 28 | } 29 | -------------------------------------------------------------------------------- /reports-service/src/main/java/com/pelinhangisi/reportsservice/entity/Reports.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.reportsservice.entity; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import javax.persistence.Column; 8 | import javax.persistence.Entity; 9 | import javax.persistence.Id; 10 | import javax.persistence.Table; 11 | import java.time.LocalDateTime; 12 | 13 | @Entity 14 | @Table(name = "reports") 15 | @Data 16 | @AllArgsConstructor 17 | @NoArgsConstructor 18 | public class Reports { 19 | @Id 20 | @Column(name = "id", nullable = false) 21 | private String id; 22 | 23 | private String userId; 24 | private String advertisementId; 25 | private LocalDateTime date; 26 | private String state; 27 | 28 | 29 | } 30 | -------------------------------------------------------------------------------- /reports-service/src/main/java/com/pelinhangisi/reportsservice/repository/ReportsRepository.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.reportsservice.repository; 2 | 3 | import com.pelinhangisi.reportsservice.entity.Reports; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.stereotype.Repository; 6 | 7 | @Repository 8 | public interface ReportsRepository extends JpaRepository { 9 | } 10 | -------------------------------------------------------------------------------- /reports-service/src/main/java/com/pelinhangisi/reportsservice/service/ReportsService.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.reportsservice.service; 2 | 3 | 4 | import com.pelinhangisi.reportsservice.dto.AdvertisementDto; 5 | import com.pelinhangisi.reportsservice.entity.Reports; 6 | import com.pelinhangisi.reportsservice.repository.ReportsRepository; 7 | import lombok.RequiredArgsConstructor; 8 | import lombok.extern.slf4j.Slf4j; 9 | import org.springframework.amqp.rabbit.annotation.RabbitListener; 10 | import org.springframework.messaging.handler.annotation.Payload; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.time.LocalDateTime; 14 | 15 | @Service 16 | @RequiredArgsConstructor 17 | @Slf4j 18 | public class ReportsService { 19 | private final ReportsRepository reportsRepository; 20 | 21 | 22 | @RabbitListener(queues = "${queue.name}") 23 | public void consume(@Payload AdvertisementDto advertisementDto){ 24 | Reports reports = new Reports(); 25 | reports.setDate(LocalDateTime.now()); 26 | reports.setAdvertisementId(advertisementDto.getId()); 27 | reports.setUserId(advertisementDto.getUserId()); 28 | reports.setState("SENT"); 29 | log.info("Reports {} gönderildi."); 30 | reportsRepository.save(reports); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /reports-service/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | server.port= 7072 2 | 3 | spring.datasource.url = jdbc:postgresql://localhost:5432/reports-service 4 | spring.datasource.username= postgres 5 | spring.datasource.password= postgres 6 | spring.jpa.properties.hibernate.dialect= org.hibernate.dialect.PostgreSQLDialect 7 | spring.jpa.hibernate.ddl-auto=update 8 | spring.datasource.driver-class-name=org.postgresql.Driver 9 | 10 | queue.name = reports-queue 11 | 12 | spring.rabbitmq.template.exchange=reports-exchange 13 | spring.rabbitmq.template.routing-key=reports-routing 14 | 15 | eureka.client.serviceUrl.defaultZone= http://eureka:password@localhost:8761/eureka 16 | spring.application.name=reports-service -------------------------------------------------------------------------------- /reports-service/src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | ,--. 2 | ,--.--. ,---. ,---. ,---. ,--.--. ,-' '-. ,---. 3 | | .--' | .-. : | .-. | | .-. | | .--' '-. .-' ( .-' 4 | | | \ --. | '-' ' ' '-' ' | | | | .-' `) 5 | `--' `----' | |-' `---' `--' `--' `----' 6 | `--' -------------------------------------------------------------------------------- /reports-service/target/classes/application.properties: -------------------------------------------------------------------------------- 1 | server.port= 7072 2 | 3 | spring.datasource.url = jdbc:postgresql://localhost:5432/reports-service 4 | spring.datasource.username= postgres 5 | spring.datasource.password= postgres 6 | spring.jpa.properties.hibernate.dialect= org.hibernate.dialect.PostgreSQLDialect 7 | spring.jpa.hibernate.ddl-auto=update 8 | spring.datasource.driver-class-name=org.postgresql.Driver 9 | 10 | queue.name = reports-queue 11 | 12 | spring.rabbitmq.template.exchange=reports-exchange 13 | spring.rabbitmq.template.routing-key=reports-routing 14 | 15 | eureka.client.serviceUrl.defaultZone= http://eureka:password@localhost:8761/eureka 16 | spring.application.name=reports-service -------------------------------------------------------------------------------- /reports-service/target/classes/banner.txt: -------------------------------------------------------------------------------- 1 | ,--. 2 | ,--.--. ,---. ,---. ,---. ,--.--. ,-' '-. ,---. 3 | | .--' | .-. : | .-. | | .-. | | .--' '-. .-' ( .-' 4 | | | \ --. | '-' ' ' '-' ' | | | | .-' `) 5 | `--' `----' | |-' `---' `--' `--' `----' 6 | `--' -------------------------------------------------------------------------------- /reports-service/target/classes/com/pelinhangisi/reportsservice/ReportsServiceApplication.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/reports-service/target/classes/com/pelinhangisi/reportsservice/ReportsServiceApplication.class -------------------------------------------------------------------------------- /reports-service/target/classes/com/pelinhangisi/reportsservice/config/RabbitConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/reports-service/target/classes/com/pelinhangisi/reportsservice/config/RabbitConfig.class -------------------------------------------------------------------------------- /reports-service/target/classes/com/pelinhangisi/reportsservice/dto/AdvertisementDto$AdvertisementDtoBuilder.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/reports-service/target/classes/com/pelinhangisi/reportsservice/dto/AdvertisementDto$AdvertisementDtoBuilder.class -------------------------------------------------------------------------------- /reports-service/target/classes/com/pelinhangisi/reportsservice/dto/AdvertisementDto.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/reports-service/target/classes/com/pelinhangisi/reportsservice/dto/AdvertisementDto.class -------------------------------------------------------------------------------- /reports-service/target/classes/com/pelinhangisi/reportsservice/entity/Reports.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/reports-service/target/classes/com/pelinhangisi/reportsservice/entity/Reports.class -------------------------------------------------------------------------------- /reports-service/target/classes/com/pelinhangisi/reportsservice/repository/ReportsRepository.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/reports-service/target/classes/com/pelinhangisi/reportsservice/repository/ReportsRepository.class -------------------------------------------------------------------------------- /reports-service/target/classes/com/pelinhangisi/reportsservice/service/ReportsService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/reports-service/target/classes/com/pelinhangisi/reportsservice/service/ReportsService.class -------------------------------------------------------------------------------- /reports-service/target/final-project.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/reports-service/target/final-project.jar -------------------------------------------------------------------------------- /reports-service/target/maven-archiver/pom.properties: -------------------------------------------------------------------------------- 1 | #Generated by Maven 2 | #Mon Jul 18 06:38:04 MSK 2022 3 | groupId=com.pelinhangisi 4 | artifactId=reports-service 5 | version=1.0-SNAPSHOT 6 | -------------------------------------------------------------------------------- /reports-service/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | com\pelinhangisi\reportsservice\service\ReportsService.class 2 | com\pelinhangisi\reportsservice\ReportsServiceApplication.class 3 | com\pelinhangisi\reportsservice\dto\AdvertisementDto$AdvertisementDtoBuilder.class 4 | com\pelinhangisi\reportsservice\repository\ReportsRepository.class 5 | com\pelinhangisi\reportsservice\config\RabbitConfig.class 6 | com\pelinhangisi\reportsservice\entity\Reports.class 7 | com\pelinhangisi\reportsservice\dto\AdvertisementDto.class 8 | -------------------------------------------------------------------------------- /reports-service/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\reports-service\src\main\java\com\pelinhangisi\reportsservice\entity\Reports.java 2 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\reports-service\src\main\java\com\pelinhangisi\reportsservice\dto\AdvertisementDto.java 3 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\reports-service\src\main\java\com\pelinhangisi\reportsservice\service\ReportsService.java 4 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\reports-service\src\main\java\com\pelinhangisi\reportsservice\ReportsServiceApplication.java 5 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\reports-service\src\main\java\com\pelinhangisi\reportsservice\config\RabbitConfig.java 6 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\reports-service\src\main\java\com\pelinhangisi\reportsservice\repository\ReportsRepository.java 7 | -------------------------------------------------------------------------------- /reports-service/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/reports-service/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst -------------------------------------------------------------------------------- /reports-service/target/reports-service-1.0-SNAPSHOT.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/reports-service/target/reports-service-1.0-SNAPSHOT.jar -------------------------------------------------------------------------------- /user-service/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | Emlakjet-Final-Project 7 | com.pelinhangisi 8 | 1.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | user-service 13 | 14 | 15 | 17 16 | 17 17 | 18 | 19 | 20 | 21 | org.springframework.boot 22 | spring-boot-starter-data-jpa 23 | 24 | 25 | 26 | org.springframework.boot 27 | spring-boot-starter-web 28 | 29 | 30 | 31 | io.springfox 32 | springfox-swagger2 33 | 3.0.0 34 | 35 | 36 | 37 | io.springfox 38 | springfox-boot-starter 39 | 3.0.0 40 | 41 | 42 | 43 | io.springfox 44 | springfox-swagger-ui 45 | 2.9.2 46 | 47 | 48 | 49 | 50 | org.springframework.boot 51 | spring-boot-starter-test 52 | test 53 | 54 | 55 | 56 | org.testcontainers 57 | junit-jupiter 58 | test 59 | 60 | 61 | 62 | org.testcontainers 63 | postgresql 64 | test 65 | 66 | 67 | 68 | org.springframework.boot 69 | spring-boot-devtools 70 | runtime 71 | true 72 | 73 | 74 | 75 | org.postgresql 76 | postgresql 77 | runtime 78 | 79 | 80 | 81 | org.springframework.cloud 82 | spring-cloud-starter-netflix-eureka-client 83 | 84 | 85 | 86 | 87 | org.modelmapper 88 | modelmapper 89 | 2.3.0 90 | 91 | 92 | 93 | 94 | 95 | 96 | org.springframework.boot 97 | spring-boot-maven-plugin 98 | 99 | 100 | 101 | org.projectlombok 102 | lombok 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /user-service/src/main/java/com/pelinhangisi/userservice/UserServiceApplication.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.userservice; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cloud.netflix.eureka.EnableEurekaClient; 6 | 7 | @SpringBootApplication 8 | @EnableEurekaClient 9 | public class UserServiceApplication { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(UserServiceApplication.class, args); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /user-service/src/main/java/com/pelinhangisi/userservice/config/ModelMapperConfig.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.userservice.config; 2 | 3 | import org.modelmapper.ModelMapper; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | 7 | @Configuration 8 | public class ModelMapperConfig { 9 | @Bean 10 | public ModelMapper getModelMapper() { 11 | return new ModelMapper(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /user-service/src/main/java/com/pelinhangisi/userservice/config/SpringFoxConfig.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.userservice.config; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import springfox.documentation.builders.PathSelectors; 6 | import springfox.documentation.builders.RequestHandlerSelectors; 7 | import springfox.documentation.spi.DocumentationType; 8 | import springfox.documentation.spring.web.plugins.Docket; 9 | import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc; 10 | 11 | 12 | @Configuration 13 | @EnableSwagger2WebMvc 14 | public class SpringFoxConfig { 15 | @Bean 16 | public Docket api() { 17 | return new Docket(DocumentationType.SWAGGER_2) 18 | .select() 19 | .apis(RequestHandlerSelectors.any()) 20 | .paths(PathSelectors.any()) 21 | .build(); 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /user-service/src/main/java/com/pelinhangisi/userservice/controller/UserController.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.userservice.controller; 2 | 3 | 4 | import com.pelinhangisi.userservice.dto.UserRequest; 5 | import com.pelinhangisi.userservice.service.UserService; 6 | import lombok.RequiredArgsConstructor; 7 | import org.springframework.data.domain.Pageable; 8 | import org.springframework.data.domain.Slice; 9 | import org.springframework.http.ResponseEntity; 10 | import org.springframework.web.bind.annotation.*; 11 | 12 | 13 | @RestController 14 | @RequestMapping("/api/v1/users") 15 | @RequiredArgsConstructor 16 | public class UserController { 17 | 18 | private final UserService userService; 19 | 20 | 21 | @PostMapping("/create") 22 | public void save(@RequestBody UserRequest userRequest){ 23 | userService.save(userRequest); 24 | } 25 | 26 | @GetMapping("/{id}") 27 | public ResponseEntity get(@PathVariable("id") String id) { 28 | return ResponseEntity.ok(userService.get(id)); 29 | } 30 | 31 | @PutMapping("/update") 32 | public ResponseEntity update(@PathVariable("id") String id, @RequestBody UserRequest userRequest) { 33 | return ResponseEntity.ok(userService.update(id, userRequest)); 34 | } 35 | 36 | @DeleteMapping("/delete") 37 | public void delete(String id) { 38 | userService.delete(id); 39 | } 40 | 41 | 42 | @GetMapping("/getlist") 43 | public ResponseEntity> getAll(Pageable pageable) { 44 | return ResponseEntity.ok(userService.findAll(pageable)); 45 | } 46 | 47 | 48 | 49 | } 50 | -------------------------------------------------------------------------------- /user-service/src/main/java/com/pelinhangisi/userservice/dto/UserRequest.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.userservice.dto; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Builder; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | 8 | 9 | @Data 10 | @AllArgsConstructor 11 | @NoArgsConstructor 12 | @Builder 13 | public class UserRequest { 14 | private String username; 15 | private String firstname; 16 | private String lastname; 17 | private String email; 18 | } 19 | -------------------------------------------------------------------------------- /user-service/src/main/java/com/pelinhangisi/userservice/entity/User.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.userservice.entity; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Builder; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | 8 | import javax.persistence.*; 9 | import java.util.UUID; 10 | 11 | @Entity 12 | @Data 13 | @Table(name = "users") 14 | @NoArgsConstructor 15 | @AllArgsConstructor 16 | @Builder 17 | public class User{ 18 | @Id 19 | @GeneratedValue(strategy = GenerationType.IDENTITY) 20 | @Column(name = "id", nullable = false) 21 | private String id = UUID.randomUUID().toString(); 22 | 23 | @Column(name = "user_name") 24 | private String username; 25 | 26 | @Column(name = "first_name") 27 | private String firstname; 28 | 29 | @Column(name = "last_name") 30 | private String lastname; 31 | 32 | @Column(name = "email") 33 | private String email; 34 | 35 | @Column(name = "password") 36 | private String password; 37 | 38 | @Column(name = "phone_number") 39 | private String phoneNumber; 40 | 41 | 42 | } 43 | -------------------------------------------------------------------------------- /user-service/src/main/java/com/pelinhangisi/userservice/repository/UserRepository.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.userservice.repository; 2 | 3 | import com.pelinhangisi.userservice.dto.UserRequest; 4 | import com.pelinhangisi.userservice.entity.User; 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.Query; 7 | 8 | import java.util.List; 9 | 10 | 11 | public interface UserRepository extends JpaRepository { 12 | 13 | User findByUsername(String username); 14 | void save(UserRequest userRequest); 15 | List findAll(); 16 | User findUserByUsername(String username); 17 | 18 | 19 | } 20 | -------------------------------------------------------------------------------- /user-service/src/main/java/com/pelinhangisi/userservice/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.userservice.service; 2 | 3 | import com.pelinhangisi.userservice.dto.UserRequest; 4 | import com.pelinhangisi.userservice.entity.User; 5 | import com.pelinhangisi.userservice.repository.UserRepository; 6 | import lombok.RequiredArgsConstructor; 7 | import lombok.extern.slf4j.Slf4j; 8 | import org.modelmapper.ModelMapper; 9 | import org.springframework.data.domain.Pageable; 10 | import org.springframework.data.domain.Slice; 11 | import org.springframework.stereotype.Service; 12 | import org.springframework.transaction.annotation.Transactional; 13 | import org.springframework.util.Assert; 14 | 15 | import java.util.Optional; 16 | 17 | 18 | @Service 19 | @RequiredArgsConstructor 20 | @Slf4j 21 | public class UserService { 22 | 23 | private final UserRepository userRepository; 24 | private final ModelMapper modelMapper; 25 | 26 | 27 | 28 | @Transactional 29 | public void save(UserRequest userRequest){ 30 | User user = User.builder() 31 | .username(userRequest.getUsername()) 32 | .firstname(userRequest.getFirstname()) 33 | .lastname(userRequest.getLastname()) 34 | .email(userRequest.getEmail()) 35 | .build(); 36 | userRepository.save(user); 37 | log.info("New user saved {}", user.getId()); 38 | } 39 | 40 | 41 | public UserRequest get(String id) { 42 | User user = userRepository.findById(id) 43 | .orElseThrow(() -> new IllegalArgumentException()); 44 | return modelMapper.map(user, UserRequest.class); 45 | } 46 | 47 | @Transactional 48 | public UserRequest update(String id, UserRequest userRequest) { 49 | Assert.isNull(id, "Id cannot be null"); 50 | Optional user = userRepository.findById(id); 51 | User userUpToUpdate = user.map(item -> { 52 | item.setUsername(userRequest.getUsername()); 53 | item.setFirstname(userRequest.getFirstname()); 54 | item.setLastname(userRequest.getLastname()); 55 | return item; 56 | }).orElseThrow(IllegalArgumentException::new); 57 | return modelMapper.map(userRepository.save(userUpToUpdate), UserRequest.class); 58 | } 59 | 60 | @Transactional 61 | public void delete(String id) { 62 | User user = userRepository.findById(id) 63 | .orElseThrow(() -> new IllegalArgumentException()); 64 | userRepository.delete(user); 65 | } 66 | 67 | public Slice findAll(Pageable pageable) { 68 | Slice users = userRepository.findAll(pageable); 69 | return null; 70 | } 71 | 72 | public User findUserByUsername(String username){ 73 | return userRepository.findUserByUsername(username); 74 | } 75 | 76 | 77 | 78 | } 79 | -------------------------------------------------------------------------------- /user-service/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | server.port= 7070 2 | 3 | spring.datasource.url = jdbc:postgresql://localhost:5432/user-service 4 | spring.datasource.username= postgres 5 | spring.datasource.password= postgres 6 | spring.jpa.properties.hibernate.dialect= org.hibernate.dialect.PostgreSQLDialect 7 | spring.jpa.hibernate.ddl-auto=update 8 | spring.datasource.driver-class-name=org.postgresql.Driver 9 | 10 | eureka.client.serviceUrl.defaultZone= http://eureka:password@localhost:8761/eureka 11 | spring.application.name=user-service 12 | 13 | management.health.circuitbreakers.enabled=true 14 | management.endpoints.web.exposure.include=* 15 | management.endpoint.health.show-details=always 16 | 17 | # Resilience4j Properties 18 | resilience4j.circuitbreaker.instances.inventory.registerHealthIndicator=true 19 | resilience4j.circuitbreaker.instances.inventory.event-consumer-buffer-size=10 20 | resilience4j.circuitbreaker.instances.inventory.slidingWindowType=COUNT_BASED 21 | resilience4j.circuitbreaker.instances.inventory.slidingWindowSize=5 22 | resilience4j.circuitbreaker.instances.inventory.failureRateThreshold=50 23 | resilience4j.circuitbreaker.instances.inventory.waitDurationInOpenState=5s 24 | resilience4j.circuitbreaker.instances.inventory.permittedNumberOfCallsInHalfOpenState=3 25 | resilience4j.circuitbreaker.instances.inventory.automaticTransitionFromOpenToHalfOpenEnabled=true -------------------------------------------------------------------------------- /user-service/src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | ,--.,--. ,---. ,---. ,--.--. 2 | | || | ( .-' | .-. : | .--' 3 | ' '' ' .-' `) \ --. | | 4 | `----' `----' `----' `--' 5 | -------------------------------------------------------------------------------- /user-service/src/main/resources/users.sql: -------------------------------------------------------------------------------- 1 | create table users ( 2 | email VARCHAR(50), 3 | first_name VARCHAR(50), 4 | last_name VARCHAR(50), 5 | password VARCHAR(50), 6 | phone_number VARCHAR(50), 7 | user_name VARCHAR(50) 8 | ); 9 | 10 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('833-914-4440', 'Anstice', 'Bogies', 'WM3hdrMLqwO', 'abogies0@blogger.com', 'abogies0'); 11 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('415-591-4914', 'Ardelle', 'Burbage', 'NbWaN84ewe', 'aburbage1@arizona.edu', 'aburbage1'); 12 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('864-984-9489', 'Dulci', 'Yoell', 'XfMgRYyIUOqV', 'dyoell2@cmu.edu', 'dyoell2'); 13 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('273-628-7239', 'Flor', 'Sturr', 'sD55R4ImNd', 'fsturr3@exblog.jp', 'fsturr3'); 14 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('257-149-8574', 'Kimble', 'Hinksen', 'OumroluqrMG2', 'khinksen4@abc.net.au', 'khinksen4'); 15 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('258-910-4074', 'Antonietta', 'Thrift', 'GXDTgy', 'athrift5@storify.com', 'athrift5'); 16 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('593-474-9918', 'Omar', 'Reveley', 'wTWIb4d9pi', 'oreveley6@mayoclinic.com', 'oreveley6'); 17 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('701-478-3002', 'Alia', 'Studart', 'UDlRRkpNh', 'astudart7@squidoo.com', 'astudart7'); 18 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('407-678-6028', 'Towney', 'Romaine', 'STnkwVl82', 'tromaine8@liveinternet.ru', 'tromaine8'); 19 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('665-100-7801', 'Gabriele', 'O''Caine', 'Unw5A3B', 'gocaine9@mozilla.org', 'gocaine9'); 20 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('767-230-5802', 'Lulu', 'Gonnel', 'nhuYHgD', 'lgonnela@sciencedaily.com', 'lgonnela'); 21 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('277-628-9088', 'Nonah', 'Schnitter', 'uJ6ZhQ', 'nschnitterb@com.com', 'nschnitterb'); 22 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('748-546-8158', 'Jolee', 'Bousquet', '4sDu2Beb', 'jbousquetc@csmonitor.com', 'jbousquetc'); 23 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('206-969-1659', 'Todd', 'Ethelstone', 'z4TTEx', 'tethelstoned@acquirethisname.com', 'tethelstoned'); 24 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('125-635-3272', 'Lek', 'McNee', 'PT1aRACv', 'lmcneee@mapquest.com', 'lmcneee'); 25 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('842-884-9057', 'Lucinda', 'Lesaunier', 'MGKFQMiXxY', 'llesaunierf@google.pl', 'llesaunierf'); 26 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('275-975-0604', 'Sue', 'Haker', 'kJbFVqdo4CH', 'shakerg@statcounter.com', 'shakerg'); 27 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('893-313-3711', 'Norman', 'Lownes', 'gSnujnq', 'nlownesh@scientificamerican.com', 'nlownesh'); 28 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('309-523-0162', 'Stefa', 'McRinn', 'HCknNF13', 'smcrinni@mac.com', 'smcrinni'); 29 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('443-205-9570', 'Rhonda', 'Dohmer', '7JQXNmQUnXaA', 'rdohmerj@hud.gov', 'rdohmerj'); 30 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('575-921-4724', 'Shaylah', 'Kinig', '8tim0j', 'skinigk@github.io', 'skinigk'); 31 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('216-360-2752', 'Philipa', 'Letterick', '3CNwewYVQXG', 'pletterickl@hibu.com', 'pletterickl'); 32 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('881-430-6376', 'Justin', 'Dewhurst', 't6qRbeclH5ir', 'jdewhurstm@php.net', 'jdewhurstm'); 33 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('497-851-6234', 'Thorvald', 'Scouse', '6KDkQIz', 'tscousen@de.vu', 'tscousen'); 34 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('188-979-4502', 'Livia', 'Ruby', 'NHAhM4OmNT', 'lrubyo@free.fr', 'lrubyo'); 35 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('975-377-3813', 'Berrie', 'Sowte', 'DBo77x', 'bsowtep@webeden.co.uk', 'bsowtep'); 36 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('186-970-3310', 'Ana', 'Dwelling', 'DMP0Rsam7bTr', 'adwellingq@flavors.me', 'adwellingq'); 37 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('781-646-7455', 'Elladine', 'Garnar', 'gRk2QNt', 'egarnarr@mit.edu', 'egarnarr'); 38 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('122-654-3507', 'Gradeigh', 'Murrigan', 'jf22WGRGLH', 'gmurrigans@oaic.gov.au', 'gmurrigans'); 39 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('353-744-8582', 'Siward', 'Widdup', 'GfRSU0uy', 'swiddupt@webeden.co.uk', 'swiddupt'); 40 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('714-396-0230', 'Skell', 'Robottham', '6y9TAGjrqkP0', 'srobotthamu@e-recht24.de', 'srobotthamu'); 41 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('662-148-5625', 'Selma', 'Priscott', 'UbDKT5n', 'spriscottv@amazon.co.jp', 'spriscottv'); 42 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('442-269-6204', 'Dolli', 'Repp', 'KJPpArpgR', 'dreppw@latimes.com', 'dreppw'); 43 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('318-812-3440', 'Erminie', 'Richardson', 'ctZdcIi8d', 'erichardsonx@usda.gov', 'erichardsonx'); 44 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('551-206-8229', 'Debbie', 'Durram', 'dYLxUpS', 'ddurramy@webmd.com', 'ddurramy'); 45 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('544-709-3990', 'Helene', 'Defraine', 'J4GdPqZ', 'hdefrainez@state.tx.us', 'hdefrainez'); 46 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('101-947-4426', 'Ware', 'Yedy', 'RD9Af3uB', 'wyedy10@edublogs.org', 'wyedy10'); 47 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('462-911-6679', 'Silva', 'Gendricke', '13xpsvixV2n', 'sgendricke11@bing.com', 'sgendricke11'); 48 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('407-717-6244', 'Gratia', 'Pancast', 'fUT0zfBqaZz', 'gpancast12@economist.com', 'gpancast12'); 49 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('273-553-1242', 'Garwin', 'Croston', 'MYp1LuY', 'gcroston13@ocn.ne.jp', 'gcroston13'); 50 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('900-243-1003', 'Filippo', 'Haresnape', 'IDcI2dscitC', 'fharesnape14@aboutads.info', 'fharesnape14'); 51 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('893-290-6271', 'Mab', 'McGerr', 'H60AUT', 'mmcgerr15@cnn.com', 'mmcgerr15'); 52 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('350-684-7832', 'Allissa', 'Blasius', '2rBoMgQCWHgO', 'ablasius16@cam.ac.uk', 'ablasius16'); 53 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('259-446-4695', 'Elihu', 'Mecco', 's6P2yRrv57', 'emecco17@hhs.gov', 'emecco17'); 54 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('145-731-8654', 'Tansy', 'Seward', 'wzQBjZDK', 'tseward18@zdnet.com', 'tseward18'); 55 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('819-302-6937', 'Ginny', 'Scrine', 'qS88cszR', 'gscrine19@indiatimes.com', 'gscrine19'); 56 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('868-474-1067', 'Rhodie', 'Nassi', 'TnJcbjGndBR4', 'rnassi1a@nymag.com', 'rnassi1a'); 57 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('916-845-9586', 'Albert', 'O''Heaney', 'pnNhcu', 'aoheaney1b@springer.com', 'aoheaney1b'); 58 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('970-273-3354', 'Saloma', 'Olivello', 'dXup4L8Y', 'solivello1c@github.com', 'solivello1c'); 59 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('734-999-4940', 'Cindy', 'Charters', 'YMuI1Wp2u', 'ccharters1d@blogtalkradio.com', 'ccharters1d'); 60 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('465-195-7914', 'Maryjane', 'Peevor', 'u6xDm8aE8', 'mpeevor1e@businessweek.com', 'mpeevor1e'); 61 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('285-877-9041', 'Hoebart', 'Cremer', 'SsvvF5s', 'hcremer1f@eventbrite.com', 'hcremer1f'); 62 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('394-707-1244', 'Gayler', 'Mor', 'PbMPk5ksFUa', 'gmor1g@diigo.com', 'gmor1g'); 63 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('394-186-7900', 'Launce', 'Northover', 'XACkrSNM', 'lnorthover1h@nbcnews.com', 'lnorthover1h'); 64 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('947-138-1788', 'Silvanus', 'Nerne', '8ZWR41h1ZxFp', 'snerne1i@usatoday.com', 'snerne1i'); 65 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('744-897-4535', 'Hervey', 'Proswell', 'pAVPLz6rx', 'hproswell1j@linkedin.com', 'hproswell1j'); 66 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('911-817-8732', 'Riane', 'Besnardeau', 'sMOKmGRh', 'rbesnardeau1k@csmonitor.com', 'rbesnardeau1k'); 67 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('339-898-7583', 'Ondrea', 'Itzhayek', 'Ldfzpcj1I', 'oitzhayek1l@goo.ne.jp', 'oitzhayek1l'); 68 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('562-723-1407', 'Meaghan', 'Bangle', 'lN45GvKqzJ11', 'mbangle1m@sitemeter.com', 'mbangle1m'); 69 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('612-505-1631', 'Forest', 'Andover', 'ShkcXB5I7', 'fandover1n@reverbnation.com', 'fandover1n'); 70 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('368-257-5145', 'Dianne', 'Fanning', 'plSm4T', 'dfanning1o@samsung.com', 'dfanning1o'); 71 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('503-426-5683', 'Norry', 'Duigan', 'r1NJv6U8', 'nduigan1p@un.org', 'nduigan1p'); 72 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('611-638-1062', 'Arni', 'Tuckie', 'YsoeZRCJi00f', 'atuckie1q@wikia.com', 'atuckie1q'); 73 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('782-775-8392', 'Maire', 'Ulyatt', 'dEOE5VzU', 'mulyatt1r@prlog.org', 'mulyatt1r'); 74 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('735-721-6075', 'Gallard', 'McMechan', 'EuATyiUY', 'gmcmechan1s@thetimes.co.uk', 'gmcmechan1s'); 75 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('395-529-0134', 'Veronike', 'Andrzejak', '38o7clK9R8', 'vandrzejak1t@slate.com', 'vandrzejak1t'); 76 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('425-215-1645', 'Rice', 'Gulberg', 'CbGMlBJp', 'rgulberg1u@ameblo.jp', 'rgulberg1u'); 77 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('448-942-6206', 'Emmalynn', 'Huske', 'wrYXROToJH1x', 'ehuske1v@mediafire.com', 'ehuske1v'); 78 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('655-213-6483', 'Simmonds', 'Brodnecke', 'bYiTPB7', 'sbrodnecke1w@engadget.com', 'sbrodnecke1w'); 79 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('670-841-9393', 'Ulrike', 'Winnett', 'iaobYceh', 'uwinnett1x@engadget.com', 'uwinnett1x'); 80 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('946-787-0858', 'Clair', 'Dingwall', 'zYawYGajW', 'cdingwall1y@arstechnica.com', 'cdingwall1y'); 81 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('230-659-5101', 'Chrysler', 'Jensen', '0pWUftanIB', 'cjensen1z@creativecommons.org', 'cjensen1z'); 82 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('891-669-9456', 'Missie', 'Matussow', 'SfPMV7v5YBji', 'mmatussow20@ihg.com', 'mmatussow20'); 83 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('314-178-0056', 'Maximilien', 'Seakings', 'szpyfvIiY', 'mseakings21@economist.com', 'mseakings21'); 84 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('378-496-8072', 'Johnette', 'Swancock', '8dcXCZ', 'jswancock22@virginia.edu', 'jswancock22'); 85 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('991-937-3141', 'Frederico', 'Durdy', 'twnMfv', 'fdurdy23@whitehouse.gov', 'fdurdy23'); 86 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('777-524-3731', 'Daloris', 'Ciccotti', '4lL3Fplm', 'dciccotti24@who.int', 'dciccotti24'); 87 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('814-149-2414', 'Merry', 'Shilvock', 'VJQGzvZDfvP', 'mshilvock25@opensource.org', 'mshilvock25'); 88 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('914-880-4358', 'Averil', 'Tanzer', '8s8a2JGtTTzo', 'atanzer26@va.gov', 'atanzer26'); 89 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('661-506-4107', 'Myrilla', 'Renfrew', 'NgG2JOv', 'mrenfrew27@prlog.org', 'mrenfrew27'); 90 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('275-517-0636', 'Christoforo', 'Lidster', 'RMwOiP', 'clidster28@slate.com', 'clidster28'); 91 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('465-978-6006', 'Rowan', 'O''Roan', 'HREMRG', 'roroan29@reuters.com', 'roroan29'); 92 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('510-869-1093', 'Job', 'Tilley', 'LvQm1I3QXq', 'jtilley2a@dyndns.org', 'jtilley2a'); 93 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('279-411-4663', 'Lou', 'Schelle', '6T2k19gSCG1', 'lschelle2b@pcworld.com', 'lschelle2b'); 94 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('221-689-9522', 'Rosaline', 'Sharphouse', 'fd03ykZzzwE', 'rsharphouse2c@sourceforge.net', 'rsharphouse2c'); 95 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('110-703-4074', 'Malvin', 'McLaren', 'rYlEaqjV', 'mmclaren2d@fotki.com', 'mmclaren2d'); 96 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('847-899-2152', 'Hermy', 'Sloat', 'KgDITMv7XJA4', 'hsloat2e@howstuffworks.com', 'hsloat2e'); 97 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('197-673-3949', 'Reggie', 'Snoddin', 'reqgJXywWd', 'rsnoddin2f@businessweek.com', 'rsnoddin2f'); 98 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('218-430-4326', 'Gare', 'Isoldi', 'fdlS6b', 'gisoldi2g@google.ca', 'gisoldi2g'); 99 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('373-533-5862', 'Cheri', 'Hazlehurst', 'AJp1z02R', 'chazlehurst2h@sciencedirect.com', 'chazlehurst2h'); 100 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('933-715-7267', 'Juline', 'Bubear', 'Gj1FfeP', 'jbubear2i@dot.gov', 'jbubear2i'); 101 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('196-127-4793', 'Payton', 'Choulerton', 'GC92TTZG1p', 'pchoulerton2j@squarespace.com', 'pchoulerton2j'); 102 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('425-273-3807', 'Evangelina', 'Newnham', 'hg0bep50jj', 'enewnham2k@sakura.ne.jp', 'enewnham2k'); 103 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('991-526-5296', 'Virgie', 'Eburne', 'VB3ymnYHJl', 'veburne2l@howstuffworks.com', 'veburne2l'); 104 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('223-273-1150', 'Chancey', 'Hannent', 'OoQQaK', 'channent2m@liveinternet.ru', 'channent2m'); 105 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('540-885-6224', 'Frederigo', 'Galpen', '4OcR5C', 'fgalpen2n@hatena.ne.jp', 'fgalpen2n'); 106 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('933-494-3607', 'Hammad', 'Tiner', 'U6ZGtxkduy', 'htiner2o@nydailynews.com', 'htiner2o'); 107 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('311-453-2190', 'Marion', 'Shawell', 'eFBacdmjw', 'mshawell2p@wordpress.org', 'mshawell2p'); 108 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('711-997-9780', 'Brigida', 'Massie', 'tdkqBWLopu', 'bmassie2q@skype.com', 'bmassie2q'); 109 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('350-165-2793', 'Theo', 'Duly', 'JJwFif', 'tduly2r@economist.com', 'tduly2r'); 110 | -------------------------------------------------------------------------------- /user-service/src/test/java/com/pelinhangisi/userservice/UserServiceApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.pelinhangisi.userservice; 2 | 3 | import com.fasterxml.jackson.databind.ObjectMapper; 4 | import com.pelinhangisi.userservice.dto.UserRequest; 5 | import com.pelinhangisi.userservice.repository.UserRepository; 6 | import org.junit.jupiter.api.Assertions; 7 | import org.junit.jupiter.api.Test; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase; 10 | import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; 11 | import org.springframework.boot.test.context.SpringBootTest; 12 | import org.springframework.http.MediaType; 13 | import org.springframework.test.context.DynamicPropertyRegistry; 14 | import org.springframework.test.context.DynamicPropertySource; 15 | import org.springframework.test.web.servlet.MockMvc; 16 | import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; 17 | import org.testcontainers.containers.PostgreSQLContainer; 18 | import org.testcontainers.junit.jupiter.Container; 19 | import org.testcontainers.junit.jupiter.Testcontainers; 20 | 21 | 22 | 23 | import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; 24 | 25 | 26 | @SpringBootTest 27 | @Testcontainers 28 | @AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE) 29 | @AutoConfigureMockMvc 30 | public class UserServiceApplicationTests{ 31 | 32 | @Container 33 | public static PostgreSQLContainer container = new PostgreSQLContainer() 34 | .withUsername("postgres") 35 | .withPassword("postgres") 36 | .withDatabaseName("user-service"); 37 | 38 | 39 | @Autowired 40 | private MockMvc mockMvc; 41 | 42 | @Autowired 43 | private ObjectMapper objectMapper; 44 | 45 | @Autowired 46 | private UserRepository userRepository; 47 | 48 | @DynamicPropertySource 49 | static void properties(DynamicPropertyRegistry registry){ 50 | registry.add("spring.datasource.url", container::getJdbcUrl); 51 | registry.add("spring.datasource.password", container::getPassword); 52 | registry.add("spring.datasource.username", container::getUsername); 53 | 54 | } 55 | 56 | @Test 57 | void shouldCreateUser() throws Exception { 58 | UserRequest userRequest = getUserRequest(); 59 | String userRequestString = objectMapper.writeValueAsString(userRequest); 60 | 61 | mockMvc.perform(MockMvcRequestBuilders.post("/api/v1/users/signup") 62 | .contentType(MediaType.APPLICATION_JSON) 63 | .content(userRequestString)) 64 | .andExpect(status().isCreated()); 65 | Assertions.assertEquals(1, userRepository.findAll().size()); 66 | } 67 | 68 | private UserRequest getUserRequest() { 69 | return UserRequest.builder() 70 | .username("pelince") 71 | .firstname("pelin") 72 | .lastname("hangişi") 73 | .email("pelin@test.com") 74 | .build(); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /user-service/target/classes/application.properties: -------------------------------------------------------------------------------- 1 | server.port= 7070 2 | 3 | spring.datasource.url = jdbc:postgresql://localhost:5432/user-service 4 | spring.datasource.username= postgres 5 | spring.datasource.password= postgres 6 | spring.jpa.properties.hibernate.dialect= org.hibernate.dialect.PostgreSQLDialect 7 | spring.jpa.hibernate.ddl-auto=update 8 | spring.datasource.driver-class-name=org.postgresql.Driver 9 | 10 | eureka.client.serviceUrl.defaultZone= http://eureka:password@localhost:8761/eureka 11 | spring.application.name=user-service 12 | 13 | management.health.circuitbreakers.enabled=true 14 | management.endpoints.web.exposure.include=* 15 | management.endpoint.health.show-details=always 16 | 17 | # Resilience4j Properties 18 | resilience4j.circuitbreaker.instances.inventory.registerHealthIndicator=true 19 | resilience4j.circuitbreaker.instances.inventory.event-consumer-buffer-size=10 20 | resilience4j.circuitbreaker.instances.inventory.slidingWindowType=COUNT_BASED 21 | resilience4j.circuitbreaker.instances.inventory.slidingWindowSize=5 22 | resilience4j.circuitbreaker.instances.inventory.failureRateThreshold=50 23 | resilience4j.circuitbreaker.instances.inventory.waitDurationInOpenState=5s 24 | resilience4j.circuitbreaker.instances.inventory.permittedNumberOfCallsInHalfOpenState=3 25 | resilience4j.circuitbreaker.instances.inventory.automaticTransitionFromOpenToHalfOpenEnabled=true -------------------------------------------------------------------------------- /user-service/target/classes/banner.txt: -------------------------------------------------------------------------------- 1 | ,--.,--. ,---. ,---. ,--.--. 2 | | || | ( .-' | .-. : | .--' 3 | ' '' ' .-' `) \ --. | | 4 | `----' `----' `----' `--' 5 | -------------------------------------------------------------------------------- /user-service/target/classes/com/pelinhangisi/userservice/UserServiceApplication.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/user-service/target/classes/com/pelinhangisi/userservice/UserServiceApplication.class -------------------------------------------------------------------------------- /user-service/target/classes/com/pelinhangisi/userservice/config/ModelMapperConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/user-service/target/classes/com/pelinhangisi/userservice/config/ModelMapperConfig.class -------------------------------------------------------------------------------- /user-service/target/classes/com/pelinhangisi/userservice/config/SpringFoxConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/user-service/target/classes/com/pelinhangisi/userservice/config/SpringFoxConfig.class -------------------------------------------------------------------------------- /user-service/target/classes/com/pelinhangisi/userservice/controller/UserController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/user-service/target/classes/com/pelinhangisi/userservice/controller/UserController.class -------------------------------------------------------------------------------- /user-service/target/classes/com/pelinhangisi/userservice/dto/UserRequest$UserRequestBuilder.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/user-service/target/classes/com/pelinhangisi/userservice/dto/UserRequest$UserRequestBuilder.class -------------------------------------------------------------------------------- /user-service/target/classes/com/pelinhangisi/userservice/dto/UserRequest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/user-service/target/classes/com/pelinhangisi/userservice/dto/UserRequest.class -------------------------------------------------------------------------------- /user-service/target/classes/com/pelinhangisi/userservice/entity/User$UserBuilder.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/user-service/target/classes/com/pelinhangisi/userservice/entity/User$UserBuilder.class -------------------------------------------------------------------------------- /user-service/target/classes/com/pelinhangisi/userservice/entity/User.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/user-service/target/classes/com/pelinhangisi/userservice/entity/User.class -------------------------------------------------------------------------------- /user-service/target/classes/com/pelinhangisi/userservice/repository/UserRepository.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/user-service/target/classes/com/pelinhangisi/userservice/repository/UserRepository.class -------------------------------------------------------------------------------- /user-service/target/classes/com/pelinhangisi/userservice/service/UserService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/user-service/target/classes/com/pelinhangisi/userservice/service/UserService.class -------------------------------------------------------------------------------- /user-service/target/classes/users.sql: -------------------------------------------------------------------------------- 1 | create table users ( 2 | email VARCHAR(50), 3 | first_name VARCHAR(50), 4 | last_name VARCHAR(50), 5 | password VARCHAR(50), 6 | phone_number VARCHAR(50), 7 | user_name VARCHAR(50) 8 | ); 9 | 10 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('833-914-4440', 'Anstice', 'Bogies', 'WM3hdrMLqwO', 'abogies0@blogger.com', 'abogies0'); 11 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('415-591-4914', 'Ardelle', 'Burbage', 'NbWaN84ewe', 'aburbage1@arizona.edu', 'aburbage1'); 12 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('864-984-9489', 'Dulci', 'Yoell', 'XfMgRYyIUOqV', 'dyoell2@cmu.edu', 'dyoell2'); 13 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('273-628-7239', 'Flor', 'Sturr', 'sD55R4ImNd', 'fsturr3@exblog.jp', 'fsturr3'); 14 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('257-149-8574', 'Kimble', 'Hinksen', 'OumroluqrMG2', 'khinksen4@abc.net.au', 'khinksen4'); 15 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('258-910-4074', 'Antonietta', 'Thrift', 'GXDTgy', 'athrift5@storify.com', 'athrift5'); 16 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('593-474-9918', 'Omar', 'Reveley', 'wTWIb4d9pi', 'oreveley6@mayoclinic.com', 'oreveley6'); 17 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('701-478-3002', 'Alia', 'Studart', 'UDlRRkpNh', 'astudart7@squidoo.com', 'astudart7'); 18 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('407-678-6028', 'Towney', 'Romaine', 'STnkwVl82', 'tromaine8@liveinternet.ru', 'tromaine8'); 19 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('665-100-7801', 'Gabriele', 'O''Caine', 'Unw5A3B', 'gocaine9@mozilla.org', 'gocaine9'); 20 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('767-230-5802', 'Lulu', 'Gonnel', 'nhuYHgD', 'lgonnela@sciencedaily.com', 'lgonnela'); 21 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('277-628-9088', 'Nonah', 'Schnitter', 'uJ6ZhQ', 'nschnitterb@com.com', 'nschnitterb'); 22 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('748-546-8158', 'Jolee', 'Bousquet', '4sDu2Beb', 'jbousquetc@csmonitor.com', 'jbousquetc'); 23 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('206-969-1659', 'Todd', 'Ethelstone', 'z4TTEx', 'tethelstoned@acquirethisname.com', 'tethelstoned'); 24 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('125-635-3272', 'Lek', 'McNee', 'PT1aRACv', 'lmcneee@mapquest.com', 'lmcneee'); 25 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('842-884-9057', 'Lucinda', 'Lesaunier', 'MGKFQMiXxY', 'llesaunierf@google.pl', 'llesaunierf'); 26 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('275-975-0604', 'Sue', 'Haker', 'kJbFVqdo4CH', 'shakerg@statcounter.com', 'shakerg'); 27 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('893-313-3711', 'Norman', 'Lownes', 'gSnujnq', 'nlownesh@scientificamerican.com', 'nlownesh'); 28 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('309-523-0162', 'Stefa', 'McRinn', 'HCknNF13', 'smcrinni@mac.com', 'smcrinni'); 29 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('443-205-9570', 'Rhonda', 'Dohmer', '7JQXNmQUnXaA', 'rdohmerj@hud.gov', 'rdohmerj'); 30 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('575-921-4724', 'Shaylah', 'Kinig', '8tim0j', 'skinigk@github.io', 'skinigk'); 31 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('216-360-2752', 'Philipa', 'Letterick', '3CNwewYVQXG', 'pletterickl@hibu.com', 'pletterickl'); 32 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('881-430-6376', 'Justin', 'Dewhurst', 't6qRbeclH5ir', 'jdewhurstm@php.net', 'jdewhurstm'); 33 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('497-851-6234', 'Thorvald', 'Scouse', '6KDkQIz', 'tscousen@de.vu', 'tscousen'); 34 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('188-979-4502', 'Livia', 'Ruby', 'NHAhM4OmNT', 'lrubyo@free.fr', 'lrubyo'); 35 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('975-377-3813', 'Berrie', 'Sowte', 'DBo77x', 'bsowtep@webeden.co.uk', 'bsowtep'); 36 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('186-970-3310', 'Ana', 'Dwelling', 'DMP0Rsam7bTr', 'adwellingq@flavors.me', 'adwellingq'); 37 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('781-646-7455', 'Elladine', 'Garnar', 'gRk2QNt', 'egarnarr@mit.edu', 'egarnarr'); 38 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('122-654-3507', 'Gradeigh', 'Murrigan', 'jf22WGRGLH', 'gmurrigans@oaic.gov.au', 'gmurrigans'); 39 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('353-744-8582', 'Siward', 'Widdup', 'GfRSU0uy', 'swiddupt@webeden.co.uk', 'swiddupt'); 40 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('714-396-0230', 'Skell', 'Robottham', '6y9TAGjrqkP0', 'srobotthamu@e-recht24.de', 'srobotthamu'); 41 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('662-148-5625', 'Selma', 'Priscott', 'UbDKT5n', 'spriscottv@amazon.co.jp', 'spriscottv'); 42 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('442-269-6204', 'Dolli', 'Repp', 'KJPpArpgR', 'dreppw@latimes.com', 'dreppw'); 43 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('318-812-3440', 'Erminie', 'Richardson', 'ctZdcIi8d', 'erichardsonx@usda.gov', 'erichardsonx'); 44 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('551-206-8229', 'Debbie', 'Durram', 'dYLxUpS', 'ddurramy@webmd.com', 'ddurramy'); 45 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('544-709-3990', 'Helene', 'Defraine', 'J4GdPqZ', 'hdefrainez@state.tx.us', 'hdefrainez'); 46 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('101-947-4426', 'Ware', 'Yedy', 'RD9Af3uB', 'wyedy10@edublogs.org', 'wyedy10'); 47 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('462-911-6679', 'Silva', 'Gendricke', '13xpsvixV2n', 'sgendricke11@bing.com', 'sgendricke11'); 48 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('407-717-6244', 'Gratia', 'Pancast', 'fUT0zfBqaZz', 'gpancast12@economist.com', 'gpancast12'); 49 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('273-553-1242', 'Garwin', 'Croston', 'MYp1LuY', 'gcroston13@ocn.ne.jp', 'gcroston13'); 50 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('900-243-1003', 'Filippo', 'Haresnape', 'IDcI2dscitC', 'fharesnape14@aboutads.info', 'fharesnape14'); 51 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('893-290-6271', 'Mab', 'McGerr', 'H60AUT', 'mmcgerr15@cnn.com', 'mmcgerr15'); 52 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('350-684-7832', 'Allissa', 'Blasius', '2rBoMgQCWHgO', 'ablasius16@cam.ac.uk', 'ablasius16'); 53 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('259-446-4695', 'Elihu', 'Mecco', 's6P2yRrv57', 'emecco17@hhs.gov', 'emecco17'); 54 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('145-731-8654', 'Tansy', 'Seward', 'wzQBjZDK', 'tseward18@zdnet.com', 'tseward18'); 55 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('819-302-6937', 'Ginny', 'Scrine', 'qS88cszR', 'gscrine19@indiatimes.com', 'gscrine19'); 56 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('868-474-1067', 'Rhodie', 'Nassi', 'TnJcbjGndBR4', 'rnassi1a@nymag.com', 'rnassi1a'); 57 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('916-845-9586', 'Albert', 'O''Heaney', 'pnNhcu', 'aoheaney1b@springer.com', 'aoheaney1b'); 58 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('970-273-3354', 'Saloma', 'Olivello', 'dXup4L8Y', 'solivello1c@github.com', 'solivello1c'); 59 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('734-999-4940', 'Cindy', 'Charters', 'YMuI1Wp2u', 'ccharters1d@blogtalkradio.com', 'ccharters1d'); 60 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('465-195-7914', 'Maryjane', 'Peevor', 'u6xDm8aE8', 'mpeevor1e@businessweek.com', 'mpeevor1e'); 61 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('285-877-9041', 'Hoebart', 'Cremer', 'SsvvF5s', 'hcremer1f@eventbrite.com', 'hcremer1f'); 62 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('394-707-1244', 'Gayler', 'Mor', 'PbMPk5ksFUa', 'gmor1g@diigo.com', 'gmor1g'); 63 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('394-186-7900', 'Launce', 'Northover', 'XACkrSNM', 'lnorthover1h@nbcnews.com', 'lnorthover1h'); 64 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('947-138-1788', 'Silvanus', 'Nerne', '8ZWR41h1ZxFp', 'snerne1i@usatoday.com', 'snerne1i'); 65 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('744-897-4535', 'Hervey', 'Proswell', 'pAVPLz6rx', 'hproswell1j@linkedin.com', 'hproswell1j'); 66 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('911-817-8732', 'Riane', 'Besnardeau', 'sMOKmGRh', 'rbesnardeau1k@csmonitor.com', 'rbesnardeau1k'); 67 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('339-898-7583', 'Ondrea', 'Itzhayek', 'Ldfzpcj1I', 'oitzhayek1l@goo.ne.jp', 'oitzhayek1l'); 68 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('562-723-1407', 'Meaghan', 'Bangle', 'lN45GvKqzJ11', 'mbangle1m@sitemeter.com', 'mbangle1m'); 69 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('612-505-1631', 'Forest', 'Andover', 'ShkcXB5I7', 'fandover1n@reverbnation.com', 'fandover1n'); 70 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('368-257-5145', 'Dianne', 'Fanning', 'plSm4T', 'dfanning1o@samsung.com', 'dfanning1o'); 71 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('503-426-5683', 'Norry', 'Duigan', 'r1NJv6U8', 'nduigan1p@un.org', 'nduigan1p'); 72 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('611-638-1062', 'Arni', 'Tuckie', 'YsoeZRCJi00f', 'atuckie1q@wikia.com', 'atuckie1q'); 73 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('782-775-8392', 'Maire', 'Ulyatt', 'dEOE5VzU', 'mulyatt1r@prlog.org', 'mulyatt1r'); 74 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('735-721-6075', 'Gallard', 'McMechan', 'EuATyiUY', 'gmcmechan1s@thetimes.co.uk', 'gmcmechan1s'); 75 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('395-529-0134', 'Veronike', 'Andrzejak', '38o7clK9R8', 'vandrzejak1t@slate.com', 'vandrzejak1t'); 76 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('425-215-1645', 'Rice', 'Gulberg', 'CbGMlBJp', 'rgulberg1u@ameblo.jp', 'rgulberg1u'); 77 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('448-942-6206', 'Emmalynn', 'Huske', 'wrYXROToJH1x', 'ehuske1v@mediafire.com', 'ehuske1v'); 78 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('655-213-6483', 'Simmonds', 'Brodnecke', 'bYiTPB7', 'sbrodnecke1w@engadget.com', 'sbrodnecke1w'); 79 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('670-841-9393', 'Ulrike', 'Winnett', 'iaobYceh', 'uwinnett1x@engadget.com', 'uwinnett1x'); 80 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('946-787-0858', 'Clair', 'Dingwall', 'zYawYGajW', 'cdingwall1y@arstechnica.com', 'cdingwall1y'); 81 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('230-659-5101', 'Chrysler', 'Jensen', '0pWUftanIB', 'cjensen1z@creativecommons.org', 'cjensen1z'); 82 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('891-669-9456', 'Missie', 'Matussow', 'SfPMV7v5YBji', 'mmatussow20@ihg.com', 'mmatussow20'); 83 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('314-178-0056', 'Maximilien', 'Seakings', 'szpyfvIiY', 'mseakings21@economist.com', 'mseakings21'); 84 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('378-496-8072', 'Johnette', 'Swancock', '8dcXCZ', 'jswancock22@virginia.edu', 'jswancock22'); 85 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('991-937-3141', 'Frederico', 'Durdy', 'twnMfv', 'fdurdy23@whitehouse.gov', 'fdurdy23'); 86 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('777-524-3731', 'Daloris', 'Ciccotti', '4lL3Fplm', 'dciccotti24@who.int', 'dciccotti24'); 87 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('814-149-2414', 'Merry', 'Shilvock', 'VJQGzvZDfvP', 'mshilvock25@opensource.org', 'mshilvock25'); 88 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('914-880-4358', 'Averil', 'Tanzer', '8s8a2JGtTTzo', 'atanzer26@va.gov', 'atanzer26'); 89 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('661-506-4107', 'Myrilla', 'Renfrew', 'NgG2JOv', 'mrenfrew27@prlog.org', 'mrenfrew27'); 90 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('275-517-0636', 'Christoforo', 'Lidster', 'RMwOiP', 'clidster28@slate.com', 'clidster28'); 91 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('465-978-6006', 'Rowan', 'O''Roan', 'HREMRG', 'roroan29@reuters.com', 'roroan29'); 92 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('510-869-1093', 'Job', 'Tilley', 'LvQm1I3QXq', 'jtilley2a@dyndns.org', 'jtilley2a'); 93 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('279-411-4663', 'Lou', 'Schelle', '6T2k19gSCG1', 'lschelle2b@pcworld.com', 'lschelle2b'); 94 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('221-689-9522', 'Rosaline', 'Sharphouse', 'fd03ykZzzwE', 'rsharphouse2c@sourceforge.net', 'rsharphouse2c'); 95 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('110-703-4074', 'Malvin', 'McLaren', 'rYlEaqjV', 'mmclaren2d@fotki.com', 'mmclaren2d'); 96 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('847-899-2152', 'Hermy', 'Sloat', 'KgDITMv7XJA4', 'hsloat2e@howstuffworks.com', 'hsloat2e'); 97 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('197-673-3949', 'Reggie', 'Snoddin', 'reqgJXywWd', 'rsnoddin2f@businessweek.com', 'rsnoddin2f'); 98 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('218-430-4326', 'Gare', 'Isoldi', 'fdlS6b', 'gisoldi2g@google.ca', 'gisoldi2g'); 99 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('373-533-5862', 'Cheri', 'Hazlehurst', 'AJp1z02R', 'chazlehurst2h@sciencedirect.com', 'chazlehurst2h'); 100 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('933-715-7267', 'Juline', 'Bubear', 'Gj1FfeP', 'jbubear2i@dot.gov', 'jbubear2i'); 101 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('196-127-4793', 'Payton', 'Choulerton', 'GC92TTZG1p', 'pchoulerton2j@squarespace.com', 'pchoulerton2j'); 102 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('425-273-3807', 'Evangelina', 'Newnham', 'hg0bep50jj', 'enewnham2k@sakura.ne.jp', 'enewnham2k'); 103 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('991-526-5296', 'Virgie', 'Eburne', 'VB3ymnYHJl', 'veburne2l@howstuffworks.com', 'veburne2l'); 104 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('223-273-1150', 'Chancey', 'Hannent', 'OoQQaK', 'channent2m@liveinternet.ru', 'channent2m'); 105 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('540-885-6224', 'Frederigo', 'Galpen', '4OcR5C', 'fgalpen2n@hatena.ne.jp', 'fgalpen2n'); 106 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('933-494-3607', 'Hammad', 'Tiner', 'U6ZGtxkduy', 'htiner2o@nydailynews.com', 'htiner2o'); 107 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('311-453-2190', 'Marion', 'Shawell', 'eFBacdmjw', 'mshawell2p@wordpress.org', 'mshawell2p'); 108 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('711-997-9780', 'Brigida', 'Massie', 'tdkqBWLopu', 'bmassie2q@skype.com', 'bmassie2q'); 109 | insert into users (email, first_name, last_name, password, phone_number, user_name) values ('350-165-2793', 'Theo', 'Duly', 'JJwFif', 'tduly2r@economist.com', 'tduly2r'); 110 | -------------------------------------------------------------------------------- /user-service/target/final-project.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/user-service/target/final-project.jar -------------------------------------------------------------------------------- /user-service/target/maven-archiver/pom.properties: -------------------------------------------------------------------------------- 1 | #Generated by Maven 2 | #Mon Jul 18 06:37:57 MSK 2022 3 | groupId=com.pelinhangisi 4 | artifactId=user-service 5 | version=1.0-SNAPSHOT 6 | -------------------------------------------------------------------------------- /user-service/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | com\pelinhangisi\userservice\controller\UserController.class 2 | com\pelinhangisi\userservice\UserServiceApplication.class 3 | com\pelinhangisi\userservice\entity\User.class 4 | com\pelinhangisi\userservice\config\ModelMapperConfig.class 5 | com\pelinhangisi\userservice\service\UserService.class 6 | com\pelinhangisi\userservice\dto\UserRequest.class 7 | com\pelinhangisi\userservice\entity\User$UserBuilder.class 8 | com\pelinhangisi\userservice\repository\UserRepository.class 9 | com\pelinhangisi\userservice\dto\UserRequest$UserRequestBuilder.class 10 | com\pelinhangisi\userservice\config\SpringFoxConfig.class 11 | -------------------------------------------------------------------------------- /user-service/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\user-service\src\main\java\com\pelinhangisi\userservice\UserServiceApplication.java 2 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\user-service\src\main\java\com\pelinhangisi\userservice\config\SpringFoxConfig.java 3 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\user-service\src\main\java\com\pelinhangisi\userservice\entity\User.java 4 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\user-service\src\main\java\com\pelinhangisi\userservice\repository\UserRepository.java 5 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\user-service\src\main\java\com\pelinhangisi\userservice\controller\UserController.java 6 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\user-service\src\main\java\com\pelinhangisi\userservice\config\ModelMapperConfig.java 7 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\user-service\src\main\java\com\pelinhangisi\userservice\dto\UserRequest.java 8 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\user-service\src\main\java\com\pelinhangisi\userservice\service\UserService.java 9 | -------------------------------------------------------------------------------- /user-service/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | com\pelinhangisi\userservice\UserServiceApplicationTests.class 2 | -------------------------------------------------------------------------------- /user-service/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | C:\Users\pelin\Desktop\Emlakjet-Final-Project\user-service\src\test\java\com\pelinhangisi\userservice\UserServiceApplicationTests.java 2 | -------------------------------------------------------------------------------- /user-service/target/test-classes/com/pelinhangisi/userservice/UserServiceApplicationTests.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/user-service/target/test-classes/com/pelinhangisi/userservice/UserServiceApplicationTests.class -------------------------------------------------------------------------------- /user-service/target/user-service-1.0-SNAPSHOT.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pelinhangisi/java-spring-bootcamp-final-project-add-system/d2547c3bda94332cf14a682a274dac509e2b4ca8/user-service/target/user-service-1.0-SNAPSHOT.jar --------------------------------------------------------------------------------