I have a form with two inputs: one type text and the other is file. how can i pass the file to backend spring boot? and how to store it or get there content data with postgresql database. thank you in advance for return.
相关问题
- Angular RxJS mergeMap types
- npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs
- How to update placeholder text in ng2-smart-table?
- How to instantiate Http service in main.ts manuall
- Angular: ngc or tsc?
相关文章
- angular脚手架在ie9+下兼容问题
- angular 前端项目 build 报错 "Cannot find module 'le
- spring-mvc a标签带参怎样向controller发送请求。路径格式?
- Angular Material Stepper causes mat-formfield to v
- After upgrade to Angular 9 cannot find variable in
- is there any difference between import { Observabl
- Suppress “Circular dependency detected” suppress w
- How can you get current positional information abo
HTML File
TypeScript File component class
TypeScript File service class
Spring Controller
You can used the ng-file-upload dependency. After adding that to your angularJs project, add this to your html file.
Adjust ngf-accept and ngf-max-size as per your requirement. In your Js file add this
Your spring boot app. In your controller.
In your Service
The domain class will be
The repository is just a simple repository that extends the CrudRepository