Spring boot related - salmanbaig8/imp GitHub Wiki

spring-boot:run -Drun.jvmArguments="-Xms2048m -Xmx3072m -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+HeapDumpOnOutOfMemoryError -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5000" spring-boot:run -Dagentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000 swagger.enabled=true

MULTIPART (MultipartProperties)

spring.http.multipart.max-file-size=5MB spring.http.multipart.max-request-size=5MB spring.http.multipart.enabled=true

Threshold after which files are written to disk.

spring.http.multipart.file-size-threshold=2KB

#For Ignoring Serializing of InputStream #spring.jackson.serialization.FAIL_ON_EMPTY_BEANS=false

#FOR CORS security.basic.enabled=false

@Configuration public class AppConfig extends WebMvcConfigurerAdapter {

@Bean
public WebMvcConfigurer corsConfigurer() {
	return new WebMvcConfigurerAdapter() {
		@Override
		public void addCorsMappings(CorsRegistry registry) {
			registry.addMapping("/**").allowedMethods("HEAD", "GET", "PUT", "POST", "DELETE", "PATCH");
		}
	};
}

}

why not to create interface for controllers:https://dzone.com/articles/spring-controllers-implementing-interfaces