spring-mvc

Spring Web Reactive client

Deadly 提交于 2020-07-05 07:34:29
问题 I'm trying to use the Spring Reactive WebClient to upload a file to a spring controller. The controller is really simple and looks like this: @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) public ResponseEntity<String> uploadFile( @RequestParam("multipartFile") MultipartFile multipartFile, @RequestParam Map<String, Object> entityRequest ) { entityRequest.entrySet().forEach(System.out::println); System.out.println(multipartFile); return ResponseEntity.ok("OK");

Spring Web Reactive client

风格不统一 提交于 2020-07-05 07:33:08
问题 I'm trying to use the Spring Reactive WebClient to upload a file to a spring controller. The controller is really simple and looks like this: @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) public ResponseEntity<String> uploadFile( @RequestParam("multipartFile") MultipartFile multipartFile, @RequestParam Map<String, Object> entityRequest ) { entityRequest.entrySet().forEach(System.out::println); System.out.println(multipartFile); return ResponseEntity.ok("OK");

HikariPool-1 - jdbcUrl is required with driverClassName

a 夏天 提交于 2020-07-05 00:07:36
问题 I went back to programming my old program https://github.com/JonkiPro/REST-Web-Services. I've updated Spring Boot from version 15.6 to version 2.0.0. I have encountered many problems with compilation, but I can not deal with one. Well, during compilation, he throws me in the console 2018-03-18 21:54:53.339 ERROR 3220 --- [ost-startStop-1] com.zaxxer.hikari.HikariConfig : HikariPool-1 - jdbcUrl is required with driverClassName. 2018-03-18 21:54:55.392 INFO 3220 --- [ost-startStop-1] j

HikariPool-1 - jdbcUrl is required with driverClassName

随声附和 提交于 2020-07-05 00:06:33
问题 I went back to programming my old program https://github.com/JonkiPro/REST-Web-Services. I've updated Spring Boot from version 15.6 to version 2.0.0. I have encountered many problems with compilation, but I can not deal with one. Well, during compilation, he throws me in the console 2018-03-18 21:54:53.339 ERROR 3220 --- [ost-startStop-1] com.zaxxer.hikari.HikariConfig : HikariPool-1 - jdbcUrl is required with driverClassName. 2018-03-18 21:54:55.392 INFO 3220 --- [ost-startStop-1] j

Spring Boot Annotation @Autowired of Service fails

拜拜、爱过 提交于 2020-07-04 09:43:26
问题 I'm trying to use @Autowired annotation for a Service class in Spring Boot application, but it keeps throwing No qualifying bean of type exception. However, if I change the service class to a bean, then it works fine. This is my code: package com.mypkg.domain; @Service public class GlobalPropertiesLoader { @Autowired private SampleService sampleService; } package com.mypkg.service; @Service public class SampleService{ } And this is my SpringBoot class: package com.mypkg; import java.util.Set;

Spring Boot Annotation @Autowired of Service fails

房东的猫 提交于 2020-07-04 09:43:10
问题 I'm trying to use @Autowired annotation for a Service class in Spring Boot application, but it keeps throwing No qualifying bean of type exception. However, if I change the service class to a bean, then it works fine. This is my code: package com.mypkg.domain; @Service public class GlobalPropertiesLoader { @Autowired private SampleService sampleService; } package com.mypkg.service; @Service public class SampleService{ } And this is my SpringBoot class: package com.mypkg; import java.util.Set;

Spring Boot multipartfile always null

淺唱寂寞╮ 提交于 2020-07-04 08:51:46
问题 I am using Spring Boot version = '1.4.0.RC1' with Spring Boot Stormpath 1.0.2. I am trying to use multipart file upload but the MultipartFile is always null in the controller. When I use @RequestPart("file") the info: "status":400,"error":"Bad Request","exception":"org.springframework.web.multipart.support.MissingServletRequestPartException","message":"Required request part 'file' is not present" When I use @RequestPart(name = "file", required = false), the part is always null. However, if I

Spring MVC: formal unbound in pointcut

ぃ、小莉子 提交于 2020-06-29 13:37:07
问题 I have this class in my Spring Web model-view-controller (MVC) framework. I am using aspect-oriented programming (AOP), a programming paradigm that aims to increase modularity by allowing the separation of cross-cutting concerns. Everything is fine with this class @Aspect public class MarketingAspect extends ServiceSupport { @Pointcut("execution(* com.tdk.iot.services.client.LicenseService.*(..))") public void handleServiceMethod() { } @Pointcut("execution(* com.tdk.iot.services.client

Spring MVC: formal unbound in pointcut

牧云@^-^@ 提交于 2020-06-29 13:35:11
问题 I have this class in my Spring Web model-view-controller (MVC) framework. I am using aspect-oriented programming (AOP), a programming paradigm that aims to increase modularity by allowing the separation of cross-cutting concerns. Everything is fine with this class @Aspect public class MarketingAspect extends ServiceSupport { @Pointcut("execution(* com.tdk.iot.services.client.LicenseService.*(..))") public void handleServiceMethod() { } @Pointcut("execution(* com.tdk.iot.services.client

Why @vaild annotation is not working in my spring MVC application? I searched a lot, but couldn't find solution

生来就可爱ヽ(ⅴ<●) 提交于 2020-06-29 04:11:06
问题 Basically it should return a message if the field is not valid. but in my case it's not working here!! below is my controller class. @Controller public class StoreController { private NearByStoreInterface getmestore; @Inject public StoreController(NearByStoreInterface getmestore) { this.getmestore=getmestore; } @RequestMapping(value = "/nearbystore", method = RequestMethod.GET) public String display(Model m) { final ControllerTolibModel userDetails=ControllerTolibModel.builder().build(); m