Skip to content

Commit 3ac293f

Browse files
fix: enable CommandLineRunner bean and configure multipart and header size properties
1 parent f1bd074 commit 3ac293f

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

src/main/java/com/amigoscode/Main.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public static void main(String[] args) {
1717
SpringApplication.run(Main.class, args);
1818
}
1919

20-
// @Bean
20+
@Bean
2121
public CommandLineRunner commandLineRunner(
2222
ProductRepository productRepository) {
2323
return args -> {

src/main/resources/application-prod.properties

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ server.error.include-message=always
1313
cors.allowed.origins=*
1414
cors.allowed.methods=*
1515

16+
server.max-http-request-header-size=65KB
17+
spring.servlet.multipart.enabled=true
18+
spring.servlet.multipart.max-file-size=10MB
19+
spring.servlet.multipart.max-request-size=10MB
20+
spring.servlet.multipart.file-size-threshold=2KB
21+
1622
# AWS S3 Configuration
1723
aws.region=eu-west-1
1824
aws.s3.bucket=amigoscode-product-images-prod

src/main/resources/application.properties

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ server.error.include-message=always
1313
cors.allowed.origins=*
1414
cors.allowed.methods=*
1515

16+
server.max-http-request-header-size=65KB
17+
spring.servlet.multipart.enabled=true
18+
spring.servlet.multipart.max-file-size=10MB
19+
spring.servlet.multipart.max-request-size=10MB
20+
spring.servlet.multipart.file-size-threshold=2KB
21+
1622
# AWS S3 Configuration (MinIO for local development)
1723
aws.region=us-east-1
1824
aws.s3.bucket=product-images

0 commit comments

Comments
 (0)