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
| @Configuration | |
| @EnableTransactionManagement | |
| @EnableJpaRepositories(entityManagerFactoryRef = "sqlServerEntityManagerFactory", transactionManagerRef = "sqlServerTransactionManager", basePackages = "com.sma.aml.repository") | |
| public class SqlServerDatabaseConfiguration { | |
| @Bean | |
| @ConfigurationProperties(prefix = "sqlServer.datasource") | |
| public DataSourceProperties sqlServerDataSourceProperties() { | |
| return new DataSourceProperties(); | |
| } |
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
| /** | |
| * @author Mak Sophea | |
| * @date : 1/15/2020 | |
| **/ | |
| @Configuration | |
| public class TransactionManagerConfig { | |
| @Bean(name = "chainedTransactionManager") | |
| public ChainedTransactionManager transactionManager ( | |
| @Qualifier("sqlServerTransactionManager") PlatformTransactionManager sqlTransactionManager, |
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.sma.backend.service; | |
| /** | |
| * @author Mak Sophea | |
| * @date : 1/21/2020 | |
| **/ | |
| import lombok.extern.slf4j.Slf4j; | |
| import org.apache.commons.io.FileUtils; | |
| import org.apache.commons.io.IOUtils; |
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.sma.rabbitmq.config; | |
| import org.springframework.amqp.core.Binding; | |
| import org.springframework.amqp.core.BindingBuilder; | |
| import org.springframework.amqp.core.DirectExchange; | |
| import org.springframework.amqp.core.Queue; | |
| import org.springframework.context.annotation.Bean; | |
| import org.springframework.context.annotation.Configuration; | |
| /** |
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.sma.rabbitmq.service; | |
| import com.sma.rabbitmq.model.Category; | |
| import lombok.extern.slf4j.Slf4j; | |
| import org.springframework.amqp.rabbit.annotation.RabbitListener; | |
| import org.springframework.stereotype.Component; | |
| /** | |
| * Author: Mak Sophea | |
| * Date: 07/31/2020 |
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.sma.rabbitmq.service; | |
| import com.sma.rabbitmq.model.Category; | |
| import lombok.extern.slf4j.Slf4j; | |
| import org.springframework.amqp.core.AmqpTemplate; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.beans.factory.annotation.Value; | |
| import org.springframework.stereotype.Service; | |
| /** |
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
| import sys | |
| import botocore | |
| import boto3 | |
| import json | |
| import logging | |
| from botocore.exceptions import ClientError | |
| rds = boto3.client('rds') | |
| logger = logging.getLogger() | |
| logger.setLevel(logging.INFO) |
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
| import json | |
| import logging | |
| import os | |
| from urllib.request import Request, urlopen | |
| from urllib.error import URLError, HTTPError | |
| HOOK_URL = os.environ['HookUrl'] | |
| logger = logging.getLogger() |
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.amazonaws.cdk.examples; | |
| import com.google.gson.Gson; | |
| import com.google.gson.GsonBuilder; | |
| import software.amazon.awscdk.core.Construct; | |
| import software.amazon.awscdk.core.Stack; | |
| import software.amazon.awscdk.core.StackProps; | |
| import software.amazon.awscdk.services.ec2.*; | |
| import software.amazon.awscdk.services.ecr.IRepository; | |
| import software.amazon.awscdk.services.ecr.Repository; |
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
| import urllib3 | |
| import json | |
| import logging | |
| import os | |
| logger = logging.getLogger() | |
| logger.setLevel(logging.INFO) | |
| http = urllib3.PoolManager() |