-
- 좋은 글임.
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
// 참고 https://elfinlas.github.io/2017/12/21/jsaypt/ | |
@Configuration | |
public class JasyptConfig { | |
@Bean("jasyptStringEncryptor") | |
public StringEncryptor stringEncryptor() { | |
PooledPBEStringEncryptor encryptor = new PooledPBEStringEncryptor(); | |
SimpleStringPBEConfig config = new SimpleStringPBEConfig(); | |
config.setPassword("sign-up"); // 암호화 키 값<서버의 환경변수로 설정해줘야함> |
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
#h2 DB inmemeory database | |
spring.datasource.url=jdbc:h2:mem:<db명> | |
spring.datasource.driverClassName=org.h2.Driver | |
spring.datasource.username=sa | |
spring.datasource.password= | |
# enable h2 console | |
spring.h2.console.enabled=true | |
spring.h2.console.path=/h2-console | |
# 로그레벨 설정 |
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
# profile 설정 | |
spring.profiles.active=<profile_name> |
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
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import springfox.documentation.builders.PathSelectors; | |
import springfox.documentation.builders.RequestHandlerSelectors; | |
import springfox.documentation.spi.DocumentationType; | |
import springfox.documentation.spring.web.plugins.Docket; | |
import springfox.documentation.swagger2.annotations.EnableSwagger2; | |
@Configuration | |
@EnableSwagger2 |
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
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.stereotype.Component; | |
import javax.servlet.*; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
import java.io.IOException; | |
@Component |
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
@Autowired | |
private ApplicationContext applicationContext; | |
private static final Logger log = LoggerFactory.getLogger(DustApplicationTests.class); | |
@Test | |
void contextLoads() { | |
assertThat(applicationContext).isNotNull(); | |
log.debug("Application Context를 정상적으로 불러왔습니다."); | |
} |
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
import org.junit.jupiter.api.BeforeEach; | |
import org.junit.jupiter.api.Test; | |
import java.util.Optional; | |
import static org.assertj.core.api.Assertions.assertThat; | |
class MapAndFlatMapTest { | |
Person dion; |
NewerOlder