Java rest api github

Содержание
  1. Saved searches
  2. Use saved searches to filter your results more quickly
  3. aykononov/java-rest-api
  4. Name already in use
  5. Sign In Required
  6. Launching GitHub Desktop
  7. Launching GitHub Desktop
  8. Launching Xcode
  9. Launching Visual Studio Code
  10. Latest commit
  11. Git stats
  12. Files
  13. README.md
  14. Saved searches
  15. Use saved searches to filter your results more quickly
  16. java-rest-api
  17. Here are 17 public repositories matching this topic.
  18. mariazevedo88 / travels-java-api
  19. sammwyy / httplib
  20. VigneshDhakshnamoorthy / KMDV-Java-Framework
  21. UltiRequiem / java-se-simple-std-http-rest-api
  22. seij-net / seij-jakarta-ws-rs-hateoas
  23. yusufsefasezer / jax-rs-example
  24. dynamicjuhani / JestFramework
  25. ahacalabria / leitor-biometria-catraca-java
  26. spinsage / javalin-java-starter-restapi
  27. NihatQuliyev / upload-multipart-files
  28. giosil / wcron
  29. rafaalvesf / buscaCep-JAVA-SPRING
  30. LEMUBIT / Simple-Java-Spark-Voting-API
  31. raheemadamboev / demo-people-rest-api
  32. giosil / multi-rpc
  33. seycileli / spring-angular-rest-api-h2db-expensetracker
  34. GabrielFDuarte / Desafio-Bank-Api-MAIDA
  35. Improve this page
  36. Add this topic to your repo
  37. Saved searches
  38. Use saved searches to filter your results more quickly
  39. REST API
  40. Here are 6,692 public repositories matching this topic.
  41. OpenAPITools / openapi-generator
  42. swagger-api / swagger-core
  43. rest-assured / rest-assured
  44. discord-jda / JDA
  45. stylefeng / Guns
  46. apache / linkis
  47. exadel-inc / CompreFace
  48. springdoc / springdoc-openapi
  49. apilayer / restcountries
  50. confluentinc / kafka-rest
  51. confluentinc / schema-registry
  52. jonashackt / spring-boot-vuejs
  53. strapdata / elassandra
  54. Discord4J / Discord4J
  55. noear / solon
  56. awslabs / aws-serverless-java-container
  57. MyCollab / mycollab
  58. Endava / cats
  59. SoftInstigate / restheart
  60. DSpace / DSpace
  61. Related Topics
  62. Footer

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Spring Boot REST API на Java.

aykononov/java-rest-api

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Spring Boot REST API на Java.

Java SE + Spring Boot + Hibernate + Oracle Database

  • Java SE 11 — Платформа Java, стандартная версия 11 Java SE 11 Archive Downloads;
  • Spring Boot — инструмент фреймворка Spring для написания приложений с минимальной конфигурацией (имеет встроенный контейнер сервлетов Tomcat по умолчанию);
  • Spring Web — включает в себя все настройки Spring MVC и позволяет писать REST API без дополнительных настроек;
  • Spring Data JPA — позволяет работать с SQL с помощью Java Persistence API, используя Spring Data и Hibernate;
  • Lombok — библиотека для сокращения написания стандартного кода на java (геттеры, сеттеры и т.д.);
  • OpenCSV — парсер CSV-файлов;
  • Oracle Data Base — используемая БД Oracle Database Express Edition (XE) download;
  • Maven — фреймворк для автоматизации сборки проектов на основе описания их структуры в файлах на языке POM (англ. Project Object Model).

Оно умеет создавать (CREATE), читать (READ), изменять (UPDATE) и удалять (DELETE) информацию в БД.

Эндпоинты:

GET http://localhost:8081/listProducts получить все продукты GET http://localhost:8081/getProductById/id= найти продукт по идентификатору GET http://localhost:8081/getProductByName/name= найти продукт по имени POST http://localhost:8081/saveProducts добавляет несколько продуктов POST http://localhost:8081/addProduct добавляет один продукт DELETE http://localhost:8081/deleteProductById/id= удалить продукт по идентификатору DELETE http://localhost:8081/removeAll - удалить все продукты 

Формат данных ответа в json.

Путь директории с файлами настраивается в конфигурационном файле приложения:

Загрузка файла стартует при появлении нового файла в указанной директории:

 upload.file = LoadIntoDB.csv 
product_id, product_name, price_id, price, price_date 1,product1,1,100.11,2020-11-30 2,product2,2,22.02,2020-11-30 3,product3,3,3.03,2020-11-30 4,product4,4,100.01,2020-11-30 1,product1,5,111.01,2020-12-01 2,product2,6,22.22,2020-12-01 3,product3,7,3.33,2020-12-01 4,product4,8,100.10,2020-12-01 

В логфайле LoadIntoDB.log отмечается факт старта обработки файла и результат с количеством обработанных записей (товаров и цен).

1. Таблица товар. Хранит название товара. Колонки: id, name. 2. Таблица цена товара. Хранит цену на товар и дату с которой цена актуальная. По каждому товару может быть несколько цен с разными датами. Колонки: id, price, date, product_id. 

Таблицы в БД создаются автоматически при старте приложения.

Читайте также:  Javascript методы для массивов

Скрипт для создания структуры БД .

/* таблица Продукты */ DROP TABLE products PURGE; / CREATE TABLE products ( id NUMBER(10,0) NOT NULL, name VARCHAR2(255), PRIMARY KEY (id) ); / /* таблица Цены */ DROP TABLE prices PURGE; / CREATE TABLE prices ( id NUMBER(10,0) NOT NULL, price NUMBER, pdate DATE, product_id NUMBER(10,0), PRIMARY KEY (id), CONSTRAINT FK_PRODUCT_ID FOREIGN KEY (PRODUCT_ID) REFERENCES PRODUCTS (ID) ); / /* проверка */ SELECT * FROM products pd JOIN prices pr ON pd.id = pr.product_id ORDER BY pr.id; / 

Также прилагаю файл со скриптами для создания необходимых сущностей. ScriptDB.sql

Используйте shell, перейдите в корневой каталог проекта (где находится файл pom.xml) и введите команды:

mvn clean package cd target 

В командной строке выполните команду:

java -jar demo-0.0.1-SNAPSHOT.jar 
  • GET http://localhost:8081/listProducts — получить все продукты
  • GET http://localhost:8081/getProductById/id=4 — найти продукт по идентификатору
  • GET http://localhost:8081/getProductByName/name=product4 — найти продукт по имени
  • DELETE http://localhost:8081/deleteProductById/id=4 — удалить продукт по идентификатору
  • POST http://localhost:8081/addProduct — добавляет один продукт
< "id": 4, "name": "product4", "prices": [ < "id": 4, "price": 111.11, "pdate": "2020-12-17", "productId": 4 > ] >
  • DELETE http://localhost:8081/removeAll — удалить все продукты
  • POST http://localhost:8081/saveProducts — добавляет несколько продуктов
[ < "id": 1, "name": "product1", "prices": [ < "id": 1, "price": 100.11, "pdate": "2020-11-30", "productId": 1 > ] >, < "id": 2, "name": "product2", "prices": [ < "id": 2, "price": 22.02, "pdate": "2020-11-30", "productId": 2 > ] >, < "id": 3, "name": "product3", "prices": [ < "id": 3, "price": 3.03, "pdate": "2020-11-30", "productId": 3 > ] > ]

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Читайте также:  Html utf encoding header

java-rest-api

Here are 17 public repositories matching this topic.

mariazevedo88 / travels-java-api

An API for travel management. It is built with Java, Spring Boot, and Spring Framework. A toy-project to serve as a theoretical basis for the Medium series of articles I wrote about Java+Spring.

sammwyy / httplib

HTTP routing library for Java

VigneshDhakshnamoorthy / KMDV-Java-Framework

UltiRequiem / java-se-simple-std-http-rest-api

seij-net / seij-jakarta-ws-rs-hateoas

Jakarta RESTful Web Services (Jax-RS) utilities to manage HATEOAS

yusufsefasezer / jax-rs-example

A simple REST based application developed with JAVA, JAX-RS, Swagger and Angular.

dynamicjuhani / JestFramework

Framework simplifies the creation a Restful API.

ahacalabria / leitor-biometria-catraca-java

Exemplo básico em java (rest server on tomcat) para utilizar os dispositivos: leitor biometrico nitgen DX e catraca inner topdata

spinsage / javalin-java-starter-restapi

Boilerplate maven project for bootstrapping development of a Rest API application with Javalin using Java as the programming language

NihatQuliyev / upload-multipart-files

File upload, download, search and deletion.

giosil / wcron

A job scheduler configurable through RESTful web services.

rafaalvesf / buscaCep-JAVA-SPRING

o servico de busca de CEP, funciona realizando buscas relacionadas ao cep informado, retornando a informação de Logradouro, Bairro, cidade e estado, facilitando o preenchimento automático dessas informações em algum site, em que o endereço seja necessário informá-lo.

LEMUBIT / Simple-Java-Spark-Voting-API

Simple REST API created with Java Spark and Thymeleaf Template Engine

raheemadamboev / demo-people-rest-api

Java Spring Boot, REST API to list people details

giosil / multi-rpc

An easy to use library for xml-rpc, json-rpc and RESTful services implementation.

seycileli / spring-angular-rest-api-h2db-expensetracker

Simple Application with Spring backend and Angular frontend which is connected to an embedded H2 Database. Spring Data JPA to perform CRUD operations. This is OPEN SOURCE — Feel free to share or contribute as you wish.

GabrielFDuarte / Desafio-Bank-Api-MAIDA

API REST bancária para o desafio da Maida;health

Improve this page

Add a description, image, and links to the java-rest-api topic page so that developers can more easily learn about it.

Add this topic to your repo

To associate your repository with the java-rest-api topic, visit your repo’s landing page and select «manage topics.»

Читайте также:  Считаем количество символов java

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

REST API

A representational state transfer (REST) API is a way to provide compatibility between computer systems on the Internet. The concept was first outlined in a dissertation by Roy Fielding in 2000.

Here are 6,692 public repositories matching this topic.

OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)

swagger-api / swagger-core

Examples and server integrations for generating the Swagger API Specification, which enables easy access to your REST API

rest-assured / rest-assured

Java DSL for easy testing of REST services

discord-jda / JDA

Java wrapper for the popular chat & VOIP service: Discord https://discord.com

stylefeng / Guns

Guns基于SpringBoot 2,致力于做更简洁的后台管理系统,完美整合springmvc + shiro + mybatis-plus + beetl!Guns项目代码简洁,注释丰富,上手容易,同时Guns包含许多基础模块(用户管理,角色管理,部门管理,字典管理等10个模块),可以直接作为一个后台管理系统的脚手架!

apache / linkis

Apache Linkis builds a computation middleware layer to facilitate connection, governance and orchestration between the upper applications and the underlying data engines.

exadel-inc / CompreFace

Leading free and open-source face recognition system

springdoc / springdoc-openapi

Library for OpenAPI 3 with spring-boot

apilayer / restcountries

Get information about countries via a RESTful API

confluentinc / kafka-rest

Confluent REST Proxy for Kafka

confluentinc / schema-registry

Confluent Schema Registry for Kafka

jonashackt / spring-boot-vuejs

Example project showing how to build a Spring Boot App providing a GUI with Vue.js

strapdata / elassandra

Elassandra = Elasticsearch + Apache Cassandra

Discord4J / Discord4J

Discord4J is a fast, powerful, unopinionated, reactive library to enable quick and easy development of Discord bots for Java, Kotlin, and other JVM languages using the official Discord Bot API.

noear / solon

Java 新的生态:更快、更小、更简单!!!启动快 5 ~ 10 倍;qps 高 2~ 3 倍;运行时内存节省 1/3 ~ 1/2;打包可以缩到 1/2 ~ 1/10

awslabs / aws-serverless-java-container

A Java wrapper to run Spring, Jersey, Spark, and other apps inside AWS Lambda.

MyCollab / mycollab

An open source, free, high performance, stable and secure Java Application Business Platform of Project Management and Document

Endava / cats

CATS is a REST API Fuzzer and negative testing tool for OpenAPI endpoints. CATS automatically generates, runs and reports tests with minimum configuration and no coding effort. Tests are self-healing and do not require maintenance.

SoftInstigate / restheart

REST, GraphQL and WebSocket APIs for MongoDB.

DSpace / DSpace

(Official) The DSpace digital asset management system that powers your Institutional Repository

You can’t perform that action at this time.

Источник

Оцените статью