InputAge = 2012-01-10 public String getAge(String InputAge) { //현재 년도 구하기 Calendar now = Calendar.getInstance(); //년월일시분초 Integer currentYear = now.get(Calendar.YEAR); //태어난년도를 위한 세팅 SimpleDateFormat format = new SimpleDateFormat("yyyy"); String stringBirthYear = format.format(InputAge); //년도만받기 //태어난 년도 Integer birthYear = Integer.parseInt(stringBirthYear); // 현재 년도 - 태어난 년도 => 나이 (만나이X) int ag..
Programing
로그를 보다가 어떤 값에 null 이 들어온 것을 보고 null 체크를 하려고 기존에 되어있던 if ( test != null || !"".equals(test) ) { ~ } else { ~ } 이런 식으로 코드를 짜서 했는데 생각대로 안되길래 하나하나 뜯어보려고 public void nullCheck() { String test1 = null; log.info(".equals(test1) >> " + ("".equals(test1)) ); log.info("null==test1" + (null==test1) ); String test2 = ""; log.info(".equals(test2) >> " + ("".equals(test2)) ); log.info("null==test2" + (null==t..
- DecimalFormat class 를 사용 String value = "5000000"; int int_value = Integer.parseInt(value); DecimalFormat decimalFormat = new DecimalFormat("###,###"); String DecValue = decimalFormat.format(int_value); log.info("DecValue >> " + DecValue);
lombok 를 사용해서 Getter / Setter 를 사용 중인데 @Data public class test_VO { @Param(description ="테스트아이디", required=false, sample="") private String testId; @Param(description ="테스트이름", required=false, sample="") private String testName; @Param(description ="테스트test", required=false, sample="") private String tEstTest; } 이런 식으로 만들어서 사용 중인데 testId, testName 은 데이터가 잘 들어오는데 tEstTest 는 데이터가 들어오지가 않았다... 확인해 ..
import java.util.HashMap; import java.util.Iterator; import java.util.Map; public class MapIterationSample { public static void main(String[] args) { HashMap hashMap = new HashMap(); hashMap.put("test3", "name5"); hashMap.put("test4", "name2"); hashMap.put("test5", "name1"); hashMap.put("test1", "name3"); hashMap.put("test2", "name4"); System.out.println("=================Type1================="..
npm run dev 를 실행하니 > response-check@1.0.0 dev > webpack serve --hot --env development [webpack-cli] Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options has an unknown property 'publicPath'. These properties are valid: object { allowedHosts?, bonjour?, client?, compress?, devMiddleware?, headers?, historyApiFallback?, host?..