This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@SpringBootApplication | |
@Log4j | |
class LambdaHandler implements RequestHandler<Map, Response> { | |
@Memoized | |
ApplicationContext getApplicationContext(String[] args = []) { | |
return SpringApplication.run(LambdaHandler.class, args) | |
} | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
id 'org.springframework.boot' version '1.5.2.RELEASE' | |
} | |
apply plugin: 'groovy' | |
repositories { | |
jcenter() | |
mavenCentral() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service: springboot-lambda | |
provider: | |
name: aws | |
runtime: java8 | |
memorySize: 1536 | |
timeout: 60 | |
package: | |
artifact: build/distributions/springboot-lambda.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( modelAnnotation.isMeasure() ) { | |
ModelAnnotation<Measure> measureAnnotation = (ModelAnnotation<Measure>) modelAnnotation; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<ModelAnnotation<?>> annotations = new ArrayList<ModelAnnotation<?>>(); | |
annotations.add( new ModelAnnotation<Measure>( "field1", new Measure() ) ); | |
annotations.add( new ModelAnnotation<Attribute>( "field2", new Attribute() ) ); | |
annotations.add( new ModelAnnotation<Dimension>( "field2", new Dimension() ) ); | |
annotations.add( new ModelAnnotation<HierarchyLevel>( "field3", new HierarchyLevel() ) ); | |
annotations.add( new ModelAnnotation<Measure>( "field4", new Measure() ) ); | |
for ( ModelAnnotation<?> modelAnnotation : annotations ) { | |
// do something with modelAnnotation - what is it? a measure, dimension, etc.... | |
} |
NewerOlder