-
직관적인 변수명의 사용. Naming을 좀 더 상세하게 해봅시다.
-
날짜와 시간을 나타내는 클래스는 ZonedDateTime, LocalDateTime이 있는데, 이들을 언제 선택하는 지 생각해봅시다.
-
field의 타입과 getter의 타입이 다른 경우를 지양합시다. 별도의 메소드로 분리합시다.
-
handlebar에서 별도의 getter를 어떻게 호출하는지 생각해봅시다.
-
Q&A 게시판에서 중간의 질문이 삭제되고 새로운 질문이 생성되었을 때, 인덱스는 어떻게 설정되어야 할까요?
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; |
-
- 좋은 글임.
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.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
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
# 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
#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
// 참고 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"); // 암호화 키 값<서버의 환경변수로 설정해줘야함> |
OlderNewer