Перейти к содержимому

Как сохранить файл pdf в postgresql spring

  • автор:

Владислав

Фамилия, контакты и фото доступны только для зарегистрированных работодателей. Чтобы получить доступ к личным данным кандидатов, войдите как работодатель или зарегистрируйтесь.

Получить контакты этого кандидата можно на странице https://www.work.ua/resumes/9457889

Чтобы назначить встречу, откройте контакты кандидата.

Загруженный файл

  • Посмотреть файл
  • Скачать файл в формате PDF

Это резюме размещено в виде файла. Эта версия для быстрого просмотра может быть хуже, чем оригинал резюме.

BAHLAI VLADYSLAV
J A V A D E V E L O P E R

CONTACT EXPERIENCE
[ ] (см. выше в блоке «контактная информация») JAVA JUNIOR DEVELOPER
FoxmindEd
[ ] (см. выше в блоке «контактная информация»)
January 2023 — April 2023
@bahlai_vlad Worked on the development of application «Learning Management
System».
Kyiv, Ukraine
Java 17, Spring Boot, Spring Security, Spring MVC, Spring Data JPA,
Lombok, Spring Mail, Flyway, PostgreSQL, JUnit5, Mockito, Spring
[ ] (см. выше в блоке «контактная информация»)
Boot Test, Testcontainers, Docker

SKILLS PROJECTS
Java 8-17 UNIVERSITY SCHEDULE
Spring Core, Spring Security, Spring The developed web application allows you to receive information
about the university’s class schedules.
MVC, Spring Boot
Thymeleaf, Spring Boot, Spring Security, Spring MVC, Spring Data
JDBC, Hibernate, Spring Data JPA
JPA, Flyway, Maven, Docker
SQL, PostgreSQL, Flyway ARBITRAGE SERVICE
JUnit, Mockito, Testcontainers, Spring The developed REST API allows you to receive information about the
Boot Test cryptocurrency pairs, which you can get profit, if buy/sell on
cryptocurrency exchange for profit.
Maven, Docker, Git Spring Boot, Spring Security, Spring MVC, Spring Data JPA, Flyway, Docker

GARAGE REST SERVICE
The developed REST API allows you to receive information about
LANGUAGES the car’s in «garage».
Spring Boot, Spring Security, Spring MVC, Spring Data JPA, Flyway,
Ukrainian — Native
Docker, Auth0
Russian — Native
English — Pre-Intermediate (B1)
EDUCATION
JAVA SPRING (MENTORING)
FoxmindEd
August 2022 — December 2022

BACHELOR OF SOFTWARE ENGINEER
State University of Telecommunications
2018 — 2022

Похожие кандидаты

  • Java-розробник, Львов, Удаленно.
  • Junior Java Developer, Киев.
  • Програміст Java, Черкассы, Удаленно.
  • Програміст Java, Киев.
  • Java-разработчик, Киев.
  • Java developer, Винница, Удаленно.

Spring Boot — работа header

Есть некоторое Spring Boot приложение, в нем реализована возможность загружать в и выгружать из бд файлы, которые в бд и хранятся (файлы маленькие, субд postgresql, формат bytea). И я ни в какую не могу понять как работает следующий метод контроллера, с помощью которого эти файлы и загружаются:

@GetMapping("") public ResponseEntity getFile(@PathVariable Long id) < OptionaloptionalFileEntity = fileService.getFile(id); if(optionalFileEntity.isEmpty()) < return ResponseEntity.notFound().build(); >FileEntity fileEntity = optionalFileEntity.get(); return ResponseEntity.ok() .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + fileEntity.getFileName() + "\"") .contentType(MediaType.valueOf(fileEntity.getContentType())) .body(fileEntity.getData()); > 

До последнего return все понятно, дальше мрак.
Объясните, пожалуйста, как работает последний return, желательно поэтапно — что и зачем это. Каким образом данная конструкция позволяет загружать файлы из бд.
(Настолько сильно не понимаю в какую сторону копать, что даже у гугла не знаю как лучше это спросить, офф документация спринга меньше путаницы не сделала)

Rest API java spring — Upload text and pdf to PostgreSQL database (postman — form data)

I am making a REST API in Java spring. I want to make a post request in postman and upload some text and a pdf file to my postgreSQL database. The connection works. I tested it with another endpoint. I tried alot of things but none of them works. I heard you can do this with postman — Form data. What I tried: added this to the @PostMapping() —> No success

consumes = MediaType.MULTIPART_FORM_DATA_VALUE 

In postman: added Content-type : application/json and Content-type : multipart/form-data Both of them with no success :(. Below my restcontroller

@RestController public class SheetMusicController < @Autowired SheetMusicRepository sheetMusicRepository; @GetMapping("/sheetmusic") public Listindex() < return sheetMusicRepository.findAll(); >@PostMapping(value = "/sheetmusic") public SheetMusic create(@RequestBody Map body) < String title = body.get("title"); byte[] pdf = "".getBytes(); SheetMusic sheetMusic = new SheetMusic(title,"","","",pdf); return sheetMusic; >> 

And a picture of postman Postman I don’t see what I do wrong. I hope you guys can help me out! Greetings,

Виталий

Фамилия, контакты и фото доступны только для зарегистрированных работодателей. Чтобы получить доступ к личным данным кандидатов, войдите как работодатель или зарегистрируйтесь.

Получить контакты этого кандидата можно на странице https://www.work.ua/resumes/9740294

Чтобы назначить встречу, откройте контакты кандидата.

Загруженный файл

  • Посмотреть файл
  • Скачать файл в формате PDF

Это резюме размещено в виде файла. Эта версия для быстрого просмотра может быть хуже, чем оригинал резюме.

Vitalii Potseluiko
JAVA DEVELOPER

My Contact Summary
I am a results-oriented Java developer seeking a full-time
[ ] (см. выше в блоке «контактная информация»)
position where I can apply my knowledge and skills in Java
[ ] (см. выше в блоке «контактная информация») (Telegram) Development. I have been practicing Java for 1 year. The
Ukraine, Kharkiv region, Bogoduhiv city/ first six months it was Java Core, and the rest of the time —
remote+, relocate+ the technology stack required for a junior developer and
LinkedIn / GitHub have completed several own projects, where I got an
understanding of how Java works with WEB (Tomcat),
databases (MySQL, PostgreSQL), Spring framework and
Skills how to test my application (JUnit).

Java Core, Java 8, Collections, OOP, Experience
SOLID
DB: JDBC, Hibernate, RDBMS The head of the production software bureau, SSK TM LLC
(PostgreSQL, MySQL) 2021-2022
Web Development: Servlets, Tomcat, Key responsibilities:
JSP, HTML/CSS, XML, JSON Managed a department of 6 workers, assigned tasks to
programmers for their efficient execution.
Spring (Spring Core, Spring Web, Spring
Carried out the plan set before the bureau.
Security, SpringBoot)
Tools & Libraries: Maven, JUnit Programmer engineer, SSK TM LLC,
Enterprise/integration design patterns 2015-2021
Operating systems: Windows
Version Control Tool — Git Key responsibilities:
Created controlled programs for coordinate punching
IDE — IntelliJ IDEA
presses: TruePunch 5000 and Trumatic 2000R.
English High Intermediate
Made the optimal layout of parts on sheet metal with
minimal residue.

Education Projects
Mate Academy Taxi service:
Java programing course Link
Completed in 2023 Description: is an application for drivers with basic functionality for
users written in Java, with registration of drivers, entering and
Kharkiv National Pedagogical University receiving data for the operation of the service
Teacher of Math and Computer Science The following technologies are used here: Maven, Java Servlets,
Apache Tomcat, JDBC, MySQL, JSP.
Specialist Degree, 2006-2011
Cinema-App
Self-Education Link
Description: application implements a cinema service model with
Passed Java Developer courses in Java the ability to register and authenticate user, control access to
Rush recourse various data. Booking service based on Hibernate and Spring
Passed Java Developer courses in in frameworks using general REST principles.
GeekForLess company, have certificate The following technologies are used here: Java 17, JDBC, MySQL,
Maven, Java Servlets API, Tomcat, Spring, Spring security, Hibernate,
JSON
Achievements

When I worked at «SSK TM» LLC, created a program for creating lists of details of
specific products for programmers and dispatchers. This made it possible to save
a lot of time for forming them independently (it was necessary to understand the
marking of products, understand what each symbol means and be able to read
drawings).

As for sports achievements, I took 2nd place in the hand-to-hand combat
championship of Ukraine when I was studying at the lyceum, and always won prizes
in the university championship in arm sports.

Похожие кандидаты

  • Junior Java Developer, Киев.
  • Програміст Java, Киев.
  • Java Developer, Харьков.
  • Java-разработчик, Киев.
  • Junior Java Developer, Харьков, Удаленно.
  • Junior Java Developer, 16500 грн , Киев, Черкассы, Удаленно.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *