From 516fd51717ca251f6eee51238f0cb40611267a9a Mon Sep 17 00:00:00 2001 From: sapessi Date: Fri, 21 Dec 2018 16:45:13 -0800 Subject: [PATCH] Added comments as suggested in #167 --- .../archetype-resources/src/main/java/SpringApiConfig.java | 2 ++ .../archetype-resources/src/main/java/Application.java | 2 ++ .../serverless/sample/spring/PetStoreSpringAppConfig.java | 2 ++ .../com/amazonaws/serverless/sample/springboot/Application.java | 2 ++ 4 files changed, 8 insertions(+) diff --git a/aws-serverless-spring-archetype/src/main/resources/archetype-resources/src/main/java/SpringApiConfig.java b/aws-serverless-spring-archetype/src/main/resources/archetype-resources/src/main/java/SpringApiConfig.java index e40ad8bbf..0982c6b04 100644 --- a/aws-serverless-spring-archetype/src/main/resources/archetype-resources/src/main/java/SpringApiConfig.java +++ b/aws-serverless-spring-archetype/src/main/resources/archetype-resources/src/main/java/SpringApiConfig.java @@ -44,6 +44,8 @@ public HandlerAdapter handlerAdapter() { * * By default, an ExceptionHandlerExceptionResolver is created which creates many dependent object, including * an expensive ObjectMapper instance. + * + * To enable custom @ControllerAdvice classes remove this bean. */ @Bean public HandlerExceptionResolver handlerExceptionResolver() { diff --git a/aws-serverless-springboot-archetype/src/main/resources/archetype-resources/src/main/java/Application.java b/aws-serverless-springboot-archetype/src/main/resources/archetype-resources/src/main/java/Application.java index 119f698f3..0d25d61bd 100644 --- a/aws-serverless-springboot-archetype/src/main/resources/archetype-resources/src/main/java/Application.java +++ b/aws-serverless-springboot-archetype/src/main/resources/archetype-resources/src/main/java/Application.java @@ -52,6 +52,8 @@ public HandlerAdapter handlerAdapter() { * * By default, an ExceptionHandlerExceptionResolver is created which creates many dependent object, including * an expensive ObjectMapper instance. + * + * To enable custom @ControllerAdvice classes remove this bean. */ @Bean public HandlerExceptionResolver handlerExceptionResolver() { diff --git a/samples/spring/pet-store/src/main/java/com/amazonaws/serverless/sample/spring/PetStoreSpringAppConfig.java b/samples/spring/pet-store/src/main/java/com/amazonaws/serverless/sample/spring/PetStoreSpringAppConfig.java index 6655c501c..81179933c 100644 --- a/samples/spring/pet-store/src/main/java/com/amazonaws/serverless/sample/spring/PetStoreSpringAppConfig.java +++ b/samples/spring/pet-store/src/main/java/com/amazonaws/serverless/sample/spring/PetStoreSpringAppConfig.java @@ -51,6 +51,8 @@ public HandlerAdapter handlerAdapter() { * * By default, an ExceptionHandlerExceptionResolver is created which creates many dependent object, including * an expensive ObjectMapper instance. + * + * To enable custom @ControllerAdvice classes remove this bean. */ @Bean public HandlerExceptionResolver handlerExceptionResolver() { diff --git a/samples/springboot/pet-store/src/main/java/com/amazonaws/serverless/sample/springboot/Application.java b/samples/springboot/pet-store/src/main/java/com/amazonaws/serverless/sample/springboot/Application.java index 7988133aa..3019b05e7 100644 --- a/samples/springboot/pet-store/src/main/java/com/amazonaws/serverless/sample/springboot/Application.java +++ b/samples/springboot/pet-store/src/main/java/com/amazonaws/serverless/sample/springboot/Application.java @@ -49,6 +49,8 @@ public HandlerAdapter handlerAdapter() { * * By default, an ExceptionHandlerExceptionResolver is created which creates many dependent object, including * an expensive ObjectMapper instance. + * + * To enable custom @ControllerAdvice classes remove this bean. */ @Bean public HandlerExceptionResolver handlerExceptionResolver() {