├── external-files
├── define-data.png
└── HighLevelDesign.png
├── api-gateway
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
├── src
│ ├── test
│ │ └── java
│ │ │ └── lk
│ │ │ └── ilabs
│ │ │ └── assignment
│ │ │ └── apigateway
│ │ │ └── ApiGatewayApplicationTests.java
│ └── main
│ │ ├── java
│ │ └── lk
│ │ │ └── ilabs
│ │ │ └── assignment
│ │ │ └── apigateway
│ │ │ ├── dto
│ │ │ └── UserDTO.java
│ │ │ ├── service
│ │ │ └── AuthService.java
│ │ │ └── ApiGatewayApplication.java
│ │ └── resources
│ │ └── application.properties
├── .gitignore
└── pom.xml
├── cart-service
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
├── src
│ ├── main
│ │ ├── java
│ │ │ └── lk
│ │ │ │ └── ilabs
│ │ │ │ └── assignment
│ │ │ │ ├── service
│ │ │ │ ├── CartService.java
│ │ │ │ └── impl
│ │ │ │ │ └── CartServiceImpl.java
│ │ │ │ ├── dto
│ │ │ │ ├── ItemDTO.java
│ │ │ │ └── CartItemDTO.java
│ │ │ │ ├── repository
│ │ │ │ └── CartItemRepository.java
│ │ │ │ ├── CartServiceApplication.java
│ │ │ │ ├── advice
│ │ │ │ └── GlobalExceptionHandler.java
│ │ │ │ ├── entity
│ │ │ │ └── CartItem.java
│ │ │ │ └── api
│ │ │ │ └── CartController.java
│ │ └── resources
│ │ │ └── application.properties
│ └── test
│ │ └── java
│ │ └── lk
│ │ └── ilabs
│ │ └── assignment
│ │ └── CartServiceApplicationTests.java
├── .gitignore
└── pom.xml
├── user-service
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
├── src
│ ├── main
│ │ ├── java
│ │ │ └── lk
│ │ │ │ └── ilabs
│ │ │ │ └── user
│ │ │ │ ├── service
│ │ │ │ ├── UserService.java
│ │ │ │ └── impl
│ │ │ │ │ └── UserServiceImpl.java
│ │ │ │ ├── repository
│ │ │ │ └── UserRepository.java
│ │ │ │ ├── UserServiceApplication.java
│ │ │ │ ├── dto
│ │ │ │ └── UserDTO.java
│ │ │ │ ├── entity
│ │ │ │ └── User.java
│ │ │ │ └── api
│ │ │ │ └── UserController.java
│ │ └── resources
│ │ │ └── application.properties
│ └── test
│ │ └── java
│ │ └── lk
│ │ └── ilabs
│ │ └── user
│ │ └── UserServiceApplicationTests.java
├── .gitignore
└── pom.xml
├── discovery-service
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
├── src
│ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── lk
│ │ │ └── ilabs
│ │ │ └── assignment
│ │ │ └── discoveryservice
│ │ │ └── DiscoveryServiceApplication.java
│ └── test
│ │ └── java
│ │ └── lk
│ │ └── ilabs
│ │ └── assignment
│ │ └── discoveryservice
│ │ └── DiscoveryServiceApplicationTests.java
├── .gitignore
└── pom.xml
├── inventory-service
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
├── src
│ ├── main
│ │ ├── java
│ │ │ └── lk
│ │ │ │ └── ilabs
│ │ │ │ └── inventory
│ │ │ │ ├── service
│ │ │ │ ├── ItemService.java
│ │ │ │ └── impl
│ │ │ │ │ └── ItemServiceImpl.java
│ │ │ │ ├── repository
│ │ │ │ └── ItemRepository.java
│ │ │ │ ├── dto
│ │ │ │ └── ItemDTO.java
│ │ │ │ ├── InventoryServiceApplication.java
│ │ │ │ ├── entity
│ │ │ │ └── Item.java
│ │ │ │ └── api
│ │ │ │ └── ItemController.java
│ │ └── resources
│ │ │ └── application.properties
│ └── test
│ │ └── java
│ │ └── lk
│ │ └── ilabs
│ │ └── inventory
│ │ └── InventoryServiceApplicationTests.java
├── .gitignore
└── pom.xml
├── .idea
├── vcs.xml
├── .gitignore
├── jpa-buddy.xml
├── ilabs-assignment.iml
├── libraries
│ ├── Maven__org_ow2_asm_asm_9_1.xml
│ ├── Maven__antlr_antlr_2_7_7.xml
│ ├── Maven__joda_time_joda_time_2_3.xml
│ ├── Maven__org_hamcrest_hamcrest_2_2.xml
│ ├── Maven__org_yaml_snakeyaml_1_33.xml
│ ├── Maven__xmlpull_xmlpull_1_1_3_1.xml
│ ├── Maven__com_google_guava_guava_19_0.xml
│ ├── Maven__com_stoyanr_evictor_1_0_0.xml
│ ├── Maven__com_zaxxer_HikariCP_5_0_1.xml
│ ├── Maven__org_slf4j_slf4j_api_2_0_6.xml
│ ├── Maven__org_glassfish_jaxb_txw2_4_0_1.xml
│ ├── Maven__org_objenesis_objenesis_3_2.xml
│ ├── Maven__com_google_code_gson_gson_2_9_1.xml
│ ├── Maven__org_antlr_antlr_runtime_3_4.xml
│ ├── Maven__com_fasterxml_classmate_1_5_1.xml
│ ├── Maven__net_minidev_json_smart_2_4_8.xml
│ ├── Maven__commons_lang_commons_lang_2_6.xml
│ ├── Maven__org_glassfish_hk2_hk2_api_3_0_3.xml
│ ├── Maven__org_jboss_jandex_2_4_2_Final.xml
│ ├── Maven__org_slf4j_jul_to_slf4j_2_0_6.xml
│ ├── Maven__org_mockito_mockito_core_4_8_1.xml
│ ├── Maven__org_opentest4j_opentest4j_1_2_0.xml
│ ├── Maven__org_projectlombok_lombok_1_18_24.xml
│ ├── Maven__org_xmlunit_xmlunit_core_2_9_0.xml
│ ├── Maven__io_github_x_stream_mxparser_1_2_2.xml
│ ├── Maven__org_antlr_stringtemplate_3_2_1.xml
│ ├── Maven__org_freemarker_freemarker_2_3_31.xml
│ ├── Maven__org_glassfish_hk2_hk2_utils_3_0_3.xml
│ ├── Maven__org_skyscreamer_jsonassert_1_5_1.xml
│ ├── Maven__commons_codec_commons_codec_1_15.xml
│ ├── Maven__net_bytebuddy_byte_buddy_1_12_20.xml
│ ├── Maven__org_assertj_assertj_core_3_23_1.xml
│ ├── Maven__org_glassfish_jaxb_jaxb_core_4_0_1.xml
│ ├── Maven__ch_qos_logback_logback_core_1_4_5.xml
│ ├── Maven__com_jayway_jsonpath_json_path_2_7_0.xml
│ ├── Maven__commons_jxpath_commons_jxpath_1_3.xml
│ ├── Maven__org_antlr_antlr4_runtime_4_10_1.xml
│ ├── Maven__org_aspectj_aspectjweaver_1_9_19.xml
│ ├── Maven__org_springframework_spring_tx_6_0_3.xml
│ ├── Maven__org_apache_commons_commons_math_2_2.xml
│ ├── Maven__org_codehaus_jettison_jettison_1_4_0.xml
│ ├── Maven__org_glassfish_hk2_hk2_locator_3_0_3.xml
│ ├── Maven__org_javassist_javassist_3_28_0_GA.xml
│ ├── Maven__com_netflix_eureka_eureka_core_2_0_0.xml
│ ├── Maven__net_minidev_accessors_smart_2_4_8.xml
│ ├── Maven__org_codehaus_woodstox_stax2_api_4_2_1.xml
│ ├── Maven__org_latencyutils_LatencyUtils_2_0_3.xml
│ ├── Maven__org_springframework_spring_aop_6_0_3.xml
│ ├── Maven__org_springframework_spring_jcl_6_0_3.xml
│ ├── Maven__org_springframework_spring_orm_6_0_3.xml
│ ├── Maven__org_springframework_spring_web_6_0_3.xml
│ ├── Maven__com_netflix_servo_servo_core_0_12_21.xml
│ ├── Maven__io_projectreactor_reactor_core_3_5_1.xml
│ ├── Maven__org_springframework_spring_core_6_0_3.xml
│ ├── Maven__org_springframework_spring_jdbc_6_0_3.xml
│ ├── Maven__org_springframework_spring_test_6_0_3.xml
│ ├── Maven__com_thoughtworks_xstream_xstream_1_4_19.xml
│ ├── Maven__io_netty_netty_codec_4_1_86_Final.xml
│ ├── Maven__org_bouncycastle_bcpkix_jdk15on_1_69.xml
│ ├── Maven__org_bouncycastle_bcprov_jdk15on_1_69.xml
│ ├── Maven__org_bouncycastle_bcutil_jdk15on_1_69.xml
│ ├── Maven__org_glassfish_jaxb_jaxb_runtime_4_0_1.xml
│ ├── Maven__org_hdrhistogram_HdrHistogram_2_1_12.xml
│ ├── Maven__ch_qos_logback_logback_classic_1_4_5.xml
│ ├── Maven__com_mysql_mysql_connector_j_8_0_31.xml
│ ├── Maven__io_micrometer_micrometer_core_1_10_2.xml
│ ├── Maven__io_netty_netty_buffer_4_1_86_Final.xml
│ ├── Maven__io_netty_netty_common_4_1_86_Final.xml
│ ├── Maven__org_glassfish_hk2_spring_bridge_3_0_3.xml
│ ├── Maven__org_junit_jupiter_junit_jupiter_5_9_1.xml
│ ├── Maven__org_springframework_spring_beans_6_0_3.xml
│ ├── Maven__com_netflix_eureka_eureka_client_2_0_0.xml
│ ├── Maven__org_apache_httpcomponents_httpcore_4_4_16.xml
│ ├── Maven__org_apiguardian_apiguardian_api_1_1_2.xml
│ ├── Maven__io_netty_netty_handler_4_1_86_Final.xml
│ ├── Maven__jakarta_ws_rs_jakarta_ws_rs_api_3_1_0.xml
│ ├── Maven__org_apache_logging_log4j_log4j_api_2_19_0.xml
│ ├── Maven__org_springframework_spring_webmvc_6_0_3.xml
│ ├── Maven__io_netty_netty_resolver_4_1_86_Final.xml
│ ├── Maven__org_springframework_boot_spring_boot_3_0_1.xml
│ ├── Maven__org_springframework_spring_aspects_6_0_3.xml
│ ├── Maven__org_springframework_spring_context_6_0_3.xml
│ ├── Maven__org_springframework_spring_webflux_6_0_3.xml
│ ├── Maven__net_bytebuddy_byte_buddy_agent_1_12_20.xml
│ ├── Maven__org_apache_httpcomponents_httpclient_4_5_14.xml
│ ├── Maven__org_eclipse_angus_angus_activation_1_0_0.xml
│ ├── Maven__com_fasterxml_woodstox_woodstox_core_6_2_1.xml
│ ├── Maven__com_fasterxml_woodstox_woodstox_core_6_4_0.xml
│ ├── Maven__io_micrometer_micrometer_commons_1_10_2.xml
│ ├── Maven__io_netty_netty_codec_dns_4_1_86_Final.xml
│ ├── Maven__io_netty_netty_transport_4_1_86_Final.xml
│ ├── Maven__jakarta_inject_jakarta_inject_api_2_0_1.xml
│ ├── Maven__org_glassfish_jersey_inject_jersey_hk2_3_1_0.xml
│ ├── Maven__org_junit_jupiter_junit_jupiter_api_5_9_1.xml
│ ├── Maven__org_mockito_mockito_junit_jupiter_4_8_1.xml
│ ├── Maven__org_reactivestreams_reactive_streams_1_0_4.xml
│ ├── Maven__io_netty_netty_codec_http_4_1_86_Final.xml
│ ├── Maven__io_projectreactor_addons_reactor_extra_3_5_0.xml
│ ├── Maven__jakarta_servlet_jakarta_servlet_api_6_0_0.xml
│ ├── Maven__org_apache_httpcomponents_core5_httpcore5_5_1_5.xml
│ ├── Maven__io_netty_netty_codec_http2_4_1_86_Final.xml
│ ├── Maven__io_netty_netty_codec_socks_4_1_86_Final.xml
│ ├── Maven__org_glassfish_jersey_core_jersey_client_3_1_0.xml
│ ├── Maven__org_glassfish_jersey_core_jersey_common_3_1_0.xml
│ ├── Maven__org_glassfish_jersey_core_jersey_server_3_1_0.xml
│ ├── Maven__org_springframework_spring_expression_6_0_3.xml
│ ├── Maven__com_fasterxml_jackson_core_jackson_core_2_14_1.xml
│ ├── Maven__org_jboss_logging_jboss_logging_3_5_0_Final.xml
│ ├── Maven__com_netflix_eureka_eureka_core_jersey3_2_0_0.xml
│ ├── Maven__com_netflix_netflix_commons_netflix_infix_0_3_0.xml
│ ├── Maven__io_netty_netty_resolver_dns_4_1_86_Final.xml
│ ├── Maven__jakarta_xml_bind_jakarta_xml_bind_api_4_0_0.xml
│ ├── Maven__org_apache_logging_log4j_log4j_to_slf4j_2_19_0.xml
│ ├── Maven__org_apache_tomcat_embed_tomcat_embed_el_10_1_4.xml
│ ├── Maven__org_springframework_data_spring_data_jpa_3_0_0.xml
│ ├── Maven__com_sun_istack_istack_commons_runtime_4_1_1.xml
│ ├── Maven__io_netty_netty_handler_proxy_4_1_86_Final.xml
│ ├── Maven__org_hibernate_orm_hibernate_core_6_1_6_Final.xml
│ ├── Maven__org_junit_jupiter_junit_jupiter_engine_5_9_1.xml
│ ├── Maven__org_junit_jupiter_junit_jupiter_params_5_9_1.xml
│ ├── Maven__org_springframework_boot_spring_boot_test_3_0_1.xml
│ ├── Maven__io_micrometer_micrometer_observation_1_10_2.xml
│ ├── Maven__org_apache_httpcomponents_client5_httpclient5_5_1_4.xml
│ ├── Maven__org_apache_httpcomponents_core5_httpcore5_h2_5_1_5.xml
│ ├── Maven__org_glassfish_hk2_osgi_resource_locator_1_0_3.xml
│ ├── Maven__com_netflix_eureka_eureka_client_jersey3_2_0_0.xml
│ ├── Maven__org_junit_platform_junit_platform_engine_1_9_1.xml
│ ├── Maven__com_netflix_netflix_commons_netflix_eventbus_0_3_0.xml
│ ├── Maven__io_projectreactor_netty_reactor_netty_core_1_1_1.xml
│ ├── Maven__io_projectreactor_netty_reactor_netty_http_1_1_1.xml
│ ├── Maven__org_apache_tomcat_embed_tomcat_embed_core_10_1_4.xml
│ ├── Maven__com_fasterxml_jackson_core_jackson_databind_2_14_1.xml
│ ├── Maven__commons_configuration_commons_configuration_1_10.xml
│ ├── Maven__jakarta_activation_jakarta_activation_api_2_1_0.xml
│ ├── Maven__jakarta_annotation_jakarta_annotation_api_2_1_1.xml
│ ├── Maven__jakarta_validation_jakarta_validation_api_3_0_2.xml
│ ├── Maven__org_junit_platform_junit_platform_commons_1_9_1.xml
│ ├── Maven__org_springframework_boot_spring_boot_starter_3_0_1.xml
│ ├── Maven__org_springframework_data_spring_data_commons_3_0_0.xml
│ ├── Maven__org_springframework_spring_context_support_6_0_3.xml
│ ├── Maven__jakarta_persistence_jakarta_persistence_api_3_1_0.xml
│ ├── Maven__jakarta_transaction_jakarta_transaction_api_2_0_1.xml
│ ├── Maven__org_springframework_boot_spring_boot_actuator_3_0_1.xml
│ ├── Maven__org_springframework_boot_spring_boot_devtools_3_0_1.xml
│ ├── Maven__org_springframework_cloud_spring_cloud_commons_4_0_0.xml
│ ├── Maven__org_springframework_cloud_spring_cloud_context_4_0_0.xml
│ ├── Maven__org_springframework_cloud_spring_cloud_starter_4_0_0.xml
│ ├── Maven__com_fasterxml_jackson_core_jackson_annotations_2_14_1.xml
│ ├── Maven__org_springframework_security_spring_security_web_6_0_1.xml
│ ├── Maven__org_apache_tomcat_embed_tomcat_embed_websocket_10_1_4.xml
│ ├── Maven__org_springframework_security_spring_security_core_6_0_1.xml
│ ├── Maven__org_glassfish_hk2_external_aopalliance_repackaged_3_0_3.xml
│ ├── Maven__org_springframework_boot_spring_boot_starter_aop_3_0_1.xml
│ ├── Maven__org_springframework_boot_spring_boot_starter_web_3_0_1.xml
│ ├── Maven__org_springframework_boot_spring_boot_starter_jdbc_3_0_1.xml
│ ├── Maven__org_springframework_boot_spring_boot_starter_json_3_0_1.xml
│ ├── Maven__org_springframework_boot_spring_boot_starter_test_3_0_1.xml
│ ├── Maven__org_hibernate_validator_hibernate_validator_8_0_0_Final.xml
│ ├── Maven__org_springframework_security_spring_security_config_6_0_1.xml
│ ├── Maven__org_springframework_security_spring_security_crypto_6_0_1.xml
│ ├── Maven__org_springframework_boot_spring_boot_autoconfigure_3_0_1.xml
│ ├── Maven__org_springframework_boot_spring_boot_starter_cache_3_0_1.xml
│ ├── Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_14_1.xml
│ ├── Maven__io_netty_netty_transport_classes_epoll_4_1_86_Final.xml
│ ├── Maven__org_springframework_boot_spring_boot_starter_tomcat_3_0_1.xml
│ ├── Maven__org_springframework_cloud_spring_cloud_loadbalancer_4_0_0.xml
│ ├── Maven__org_springframework_boot_spring_boot_starter_logging_3_0_1.xml
│ ├── Maven__org_springframework_boot_spring_boot_starter_webflux_3_0_1.xml
│ ├── Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_14_1.xml
│ ├── Maven__org_glassfish_jersey_connectors_jersey_apache_connector_3_1_0.xml
│ ├── Maven__org_springframework_cloud_spring_cloud_gateway_server_4_0_0.xml
│ ├── Maven__com_fasterxml_jackson_dataformat_jackson_dataformat_xml_2_14_1.xml
│ ├── Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml
│ ├── Maven__org_glassfish_jersey_containers_jersey_container_servlet_3_1_0.xml
│ ├── Maven__org_springframework_boot_spring_boot_starter_actuator_3_0_1.xml
│ ├── Maven__org_springframework_boot_spring_boot_starter_data_jpa_3_0_1.xml
│ ├── Maven__org_springframework_boot_spring_boot_starter_security_3_0_1.xml
│ ├── Maven__io_netty_netty_resolver_dns_classes_macos_4_1_86_Final.xml
│ ├── Maven__org_springframework_cloud_spring_cloud_starter_gateway_4_0_0.xml
│ ├── Maven__io_netty_netty_transport_native_epoll_linux_x86_64_4_1_86_Final.xml
│ ├── Maven__org_springframework_boot_spring_boot_starter_freemarker_3_0_1.xml
│ ├── Maven__org_springframework_boot_spring_boot_starter_validation_3_0_1.xml
│ ├── Maven__org_springframework_boot_spring_boot_test_autoconfigure_3_0_1.xml
│ ├── Maven__io_netty_netty_transport_native_unix_common_4_1_86_Final.xml
│ ├── Maven__org_springframework_security_spring_security_rsa_1_0_11_RELEASE.xml
│ ├── Maven__io_netty_netty_resolver_dns_native_macos_osx_x86_64_4_1_86_Final.xml
│ ├── Maven__org_hibernate_common_hibernate_commons_annotations_6_0_2_Final.xml
│ ├── Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_14_1.xml
│ ├── Maven__org_glassfish_jersey_containers_jersey_container_servlet_core_3_1_0.xml
│ ├── Maven__org_springframework_boot_spring_boot_starter_reactor_netty_3_0_1.xml
│ ├── Maven__org_springframework_boot_spring_boot_actuator_autoconfigure_3_0_1.xml
│ ├── Maven__org_springframework_cloud_spring_cloud_starter_loadbalancer_4_0_0.xml
│ ├── Maven__org_springframework_cloud_spring_cloud_netflix_eureka_client_4_0_0.xml
│ ├── Maven__org_springframework_cloud_spring_cloud_netflix_eureka_server_4_0_0.xml
│ ├── Maven__org_springframework_cloud_spring_cloud_starter_netflix_eureka_client_4_0_0.xml
│ └── Maven__org_springframework_cloud_spring_cloud_starter_netflix_eureka_server_4_0_0.xml
├── misc.xml
├── modules.xml
├── encodings.xml
├── jarRepositories.xml
├── dataSources.xml
└── compiler.xml
└── LICENSE.txt
/external-files/define-data.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/visalsrimanga/Shopping-Cart-Web-App/HEAD/external-files/define-data.png
--------------------------------------------------------------------------------
/external-files/HighLevelDesign.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/visalsrimanga/Shopping-Cart-Web-App/HEAD/external-files/HighLevelDesign.png
--------------------------------------------------------------------------------
/api-gateway/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/visalsrimanga/Shopping-Cart-Web-App/HEAD/api-gateway/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/cart-service/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/visalsrimanga/Shopping-Cart-Web-App/HEAD/cart-service/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/user-service/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/visalsrimanga/Shopping-Cart-Web-App/HEAD/user-service/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/discovery-service/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/visalsrimanga/Shopping-Cart-Web-App/HEAD/discovery-service/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/inventory-service/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/visalsrimanga/Shopping-Cart-Web-App/HEAD/inventory-service/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/discovery-service/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=8084
2 | spring.application.name=discovery-service
3 | eureka.client.register-with-eureka=false
4 | eureka.client.fetch-registry=false
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.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/jpa-buddy.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/api-gateway/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip
2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar
3 |
--------------------------------------------------------------------------------
/cart-service/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip
2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar
3 |
--------------------------------------------------------------------------------
/user-service/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip
2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar
3 |
--------------------------------------------------------------------------------
/user-service/src/main/java/lk/ilabs/user/service/UserService.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.user.service;
2 |
3 | import lk.ilabs.user.dto.UserDTO;
4 |
5 | public interface UserService {
6 | public void saveUser(UserDTO user);
7 |
8 | UserDTO findUser(String username);
9 | }
10 |
--------------------------------------------------------------------------------
/discovery-service/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip
2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar
3 |
--------------------------------------------------------------------------------
/inventory-service/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip
2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar
3 |
--------------------------------------------------------------------------------
/user-service/src/main/java/lk/ilabs/user/repository/UserRepository.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.user.repository;
2 |
3 | import lk.ilabs.user.entity.User;
4 | import org.springframework.data.repository.CrudRepository;
5 |
6 | public interface UserRepository extends CrudRepository {
7 | }
8 |
--------------------------------------------------------------------------------
/inventory-service/src/main/java/lk/ilabs/inventory/service/ItemService.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.inventory.service;
2 |
3 | import lk.ilabs.inventory.dto.ItemDTO;
4 |
5 | public interface ItemService {
6 | public ItemDTO addNewItem(ItemDTO item);
7 |
8 | ItemDTO getItem(Integer code);
9 | }
10 |
--------------------------------------------------------------------------------
/inventory-service/src/main/java/lk/ilabs/inventory/repository/ItemRepository.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.inventory.repository;
2 |
3 | import lk.ilabs.inventory.entity.Item;
4 | import org.springframework.data.repository.CrudRepository;
5 |
6 | public interface ItemRepository extends CrudRepository- {
7 | }
8 |
--------------------------------------------------------------------------------
/cart-service/src/main/java/lk/ilabs/assignment/service/CartService.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.assignment.service;
2 |
3 | import lk.ilabs.assignment.dto.CartItemDTO;
4 |
5 | public interface CartService {
6 | public void addItemToCard(CartItemDTO cartItem);
7 | public void removeItemFromCard(Integer itemCode, String username);
8 | }
9 |
--------------------------------------------------------------------------------
/user-service/src/test/java/lk/ilabs/user/UserServiceApplicationTests.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.user;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class UserServiceApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/cart-service/src/test/java/lk/ilabs/assignment/CartServiceApplicationTests.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.assignment;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class CartServiceApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/inventory-service/src/test/java/lk/ilabs/inventory/InventoryServiceApplicationTests.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.inventory;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class InventoryServiceApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/api-gateway/src/test/java/lk/ilabs/assignment/apigateway/ApiGatewayApplicationTests.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.assignment.apigateway;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class ApiGatewayApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/.idea/ilabs-assignment.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/discovery-service/src/test/java/lk/ilabs/assignment/discoveryservice/DiscoveryServiceApplicationTests.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.assignment.discoveryservice;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class DiscoveryServiceApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/user-service/src/main/java/lk/ilabs/user/UserServiceApplication.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.user;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class UserServiceApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(UserServiceApplication.class, args);
11 | }
12 |
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/user-service/src/main/java/lk/ilabs/user/dto/UserDTO.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.user.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Data;
5 | import lombok.NoArgsConstructor;
6 |
7 | import java.io.Serializable;
8 |
9 | @Data
10 | @NoArgsConstructor
11 | @AllArgsConstructor
12 | public class UserDTO implements Serializable {
13 | private String username;
14 | private String password;
15 | private String role;
16 | }
17 |
--------------------------------------------------------------------------------
/cart-service/src/main/java/lk/ilabs/assignment/dto/ItemDTO.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.assignment.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Data;
5 | import lombok.NoArgsConstructor;
6 |
7 | import java.io.Serializable;
8 |
9 | @NoArgsConstructor
10 | @AllArgsConstructor
11 | @Data
12 | public class ItemDTO implements Serializable {
13 | private Integer code;
14 | private String description;
15 | private int qty;
16 | }
17 |
--------------------------------------------------------------------------------
/inventory-service/src/main/java/lk/ilabs/inventory/dto/ItemDTO.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.inventory.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Data;
5 | import lombok.NoArgsConstructor;
6 |
7 | import java.io.Serializable;
8 |
9 | @NoArgsConstructor
10 | @AllArgsConstructor
11 | @Data
12 | public class ItemDTO implements Serializable {
13 | private Integer code;
14 | private String description;
15 | private int qty;
16 | }
17 |
--------------------------------------------------------------------------------
/cart-service/src/main/java/lk/ilabs/assignment/dto/CartItemDTO.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.assignment.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Data;
5 | import lombok.NoArgsConstructor;
6 |
7 | import java.io.Serializable;
8 |
9 | @Data
10 | @NoArgsConstructor
11 | @AllArgsConstructor
12 | public class CartItemDTO implements Serializable {
13 | private String username;
14 | private Integer itemCode;
15 | private int qty;
16 | }
17 |
--------------------------------------------------------------------------------
/cart-service/src/main/java/lk/ilabs/assignment/repository/CartItemRepository.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.assignment.repository;
2 |
3 | import lk.ilabs.assignment.entity.CartItem;
4 | import org.springframework.data.repository.CrudRepository;
5 |
6 | import java.util.Optional;
7 |
8 | public interface CartItemRepository extends CrudRepository {
9 | Optional findCartItemByItemCodeAndUsername(Integer code, String username);
10 | }
11 |
--------------------------------------------------------------------------------
/inventory-service/src/main/java/lk/ilabs/inventory/InventoryServiceApplication.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.inventory;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class InventoryServiceApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(InventoryServiceApplication.class, args);
11 | }
12 |
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/user-service/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=8082
2 |
3 | spring.datasource.username=root
4 | spring.datasource.password=Dvs&12345
5 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
6 | spring.datasource.url=jdbc:mysql://localhost:3306/ilabs_users?createDatabaseIfNotExist=true
7 |
8 | spring.jpa.hibernate.ddl-auto=update
9 |
10 | spring.application.name=user-service
11 | eureka.client.service-url.defaultZone=http://localhost:8084/eureka
--------------------------------------------------------------------------------
/cart-service/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=8083
2 |
3 | spring.datasource.username=root
4 | spring.datasource.password=Dvs&12345
5 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
6 | spring.datasource.url=jdbc:mysql://localhost:3306/ilabs_cart?createDatabaseIfNotExist=true
7 |
8 | spring.jpa.hibernate.ddl-auto=update
9 |
10 | spring.application.name=cart-service
11 | eureka.client.service-url.defaultZone=http://localhost:8084/eureka
12 |
--------------------------------------------------------------------------------
/api-gateway/src/main/java/lk/ilabs/assignment/apigateway/dto/UserDTO.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.assignment.apigateway.dto;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Data;
5 | import lombok.NoArgsConstructor;
6 |
7 | import java.io.Serializable;
8 |
9 | @Data
10 | @NoArgsConstructor
11 | @AllArgsConstructor
12 | public class UserDTO implements Serializable {
13 | private String username;
14 | private String password;
15 | private String role;
16 | }
17 |
--------------------------------------------------------------------------------
/inventory-service/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=8081
2 |
3 | spring.datasource.username=root
4 | spring.datasource.password=Dvs&12345
5 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
6 | spring.datasource.url=jdbc:mysql://localhost:3306/ilabs_inventory?createDatabaseIfNotExist=true
7 |
8 | spring.jpa.hibernate.ddl-auto=update
9 |
10 | spring.application.name=inventory-service
11 | eureka.client.service-url.defaultZone=http://localhost:8084/eureka
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_ow2_asm_asm_9_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__antlr_antlr_2_7_7.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/user-service/src/main/java/lk/ilabs/user/entity/User.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.user.entity;
2 |
3 | import jakarta.persistence.Entity;
4 | import jakarta.persistence.Id;
5 | import lombok.AllArgsConstructor;
6 | import lombok.Data;
7 | import lombok.NoArgsConstructor;
8 |
9 | import java.io.Serializable;
10 |
11 | @Data
12 | @NoArgsConstructor
13 | @AllArgsConstructor
14 | @Entity
15 | public class User implements Serializable {
16 | @Id
17 | private String username;
18 | private String password;
19 | private String role;
20 | }
21 |
--------------------------------------------------------------------------------
/api-gateway/.gitignore:
--------------------------------------------------------------------------------
1 | HELP.md
2 | target/
3 | !.mvn/wrapper/maven-wrapper.jar
4 | !**/src/main/**/target/
5 | !**/src/test/**/target/
6 |
7 | ### STS ###
8 | .apt_generated
9 | .classpath
10 | .factorypath
11 | .project
12 | .settings
13 | .springBeans
14 | .sts4-cache
15 |
16 | ### IntelliJ IDEA ###
17 | .idea
18 | *.iws
19 | *.iml
20 | *.ipr
21 |
22 | ### NetBeans ###
23 | /nbproject/private/
24 | /nbbuild/
25 | /dist/
26 | /nbdist/
27 | /.nb-gradle/
28 | build/
29 | !**/src/main/**/build/
30 | !**/src/test/**/build/
31 |
32 | ### VS Code ###
33 | .vscode/
34 |
--------------------------------------------------------------------------------
/cart-service/.gitignore:
--------------------------------------------------------------------------------
1 | HELP.md
2 | target/
3 | !.mvn/wrapper/maven-wrapper.jar
4 | !**/src/main/**/target/
5 | !**/src/test/**/target/
6 |
7 | ### STS ###
8 | .apt_generated
9 | .classpath
10 | .factorypath
11 | .project
12 | .settings
13 | .springBeans
14 | .sts4-cache
15 |
16 | ### IntelliJ IDEA ###
17 | .idea
18 | *.iws
19 | *.iml
20 | *.ipr
21 |
22 | ### NetBeans ###
23 | /nbproject/private/
24 | /nbbuild/
25 | /dist/
26 | /nbdist/
27 | /.nb-gradle/
28 | build/
29 | !**/src/main/**/build/
30 | !**/src/test/**/build/
31 |
32 | ### VS Code ###
33 | .vscode/
34 |
--------------------------------------------------------------------------------
/user-service/.gitignore:
--------------------------------------------------------------------------------
1 | HELP.md
2 | target/
3 | !.mvn/wrapper/maven-wrapper.jar
4 | !**/src/main/**/target/
5 | !**/src/test/**/target/
6 |
7 | ### STS ###
8 | .apt_generated
9 | .classpath
10 | .factorypath
11 | .project
12 | .settings
13 | .springBeans
14 | .sts4-cache
15 |
16 | ### IntelliJ IDEA ###
17 | .idea
18 | *.iws
19 | *.iml
20 | *.ipr
21 |
22 | ### NetBeans ###
23 | /nbproject/private/
24 | /nbbuild/
25 | /dist/
26 | /nbdist/
27 | /.nb-gradle/
28 | build/
29 | !**/src/main/**/build/
30 | !**/src/test/**/build/
31 |
32 | ### VS Code ###
33 | .vscode/
34 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__joda_time_joda_time_2_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/discovery-service/.gitignore:
--------------------------------------------------------------------------------
1 | HELP.md
2 | target/
3 | !.mvn/wrapper/maven-wrapper.jar
4 | !**/src/main/**/target/
5 | !**/src/test/**/target/
6 |
7 | ### STS ###
8 | .apt_generated
9 | .classpath
10 | .factorypath
11 | .project
12 | .settings
13 | .springBeans
14 | .sts4-cache
15 |
16 | ### IntelliJ IDEA ###
17 | .idea
18 | *.iws
19 | *.iml
20 | *.ipr
21 |
22 | ### NetBeans ###
23 | /nbproject/private/
24 | /nbbuild/
25 | /dist/
26 | /nbdist/
27 | /.nb-gradle/
28 | build/
29 | !**/src/main/**/build/
30 | !**/src/test/**/build/
31 |
32 | ### VS Code ###
33 | .vscode/
34 |
--------------------------------------------------------------------------------
/inventory-service/.gitignore:
--------------------------------------------------------------------------------
1 | HELP.md
2 | target/
3 | !.mvn/wrapper/maven-wrapper.jar
4 | !**/src/main/**/target/
5 | !**/src/test/**/target/
6 |
7 | ### STS ###
8 | .apt_generated
9 | .classpath
10 | .factorypath
11 | .project
12 | .settings
13 | .springBeans
14 | .sts4-cache
15 |
16 | ### IntelliJ IDEA ###
17 | .idea
18 | *.iws
19 | *.iml
20 | *.ipr
21 |
22 | ### NetBeans ###
23 | /nbproject/private/
24 | /nbbuild/
25 | /dist/
26 | /nbdist/
27 | /.nb-gradle/
28 | build/
29 | !**/src/main/**/build/
30 | !**/src/test/**/build/
31 |
32 | ### VS Code ###
33 | .vscode/
34 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_hamcrest_hamcrest_2_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_yaml_snakeyaml_1_33.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__xmlpull_xmlpull_1_1_3_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_google_guava_guava_19_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_stoyanr_evictor_1_0_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_zaxxer_HikariCP_5_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_slf4j_slf4j_api_2_0_6.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_glassfish_jaxb_txw2_4_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_objenesis_objenesis_3_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_google_code_gson_gson_2_9_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_antlr_antlr_runtime_3_4.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_fasterxml_classmate_1_5_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__net_minidev_json_smart_2_4_8.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/discovery-service/src/main/java/lk/ilabs/assignment/discoveryservice/DiscoveryServiceApplication.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.assignment.discoveryservice;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
6 |
7 | @EnableEurekaServer
8 | @SpringBootApplication
9 | public class DiscoveryServiceApplication {
10 |
11 | public static void main(String[] args) {
12 | SpringApplication.run(DiscoveryServiceApplication.class, args);
13 | }
14 |
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__commons_lang_commons_lang_2_6.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_glassfish_hk2_hk2_api_3_0_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_jboss_jandex_2_4_2_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_2_0_6.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_mockito_mockito_core_4_8_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_opentest4j_opentest4j_1_2_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_projectlombok_lombok_1_18_24.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_xmlunit_xmlunit_core_2_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_github_x_stream_mxparser_1_2_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_antlr_stringtemplate_3_2_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_freemarker_freemarker_2_3_31.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_glassfish_hk2_hk2_utils_3_0_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__commons_codec_commons_codec_1_15.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_12_20.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_assertj_assertj_core_3_23_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_glassfish_jaxb_jaxb_core_4_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__ch_qos_logback_logback_core_1_4_5.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_7_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__commons_jxpath_commons_jxpath_1_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_antlr_antlr4_runtime_4_10_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_9_19.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_tx_6_0_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_commons_commons_math_2_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_codehaus_jettison_jettison_1_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_glassfish_hk2_hk2_locator_3_0_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_javassist_javassist_3_28_0_GA.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_netflix_eureka_eureka_core_2_0_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__net_minidev_accessors_smart_2_4_8.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_codehaus_woodstox_stax2_api_4_2_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_latencyutils_LatencyUtils_2_0_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_aop_6_0_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_jcl_6_0_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_orm_6_0_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_web_6_0_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_netflix_servo_servo_core_0_12_21.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_projectreactor_reactor_core_3_5_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_core_6_0_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_jdbc_6_0_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_test_6_0_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_thoughtworks_xstream_xstream_1_4_19.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_codec_4_1_86_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_bouncycastle_bcpkix_jdk15on_1_69.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_69.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_bouncycastle_bcutil_jdk15on_1_69.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_glassfish_jaxb_jaxb_runtime_4_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_hdrhistogram_HdrHistogram_2_1_12.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_4_5.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_mysql_mysql_connector_j_8_0_31.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_micrometer_micrometer_core_1_10_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_buffer_4_1_86_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_common_4_1_86_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_glassfish_hk2_spring_bridge_3_0_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_5_9_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_beans_6_0_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_netflix_eureka_eureka_client_2_0_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_4_16.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apiguardian_apiguardian_api_1_1_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_handler_4_1_86_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__jakarta_ws_rs_jakarta_ws_rs_api_3_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_19_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_webmvc_6_0_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_resolver_4_1_86_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_3_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_aspects_6_0_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_context_6_0_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_webflux_6_0_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_12_20.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_5_14.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_eclipse_angus_angus_activation_1_0_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_fasterxml_woodstox_woodstox_core_6_2_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_fasterxml_woodstox_woodstox_core_6_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_micrometer_micrometer_commons_1_10_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_codec_dns_4_1_86_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_transport_4_1_86_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__jakarta_inject_jakarta_inject_api_2_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_glassfish_jersey_inject_jersey_hk2_3_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_api_5_9_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_mockito_mockito_junit_jupiter_4_8_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_reactivestreams_reactive_streams_1_0_4.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_codec_http_4_1_86_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_projectreactor_addons_reactor_extra_3_5_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__jakarta_servlet_jakarta_servlet_api_6_0_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_httpcomponents_core5_httpcore5_5_1_5.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_codec_http2_4_1_86_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_codec_socks_4_1_86_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_glassfish_jersey_core_jersey_client_3_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_glassfish_jersey_core_jersey_common_3_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_glassfish_jersey_core_jersey_server_3_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_expression_6_0_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_14_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_5_0_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_netflix_eureka_eureka_core_jersey3_2_0_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_infix_0_3_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_resolver_dns_4_1_86_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__jakarta_xml_bind_jakarta_xml_bind_api_4_0_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_logging_log4j_log4j_to_slf4j_2_19_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_10_1_4.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_data_spring_data_jpa_3_0_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_sun_istack_istack_commons_runtime_4_1_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_handler_proxy_4_1_86_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_hibernate_orm_hibernate_core_6_1_6_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_engine_5_9_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_params_5_9_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_3_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_micrometer_micrometer_observation_1_10_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_httpcomponents_client5_httpclient5_5_1_4.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_httpcomponents_core5_httpcore5_h2_5_1_5.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_glassfish_hk2_osgi_resource_locator_1_0_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_netflix_eureka_eureka_client_jersey3_2_0_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_junit_platform_junit_platform_engine_1_9_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_eventbus_0_3_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_projectreactor_netty_reactor_netty_core_1_1_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_projectreactor_netty_reactor_netty_http_1_1_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_10_1_4.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_14_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__commons_configuration_commons_configuration_1_10.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__jakarta_activation_jakarta_activation_api_2_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__jakarta_annotation_jakarta_annotation_api_2_1_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__jakarta_validation_jakarta_validation_api_3_0_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_junit_platform_junit_platform_commons_1_9_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_3_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_data_spring_data_commons_3_0_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_context_support_6_0_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__jakarta_persistence_jakarta_persistence_api_3_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__jakarta_transaction_jakarta_transaction_api_2_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_actuator_3_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_devtools_3_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_commons_4_0_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_context_4_0_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_4_0_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/cart-service/src/main/java/lk/ilabs/assignment/CartServiceApplication.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.assignment;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import org.springframework.cloud.client.loadbalancer.LoadBalanced;
6 | import org.springframework.context.annotation.Bean;
7 | import org.springframework.web.client.RestTemplate;
8 |
9 | @SpringBootApplication
10 | public class CartServiceApplication {
11 |
12 | public static void main(String[] args) {
13 | SpringApplication.run(CartServiceApplication.class, args);
14 | }
15 |
16 | @LoadBalanced
17 | @Bean
18 | public RestTemplate restTemplate(){
19 | return new RestTemplate();
20 | }
21 |
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_14_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_security_spring_security_web_6_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_10_1_4.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_security_spring_security_core_6_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_glassfish_hk2_external_aopalliance_repackaged_3_0_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_aop_3_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_3_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_jdbc_3_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_json_3_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_3_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_hibernate_validator_hibernate_validator_8_0_0_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_security_spring_security_config_6_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_security_spring_security_crypto_6_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/cart-service/src/main/java/lk/ilabs/assignment/advice/GlobalExceptionHandler.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.assignment.advice;
2 |
3 | import org.springframework.http.HttpStatus;
4 | import org.springframework.web.bind.annotation.ExceptionHandler;
5 | import org.springframework.web.bind.annotation.RestControllerAdvice;
6 | import org.springframework.web.client.HttpClientErrorException;
7 | import org.springframework.web.server.ResponseStatusException;
8 |
9 | @RestControllerAdvice
10 | public class GlobalExceptionHandler {
11 |
12 | @ExceptionHandler(HttpClientErrorException.class)
13 | public void handleHttpClientNotFoundException(HttpClientErrorException exp){
14 | exp.initCause(new ResponseStatusException(HttpStatus.NOT_FOUND));
15 | throw exp;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_3_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_cache_3_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_14_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_transport_classes_epoll_4_1_86_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_3_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_loadbalancer_4_0_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_3_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_webflux_3_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_14_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_glassfish_jersey_connectors_jersey_apache_connector_3_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_gateway_server_4_0_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_fasterxml_jackson_dataformat_jackson_dataformat_xml_2_14_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_glassfish_jersey_containers_jersey_container_servlet_3_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_actuator_3_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_data_jpa_3_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_security_3_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_resolver_dns_classes_macos_4_1_86_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_gateway_4_0_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/cart-service/src/main/java/lk/ilabs/assignment/entity/CartItem.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.assignment.entity;
2 |
3 | import jakarta.persistence.*;
4 | import lombok.AllArgsConstructor;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | import java.io.Serializable;
9 | import java.util.UUID;
10 |
11 | @Entity
12 | @Data
13 | @NoArgsConstructor
14 | @AllArgsConstructor
15 | public class CartItem implements Serializable {
16 | @Id
17 | @GeneratedValue(strategy = GenerationType.UUID)
18 | private UUID id;
19 | private String username;
20 | private Integer itemCode;
21 | private int qty;
22 |
23 | public CartItem(String username, Integer itemCode, int qty) {
24 | this.username = username;
25 | this.itemCode = itemCode;
26 | this.qty = qty;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_transport_native_epoll_linux_x86_64_4_1_86_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_freemarker_3_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_validation_3_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_3_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_transport_native_unix_common_4_1_86_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_security_spring_security_rsa_1_0_11_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_resolver_dns_native_macos_osx_x86_64_4_1_86_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_hibernate_common_hibernate_commons_annotations_6_0_2_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_14_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_glassfish_jersey_containers_jersey_container_servlet_core_3_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_reactor_netty_3_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/inventory-service/src/main/java/lk/ilabs/inventory/entity/Item.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.inventory.entity;
2 |
3 | import jakarta.persistence.Entity;
4 | import jakarta.persistence.GeneratedValue;
5 | import jakarta.persistence.GenerationType;
6 | import jakarta.persistence.Id;
7 | import lombok.AllArgsConstructor;
8 | import lombok.Data;
9 | import lombok.NoArgsConstructor;
10 |
11 | import java.io.Serializable;
12 |
13 | @Data
14 | @NoArgsConstructor
15 | @AllArgsConstructor
16 | @Entity
17 | public class Item implements Serializable {
18 | @Id
19 | @GeneratedValue(strategy = GenerationType.IDENTITY)
20 | private Integer code;
21 | private String description;
22 | private int qty;
23 |
24 | public Item(String description, int qty) {
25 | this.description = description;
26 | this.qty = qty;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_actuator_autoconfigure_3_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_loadbalancer_4_0_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_eureka_client_4_0_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_eureka_server_4_0_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_eureka_client_4_0_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_eureka_server_4_0_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/inventory-service/src/main/java/lk/ilabs/inventory/api/ItemController.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.inventory.api;
2 |
3 | import lk.ilabs.inventory.dto.ItemDTO;
4 | import lk.ilabs.inventory.service.ItemService;
5 | import org.springframework.http.HttpStatus;
6 | import org.springframework.web.bind.annotation.*;
7 |
8 | @CrossOrigin
9 | @RestController
10 | @RequestMapping("/api/v1/items")
11 | public class ItemController {
12 |
13 | private ItemService itemService;
14 |
15 | public ItemController(ItemService itemService) {
16 | this.itemService = itemService;
17 | }
18 |
19 | @ResponseStatus(HttpStatus.CREATED)
20 | @PostMapping(consumes = "application/json")
21 | public ItemDTO saveItem(@RequestBody ItemDTO item){
22 | return this.itemService.addNewItem(item);
23 | }
24 |
25 | @GetMapping("/{code:\\d+}")
26 | public ItemDTO getItem(@PathVariable Integer code){
27 | return this.itemService.getItem(code);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/user-service/src/main/java/lk/ilabs/user/api/UserController.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.user.api;
2 |
3 | import lk.ilabs.user.dto.UserDTO;
4 | import lk.ilabs.user.service.UserService;
5 | import org.springframework.http.HttpStatus;
6 | import org.springframework.web.bind.annotation.*;
7 |
8 | @RequestMapping("/api/v1/users")
9 | @RestController
10 | @CrossOrigin
11 | public class UserController {
12 |
13 | private final UserService userService;
14 |
15 | public UserController(UserService userService) {
16 | this.userService = userService;
17 | }
18 |
19 | @ResponseStatus(HttpStatus.CREATED)
20 | @PostMapping(consumes = "application/json")
21 | public void saveUser(@RequestBody UserDTO user) {
22 | this.userService.saveUser(user);
23 | }
24 |
25 | @GetMapping(produces = "application/json", value = "/{username}")
26 | public UserDTO getUser(@PathVariable String username){
27 | return userService.findUser(username);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2022 visalsrimanga. All Right Reserved.
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | SOFTWARE.
--------------------------------------------------------------------------------
/.idea/jarRepositories.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 |
--------------------------------------------------------------------------------
/api-gateway/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.application.name=api-gateway
2 | eureka.client.service-url.defaultZone=http://localhost:8084/eureka
3 |
4 | #spring.cloud.gateway.discovery.locator.enabled=true
5 | #spring.cloud.gateway.discovery.locator.lower-case-service-id=true
6 |
7 | spring.cloud.gateway.routes[0].id=path_route1
8 | spring.cloud.gateway.routes[0].uri=http://localhost:8084
9 | spring.cloud.gateway.routes[0].predicates[0]=Path=/eureka/web
10 | spring.cloud.gateway.routes[0].filters[0]=SetPath=/
11 |
12 | spring.cloud.gateway.routes[1].id=path_route2
13 | spring.cloud.gateway.routes[1].uri=lb://INVENTORY-SERVICE
14 | spring.cloud.gateway.routes[1].predicates[0]=Path=/api/v1/items/**
15 |
16 | spring.cloud.gateway.routes[2].id=path_route3
17 | spring.cloud.gateway.routes[2].uri=lb://CART-SERVICE
18 | spring.cloud.gateway.routes[2].predicates[0]=Path=/api/v1/cart-items/**
19 |
20 | spring.cloud.gateway.routes[3].id=path_route4
21 | spring.cloud.gateway.routes[3].uri=lb://USER-SERVICE
22 | spring.cloud.gateway.routes[3].predicates[0]=Path=/api/v1/users/**
23 |
24 | spring.cloud.gateway.routes[4].id=discovery-server-static
25 | spring.cloud.gateway.routes[4].uri=http://localhost:8084
26 | spring.cloud.gateway.routes[4].predicates[0]=Path=/eureka/**
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/user-service/src/main/java/lk/ilabs/user/service/impl/UserServiceImpl.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.user.service.impl;
2 |
3 | import lk.ilabs.user.dto.UserDTO;
4 | import lk.ilabs.user.entity.User;
5 | import lk.ilabs.user.repository.UserRepository;
6 | import lk.ilabs.user.service.UserService;
7 | import org.apache.commons.codec.digest.DigestUtils;
8 | import org.springframework.http.HttpStatus;
9 | import org.springframework.stereotype.Service;
10 | import org.springframework.web.server.ResponseStatusException;
11 |
12 | @Service
13 | public class UserServiceImpl implements UserService {
14 |
15 | private final UserRepository userRepository;
16 |
17 | public UserServiceImpl(UserRepository userRepository) {
18 | this.userRepository = userRepository;
19 | }
20 |
21 | @Override
22 | public void saveUser(UserDTO user) {
23 | this.userRepository.save(new User(user.getUsername(), DigestUtils.sha256Hex(user.getPassword()), user.getRole()));
24 | }
25 |
26 | @Override
27 | public UserDTO findUser(String username) {
28 | return this.userRepository.findById(username)
29 | .map(u -> new UserDTO(u.getUsername(), u.getPassword(), u.getRole()))
30 | .orElseThrow(()-> new ResponseStatusException(HttpStatus.NOT_FOUND, "Invalid Username!"));
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/inventory-service/src/main/java/lk/ilabs/inventory/service/impl/ItemServiceImpl.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.inventory.service.impl;
2 |
3 | import lk.ilabs.inventory.dto.ItemDTO;
4 | import lk.ilabs.inventory.entity.Item;
5 | import lk.ilabs.inventory.repository.ItemRepository;
6 | import lk.ilabs.inventory.service.ItemService;
7 | import org.springframework.http.HttpStatus;
8 | import org.springframework.stereotype.Service;
9 | import org.springframework.web.server.ResponseStatusException;
10 |
11 | @Service
12 | public class ItemServiceImpl implements ItemService {
13 |
14 | private ItemRepository itemRepository;
15 |
16 | public ItemServiceImpl(ItemRepository itemRepository) {
17 | this.itemRepository = itemRepository;
18 | }
19 |
20 | @Override
21 | public ItemDTO addNewItem(ItemDTO item) {
22 | Item entity = this.itemRepository.save(new Item( item.getDescription(), item.getQty()));
23 | return new ItemDTO(entity.getCode(), entity.getDescription(), entity.getQty());
24 | }
25 |
26 | @Override
27 | public ItemDTO getItem(Integer code) {
28 | return this.itemRepository.findById(code).map(entity -> new ItemDTO(entity.getCode(), entity.getDescription(), entity.getQty()))
29 | .orElseThrow(() -> new ResponseStatusException(HttpStatus.NOT_FOUND));
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/.idea/dataSources.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | mysql.8
6 | true
7 | com.mysql.cj.jdbc.Driver
8 | jdbc:mysql://localhost:3306/ilabs_users
9 | $ProjectFileDir$
10 |
11 |
12 | mysql.8
13 | true
14 | com.mysql.cj.jdbc.Driver
15 | jdbc:mysql://localhost:3306/ilabs_inventory
16 | $ProjectFileDir$
17 |
18 |
19 | mysql.8
20 | true
21 | com.mysql.cj.jdbc.Driver
22 | jdbc:mysql://localhost:3306/ilabs_cart
23 | $ProjectFileDir$
24 |
25 |
26 |
--------------------------------------------------------------------------------
/cart-service/src/main/java/lk/ilabs/assignment/api/CartController.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.assignment.api;
2 |
3 | import lk.ilabs.assignment.dto.CartItemDTO;
4 | import lk.ilabs.assignment.service.CartService;
5 | import org.springframework.http.HttpStatus;
6 | import org.springframework.web.bind.annotation.*;
7 |
8 | import java.nio.charset.StandardCharsets;
9 | import java.util.Base64;
10 |
11 | @RestController
12 | @CrossOrigin
13 | @RequestMapping("/api/v1/cart-items")
14 | public class CartController {
15 |
16 | private CartService cartService;
17 |
18 | public CartController(CartService cartService) {
19 | this.cartService = cartService;
20 | }
21 |
22 | private String getPrincipal(String authorizationToken){
23 | String token = authorizationToken.replaceAll("Basic ", "");
24 | String loginCredentials = new String(Base64.getDecoder().decode(token), StandardCharsets.UTF_8);
25 | return loginCredentials.split(":")[0];
26 | }
27 |
28 | @ResponseStatus(HttpStatus.CREATED)
29 | @PostMapping(consumes = "application/json")
30 | public void addNewItemToCard(@RequestBody CartItemDTO cartItem, @RequestHeader String authorization){
31 | cartItem.setUsername(getPrincipal(authorization));
32 | this.cartService.addItemToCard(cartItem);
33 | }
34 |
35 | @ResponseStatus(HttpStatus.NO_CONTENT)
36 | @DeleteMapping("/{code:\\d+}")
37 | public void removeItemFromCard(@PathVariable Integer code, @RequestHeader String authorization){
38 | this.cartService.removeItemFromCard(code, getPrincipal(authorization));
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/api-gateway/src/main/java/lk/ilabs/assignment/apigateway/service/AuthService.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.assignment.apigateway.service;
2 |
3 | import lk.ilabs.assignment.apigateway.dto.UserDTO;
4 | import org.springframework.http.HttpStatusCode;
5 | import org.springframework.security.core.authority.SimpleGrantedAuthority;
6 | import org.springframework.security.core.userdetails.ReactiveUserDetailsService;
7 | import org.springframework.security.core.userdetails.User;
8 | import org.springframework.security.core.userdetails.UserDetails;
9 | import org.springframework.stereotype.Service;
10 | import org.springframework.web.reactive.function.client.WebClient;
11 | import reactor.core.publisher.Mono;
12 |
13 | import java.util.List;
14 |
15 | @Service
16 | public class AuthService implements ReactiveUserDetailsService {
17 |
18 | private final WebClient.Builder webClientBuilder;
19 |
20 | public AuthService(WebClient.Builder webClientBuilder) {
21 | this.webClientBuilder = webClientBuilder;
22 | }
23 |
24 | @Override
25 | public Mono findByUsername(String username) {
26 | return Mono.create(userDetailsMonoSink -> {
27 | Mono dtoMono = webClientBuilder.build().get().uri("http://USER-SERVICE/api/v1/users/{username}", username).retrieve().onStatus(HttpStatusCode::isError, clientResponse -> Mono.empty()).bodyToMono(UserDTO.class);
28 | dtoMono.subscribe(userDTO -> {
29 | userDetailsMonoSink.success(userDTO.getUsername() == null ? null : new User(userDTO.getUsername(), userDTO.getPassword(), List.of(new SimpleGrantedAuthority("ROLE_" + userDTO.getRole()))));
30 | });
31 |
32 | });
33 |
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/.idea/compiler.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 |
--------------------------------------------------------------------------------
/api-gateway/src/main/java/lk/ilabs/assignment/apigateway/ApiGatewayApplication.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.assignment.apigateway;
2 |
3 | import org.apache.commons.codec.digest.DigestUtils;
4 | import org.springframework.boot.SpringApplication;
5 | import org.springframework.boot.autoconfigure.SpringBootApplication;
6 | import org.springframework.cloud.client.loadbalancer.LoadBalanced;
7 | import org.springframework.context.annotation.Bean;
8 | import org.springframework.http.HttpMethod;
9 | import org.springframework.security.config.web.server.ServerHttpSecurity;
10 | import org.springframework.security.crypto.password.PasswordEncoder;
11 | import org.springframework.security.web.server.SecurityWebFilterChain;
12 | import org.springframework.web.reactive.function.client.WebClient;
13 |
14 | @SpringBootApplication
15 | public class ApiGatewayApplication {
16 |
17 | public static void main(String[] args) {
18 | SpringApplication.run(ApiGatewayApplication.class, args);
19 | }
20 |
21 | @Bean
22 | public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http) {
23 | http.csrf().disable();
24 | http.authorizeExchange().pathMatchers("/eureka/**").permitAll()
25 | .pathMatchers(HttpMethod.POST, "/api/v1/users").hasAnyRole("SYSTEM")
26 | .pathMatchers(HttpMethod.POST, "/api/v1/items").hasAnyRole("ADMIN")
27 | .anyExchange().authenticated().and().httpBasic();
28 | return http.build();
29 | }
30 |
31 | @Bean
32 | @LoadBalanced
33 | public WebClient.Builder webClientBuilder() {
34 | return WebClient.builder();
35 | }
36 |
37 | @Bean
38 | public PasswordEncoder passwordEncoder(){
39 | return new PasswordEncoder() {
40 | @Override
41 | public String encode(CharSequence rawPassword) {
42 | return DigestUtils.sha256Hex(rawPassword.toString());
43 | }
44 |
45 | @Override
46 | public boolean matches(CharSequence rawPassword, String encodedPassword) {
47 | return encode(rawPassword).equals(encodedPassword);
48 | }
49 |
50 | };
51 | }
52 |
53 | }
--------------------------------------------------------------------------------
/discovery-service/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 |
6 | org.springframework.boot
7 | spring-boot-starter-parent
8 | 3.0.1
9 |
10 |
11 | lk.ilabs.assignment
12 | discovery-service
13 | 1.0.0
14 | discovery-service
15 | Demo project for Spring Boot
16 |
17 | 17
18 | 2022.0.0
19 |
20 |
21 |
22 | org.springframework.cloud
23 | spring-cloud-starter-netflix-eureka-server
24 |
25 |
26 |
27 | org.springframework.boot
28 | spring-boot-devtools
29 | runtime
30 | true
31 |
32 |
33 | org.springframework.boot
34 | spring-boot-starter-test
35 | test
36 |
37 |
38 |
39 |
40 |
41 | org.springframework.cloud
42 | spring-cloud-dependencies
43 | ${spring-cloud.version}
44 | pom
45 | import
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | org.springframework.boot
54 | spring-boot-maven-plugin
55 |
56 |
57 |
58 |
59 |
60 | netflix-candidates
61 | Netflix Candidates
62 | https://artifactory-oss.prod.netflix.net/artifactory/maven-oss-candidates
63 |
64 | false
65 |
66 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/cart-service/src/main/java/lk/ilabs/assignment/service/impl/CartServiceImpl.java:
--------------------------------------------------------------------------------
1 | package lk.ilabs.assignment.service.impl;
2 |
3 | import lk.ilabs.assignment.dto.CartItemDTO;
4 | import lk.ilabs.assignment.dto.ItemDTO;
5 | import lk.ilabs.assignment.entity.CartItem;
6 | import lk.ilabs.assignment.repository.CartItemRepository;
7 | import lk.ilabs.assignment.service.CartService;
8 | import org.springframework.http.HttpStatus;
9 | import org.springframework.stereotype.Service;
10 | import org.springframework.web.client.RestTemplate;
11 | import org.springframework.web.server.ResponseStatusException;
12 |
13 | import java.util.Optional;
14 |
15 | @Service
16 | public class CartServiceImpl implements CartService {
17 |
18 | private CartItemRepository cartItemRepository;
19 | private RestTemplate restTemplate;
20 |
21 | public CartServiceImpl(CartItemRepository cartItemRepository, RestTemplate restTemplate) {
22 | this.cartItemRepository = cartItemRepository;
23 | this.restTemplate = restTemplate;
24 | }
25 |
26 | @Override
27 | public void addItemToCard(CartItemDTO cartItem) {
28 | ItemDTO itemInStock = restTemplate.getForObject("http://INVENTORY-SERVICE/api/v1/items/{code}", ItemDTO.class, cartItem.getItemCode());
29 | Optional optCartItem = cartItemRepository.findCartItemByItemCodeAndUsername(cartItem.getItemCode(), cartItem.getUsername());
30 |
31 | if (optCartItem.isEmpty()){
32 | if (itemInStock.getQty() < cartItem.getQty()) throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Insufficient stock!");
33 | cartItemRepository.save(new CartItem(cartItem.getUsername(), cartItem.getItemCode(), cartItem.getQty()));
34 | }else{
35 | CartItem cartItemEntity = optCartItem.get();
36 | if (itemInStock.getQty() < (cartItem.getQty() + cartItemEntity.getQty()))throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Insufficient stock!");
37 | cartItemEntity.setQty(cartItemEntity.getQty() + cartItem.getQty());
38 | cartItemRepository.save(cartItemEntity);
39 | }
40 |
41 | }
42 |
43 | @Override
44 | public void removeItemFromCard(Integer itemCode, String username) {
45 | CartItem cartItem = cartItemRepository.findCartItemByItemCodeAndUsername(itemCode, username).orElseThrow(() -> new ResponseStatusException(HttpStatus.NOT_FOUND, "Cart item doesn't exist"));
46 | cartItemRepository.delete(cartItem);
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/cart-service/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 |
6 | org.springframework.boot
7 | spring-boot-starter-parent
8 | 3.0.1
9 |
10 |
11 | lk.ilabs.assignment
12 | cart-service
13 | 1.0.0
14 | cart-service
15 |
16 | 17
17 | 2022.0.0
18 |
19 |
20 |
21 | org.springframework.cloud
22 | spring-cloud-starter-netflix-eureka-client
23 |
24 |
25 | org.springframework.boot
26 | spring-boot-starter-data-jpa
27 |
28 |
29 | org.springframework.boot
30 | spring-boot-starter-web
31 |
32 |
33 |
34 | org.springframework.boot
35 | spring-boot-devtools
36 | runtime
37 | true
38 |
39 |
40 | com.mysql
41 | mysql-connector-j
42 | runtime
43 |
44 |
45 | org.springframework.boot
46 | spring-boot-starter-test
47 | test
48 |
49 |
50 | org.projectlombok
51 | lombok
52 |
53 |
54 |
55 |
56 |
57 |
58 | org.springframework.cloud
59 | spring-cloud-dependencies
60 | ${spring-cloud.version}
61 | pom
62 | import
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 | org.springframework.boot
72 | spring-boot-maven-plugin
73 |
74 |
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/inventory-service/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 |
6 | org.springframework.boot
7 | spring-boot-starter-parent
8 | 3.0.1
9 |
10 |
11 | lk.ilabs.assignment
12 | inventory-service
13 | 1.0.0
14 | inventory-service
15 |
16 | 17
17 | 2022.0.0
18 |
19 |
20 |
21 | org.springframework.cloud
22 | spring-cloud-starter-netflix-eureka-client
23 |
24 |
25 | org.springframework.boot
26 | spring-boot-starter-data-jpa
27 |
28 |
29 | org.springframework.boot
30 | spring-boot-starter-web
31 |
32 |
33 |
34 | org.springframework.boot
35 | spring-boot-devtools
36 | runtime
37 | true
38 |
39 |
40 | com.mysql
41 | mysql-connector-j
42 | runtime
43 |
44 |
45 | org.springframework.boot
46 | spring-boot-starter-test
47 | test
48 |
49 |
50 | org.projectlombok
51 | lombok
52 |
53 |
54 |
55 |
56 |
57 |
58 | org.springframework.cloud
59 | spring-cloud-dependencies
60 | ${spring-cloud.version}
61 | pom
62 | import
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 | org.springframework.boot
72 | spring-boot-maven-plugin
73 |
74 |
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/api-gateway/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 |
6 | org.springframework.boot
7 | spring-boot-starter-parent
8 | 3.0.1
9 |
10 |
11 | lk.ilabs.assignment
12 | api-gateway
13 | 1.0.0
14 | api-gateway
15 |
16 | 17
17 | 2022.0.0
18 |
19 |
20 |
21 | org.springframework.cloud
22 | spring-cloud-starter-gateway
23 |
24 |
25 | org.springframework.cloud
26 | spring-cloud-starter-netflix-eureka-client
27 |
28 |
29 |
30 | org.springframework.boot
31 | spring-boot-starter-security
32 |
33 |
34 |
35 | org.springframework.boot
36 | spring-boot-starter-test
37 | test
38 |
39 |
40 | org.projectlombok
41 | lombok
42 |
43 |
44 |
45 |
46 | commons-codec
47 | commons-codec
48 | 1.15
49 |
50 |
51 |
52 |
53 |
54 | org.springframework.cloud
55 | spring-cloud-dependencies
56 | ${spring-cloud.version}
57 | pom
58 | import
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 | org.springframework.boot
67 | spring-boot-maven-plugin
68 |
69 |
70 |
71 |
72 |
73 | netflix-candidates
74 | Netflix Candidates
75 | https://artifactory-oss.prod.netflix.net/artifactory/maven-oss-candidates
76 |
77 | false
78 |
79 |
80 |
81 |
82 |
83 |
--------------------------------------------------------------------------------
/user-service/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 |
6 | org.springframework.boot
7 | spring-boot-starter-parent
8 | 3.0.1
9 |
10 |
11 | lk.ilabs.assignment
12 | user-service
13 | 1.0.0
14 | user-service
15 |
16 | 17
17 | 2022.0.0
18 |
19 |
20 |
21 | org.springframework.cloud
22 | spring-cloud-starter-netflix-eureka-client
23 |
24 |
25 | org.springframework.boot
26 | spring-boot-starter-data-jpa
27 |
28 |
29 | org.springframework.boot
30 | spring-boot-starter-web
31 |
32 |
33 |
34 | org.springframework.boot
35 | spring-boot-devtools
36 | runtime
37 | true
38 |
39 |
40 | com.mysql
41 | mysql-connector-j
42 | runtime
43 |
44 |
45 | org.springframework.boot
46 | spring-boot-starter-test
47 | test
48 |
49 |
50 | org.projectlombok
51 | lombok
52 |
53 |
54 |
55 |
56 | commons-codec
57 | commons-codec
58 | 1.15
59 |
60 |
61 |
62 |
63 |
64 |
65 | org.springframework.cloud
66 | spring-cloud-dependencies
67 | ${spring-cloud.version}
68 | pom
69 | import
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 | org.springframework.boot
79 | spring-boot-maven-plugin
80 |
81 |
82 |
83 |
84 |
85 |
--------------------------------------------------------------------------------