Skip to content

Commit 1af0f7c

Browse files
committed
Add documentation for Profile support in README
1 parent 7a808b7 commit 1af0f7c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class LambdaHandler implements RequestHandler<AwsProxyRequest, AwsProxyRe
3636
```
3737

3838
### Spring support
39-
The library supports Spring applications that are configured using annotations (in code) rather than in an XML file. The simplest possible configuration uses the `@ComponentScan` annotation to load all controller classes from a package. For example, our unit test application has the following configuuration class.
39+
The library supports Spring applications that are configured using annotations (in code) rather than in an XML file. The simplest possible configuration uses the `@ComponentScan` annotation to load all controller classes from a package. For example, our unit test application has the following configuration class.
4040

4141
```java
4242
@Configuration
@@ -57,6 +57,9 @@ public class LambdaHandler implements RequestHandler<AwsProxyRequest, AwsProxyRe
5757
}
5858
```
5959

60+
#### Spring Profiles
61+
You can enable Spring Profiles (as defined with the `@Profile` annotation) by deploying your Lambda under a stage name that matches the profile name. This will allow you to create a single package with support for different resources for dev, test, prod, etc. See [@Profile documentation](http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/context/annotation/Profile.html) for details.
62+
6063
### Spark support
6164
The library also supports applications written with the [Spark framework](http://sparkjava.com/). When using the library with Spark, it's important to initialize the `SparkLambdaContainerHandler` before defining routes.
6265

0 commit comments

Comments
 (0)