This file contains hidden or 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
package com.anhtv08.springbootdemo; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
@SpringBootApplication | |
public class SpringBootDemoApplication { | |
public static void main(String[] args) { | |
SpringApplication.run(SpringBootDemoApplication.class, args); |
This file contains hidden or 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
package com.anhtv08.springbootdemo.controller; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RestController; | |
@RestController | |
public class HelloController { | |
@RequestMapping("/hello") | |
public String hello(){ |
This file contains hidden or 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
// | |
// Source code recreated from a .class file by IntelliJ IDEA | |
// (powered by Fernflower decompiler) | |
// | |
package org.springframework.boot.autoconfigure; | |
import java.lang.annotation.Documented; | |
import java.lang.annotation.ElementType; | |
import java.lang.annotation.Inherited; |
This file contains hidden or 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
// | |
// Source code recreated from a .class file by IntelliJ IDEA | |
// (powered by Fernflower decompiler) | |
// | |
package org.springframework.boot.autoconfigure.data.elasticsearch; | |
import java.util.Collections; | |
import java.util.Iterator; | |
import java.util.LinkedHashMap; |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<parent> | |
<groupId>com.anhtv08</groupId> | |
<artifactId>spring-tutorials</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
</parent> |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.anhtv08</groupId> | |
<artifactId>spring-tutorials</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<packaging>pom</packaging> | |
<parent> |
This file contains hidden or 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
CASSANDRA_VERION=3.11 | |
CASSANDRA_NODES=( | |
CASSANDRA_1 \ | |
CASSANDRA_2 \ | |
CASSANDRA_3 | |
) | |
# setup cassandra 3.11 | |
# assume you have docker installed. |
This file contains hidden or 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
keyspace: perftesting | |
keyspace_definition: | |
CREATE KEYSPACE perftesting WITH replication = { 'class': 'SimpleStrategy', 'replication_factor': 3}; | |
table: users | |
table_definition: | |
CREATE TABLE users ( |
This file contains hidden or 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
from typing import Sequence | |
import logging as log | |
import boto3 | |
from typing import List | |
from botocore.exceptions import ClientError | |
from typing import Dict | |
ec2_client = boto3.client('ec2') | |
sns_client = boto3.client('sns') |
This file contains hidden or 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
Resources: | |
ruleEvaluationDev: | |
Type: 'AWS::Serverless::Function' | |
Properties: | |
FunctionName: 'cost-controller-function' | |
Description: 'Integrating lambda with Parameter Store' | |
Handler: 'cost_controller.cost_controller_handlers.lambda_handler' | |
Runtime: 'python3.6' | |
Role: 'arn:aws:iam::<your_account_id_here>:role/service-role/my-rule-evaluation-function' | |
Timeout: 5 |
OlderNewer