public class SpringUtils extends Object
Modifier and Type | Method and Description |
---|---|
static File |
convertMultipartToFile(String prefix,
String suffix,
org.springframework.web.multipart.MultipartFile file)
Convert Spring multipartfile objet to classic File
|
static <T> T |
getBean(org.springframework.context.ApplicationContext context,
Class<T> bean) |
static String |
getQueryParams(javax.servlet.http.HttpServletRequest req)
Get params string from request
|
public static File convertMultipartToFile(String prefix, String suffix, org.springframework.web.multipart.MultipartFile file) throws IOException
prefix
- Prefix of the file namesuffix
- Suffix of the file namefile
- File to convertIOException
- Unable to create or write the temporary filepublic static <T> T getBean(org.springframework.context.ApplicationContext context, Class<T> bean)
public static String getQueryParams(javax.servlet.http.HttpServletRequest req)
req
- HTTP requestCopyright © 2023. All rights reserved.