분류 전체보기 (181) 썸네일형 리스트형 한 주의 시작 한 주의 시작은 일요일이 아닌 월요일 - 강제성은 없지만 이와 관련한 국가 표준이 존재 - ISO 공적 표준에 따르면 한 주의 시작은 월요일 목요일이 12월 3일인 이번 주는 11월 마지막 주가 아닌 12월 첫 주 - 목요일이 어디에 끼느냐가 그 주의 정체를 결정 - 한 주의 과반이 어느 달에 속하느냐를 본다 정오는 낮12시, 자정은 밤12시 - 하루는 오전->정오->오후->자정 - 국립국어원에 따르면 정오는 낮12시, 자정은 밤12시라고 표현해야 정확하다. mnews.jtbc.joins.com/News/Article.aspx?news_id=NB11107927 [팩트체크] 한주의 시작, 일요일일까? 월요일일까? [앵커]팩트체크 시간입니다. 오늘(30일)이 11월의 마지막 날이자 월요일입니다. 한 달의 마.. [javascript] includes 배열 포함여부 확인 var arr = [1,2,3,4]; if (arr.includes(1)) { // true console.log('포함'); } else { console.log('포함X'); } includes는 배열 포함여부에 따라 true/false를 반환한다. developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Array/includes Array.prototype.includes() - JavaScript | MDN includes() 메서드는 배열이 특정 요소를 포함하고 있는지 판별합니다. The source for this interactive example is stored in a GitHub repository. If you'd.. test 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 /** SUB QUERY를 이용한 방법 **/ SELECT T1.EMPNO , T1.ENAME , T2.DNAME , T2.DCNT FROM SCOTT.EMP T1 LEFT OUTER JOIN ( SELECT A.DEPTNO , MAX(A.DNAME) AS DNAME , COUNT(B.EMPNO) AS DCNT FROM SCOTT.DEPT A LEFT OUTER JOIN SCOTT.EMP B ON B.DEPTNO = A.DEPTNO WHERE 1=1 GROUP BY A.DEPTNO ) T2 ON T2.D.. jUnit5 인자테스트 @ParameterizedTest gmlwjd9405.github.io/2019/11/27/junit5-guide-parameterized-test.html [JUnit] JUnit5 사용법 - Parameterized Tests - Heee's Development Blog Step by step goes a long way. gmlwjd9405.github.io velog.io/@ashesglow/%ED%8C%8C%EB%9D%BC%EB%AF%B8%ED%84%B0-%ED%85%8C%EC%8A%A4%ED%8A%B8%EB%A5%BC-%ED%95%98%EB%8A%94-%EB%B0%A9%EB%B2%95-Junit5-JUnitParams [리팩토링] 중첩 if문 제거 문제점 및 해결방안 불필요한 중첩 if문 사용 -> 중첩 제거 likeMode를 비교하는 부분의 중복 -> 추출 else 사용 -> if문 위쪽에서 수행 변경 전 레거시 코드 if (owner.isEmpty() || owner == null) { vo.setOwner("%"); } else { if (likeMode == 0) { vo.setOwner(owner); } else { vo.setOwner(owner + "%"); } } if (table.isEmpty() || table == null) { vo.setTable("%"); } else { if (likeMode == 0) { vo.setTable(table); } else { vo.setTable(table + "%"); } } 변경 후 i.. Spring Security 테스트 - 2 스프링 시큐리티 테스트 formLogin() : 폼 로그인 테스트 authenticated() : 인증 unauthenticated() : 인증 실패 @Transactional : 개별 테스트 (username 중복 방지) package me.whiteship.demospringsecurityform.account; import org.junit.Before; import org.junit.jupiter.api.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.A.. Spring Security 테스트 - 1 의존성 추가 org.springframework.security spring-security-test test 스프링 시큐리티 테스트 @WithMockUser 어노테이션 이용 with() 메서드 이용 package me.whiteship.demospringsecurityform.account; import org.junit.jupiter.api.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.spring.. Spring Security 기본 셋팅 pom.xml에 의존성 추가 org.springframework.boot spring-boot-starter-security 컨트롤러 @Controller public class SampleController { @GetMapping("/") public String index(Model model, Principal principal) { if (principal == null) { model.addAttribute("message", "Hello Spring Security"); } else { model.addAttribute("message", "Hello " + principal.getName()); } return "index"; } @GetMapping("/info") public Strin.. 이전 1 ··· 6 7 8 9 10 11 12 ··· 23 다음