Advent Calendarã«åå ãã¦ã¿ããã¦ããã°ãå§ãã¦ã¿ã¾ããï¼ãããããé¡ããã¾ãï¼ ãã¡ãã¯Java EE Advent Calendar 2013 - Adventar 20æ¥ç®ã®è¨äºã§ãã åæ¥ã®è¨äºã¯AOE Takashiããã®ã Java EE Managed Beanã«ã¤ã㦠(Java EE Advent Calendar2013 19æ¥ç®) - AOEã®æ¥è¨ ãã§ããã æ¬æ¥ã¯Java EEã¨ä½µç¨ãããã³ãã¬ã¼ãã¨ãã¦ããã°ãã°è©±é¡ã«ãããThymeleafã«ã¤ãã¦æãã¨ãããæ¸ãã¾ããã Thymeleafãã°ããã æ¥åã§ã¯JSPãå©ç¨ãã¦ããã®ã§ããã以åãä¸è¨ã®è¨äºã«è§¦çºããã¦ããThymeleafãåãå ¥ãããã¨ç»çãã¦ãã¾ããï¼ãã¾ã ããã¼æ´»åãå®ã£ã¦ãã¾ãããã»ã»ã»ãï¼ ãã¶ã¤ãã¼ãããã¡ã¨ã®åæ¥ãæ¨ãé²ãã Thymeleaf | Nulab Te
id: 1144 ææè : msakamoto-sf ä½ææ¥: 2013-02-03 17:56:27 ã«ãã´ãª: Groovy Java [ Prev ] [ Next ] [ Java ] 2013-02-02æç¹ã§ãJSP以å¤ã®ã¢ãã³ãªViewã³ã³ãã¼ãã³ãã«ã¤ãã¦ã¡ã¢ã å ãã¿ï¼ open source - Smart-like template engine for java? - Stack Overflow http://stackoverflow.com/questions/2222105/smart-like-template-engine-for-java ãã®ï¼ï¼FreeMarker FreeMarker: Java Template Engine Library - Overview http://freemarker.org/ java - Default esc
ãããããJavaã¨ã³ã¸ãã¢ãªã®ã§ãjava8ãä¸å¿è§¦ã£ã¦ãããªãããªã¨æãã ãã¨ããã¬ã¼ã ã¯ã¼ã¯ã®Springã4ç³»ãåºãã®ã§ä¸å¿è§¦ã£ã¦ãããªãããªã¨æãã åã«ããã¨ãSpringBootã¨ãããã¤ã使ãã°æ¥½ã«éçºã§ããã¨èããæè¿ã¯Thymeleafã¨ãããã³ãã¬ã¼ãã¨ã³ã¸ã³ãã¤ã±ã¦ãã¨èãããããªããããããã£ã¦è©¦ãã¦ã¿ã¾ããã Java8 ãªããã©ã ãå¼ã使ããããã«ãªã£ãã¨ãStreamãè¯ãæãã¨ãèãã¾ããã ããããJDKã¨JREãå ¥æã Spring4 java8ã«å¯¾å¿ããããWebSocketã«å¯¾å¿ããããããããé²åãããããã ããããSpring Tool Suite(Springãæåããå ¥ã£ãEclipse)ãå ¥æããã¼ã¸ã§ã³ã¯3.5ç³»ããã SpringBoot Springã®åã©ã¤ãã©ãªï¼aopã ã¨ãcontextã ã¨ãï¼ãã²ã¨ã¾ã¨ãã«ãã¦ããããã®ã
ã¦ã¼ã¶ã¼å®ç¾©é¢æ°ã®è¿ãããã¼ãã«ä»£ããã«ä½¿ã£ã¦ã¿ã¾ãããã¼ãã«ä»£ããã«ä½¿ãå ´åã«ã¯ãã¡ã½ããã¯ResultSetãè¿ããã®ã§ããäºãå¿ è¦ã§ãã ãã以å¤ãå®è£ ã§ç¹ã«é£ããã¨ããã¯ããã¾ããããã¦ã¼ã¶å®ç¾©é¢æ°ããã¼ãã«ã¨ãã¦æ±ãã¨ãã«ã¯ãå°ãªãã¨ã2åã®ã¡ã½ããã®å®è¡ãçºçãããã¨ãããã¨ã«æ³¨æãå¿ è¦ã§ããå ·ä½çã«ã¯ãSQLããã¼ã¹ãã¦ãã«ã©ã æ å ±ãåå¾ããã¨ããããã¨å®æ½ããã¨ãã§ãããµã³ãã«ã«ãããããã«ãã«ã©ã æ å ±ãåå¾ããã¨ãã«ã¯conn.getMetaData().getURL()ã§ãè¿ã£ã¦ããå¤ã"jdbc:columnlist:connection"ã«ãªãã®ã§ãããã確èªããããã¨ããããã«ã©ã æ å ±ã ãä½æãã¦ããã£ãã¨ResultSetãè¿ãã¦ãã¾ãã¾ãã package com.karatebancho; import java.sql.Connection; import
Thymeleaf ããããã¼ãµ ã®ã¡ã¢ãæ¸ãã£ã¨ JAX-RS ã§åãããªã jersey-thymeleaf using ViewProcessor - Mitsuyuki.Shiiba ãåèã«ãªãããã å ¬å¼ããã¥ã¡ã³ãã® http://www.thymeleaf.org/doc/Tutorial%20-%20Using%20Thymeleaf%2020130224.pdf ãèªã¿ãªããã好ããªã¨ããã ãããã¯ã¢ãããã What? Thymeleaf ã¯Javaã®ãã³ãã¬ã¼ãã¨ã³ã¸ã³ã§ãã HTMLãå£ããªãããã«æ¸ããã®ã§éçã«ãè¦ãã¦ãåçã«ãè¦ãã¦ã ãã¶ã¤ãã¼ããã¨ä¸ç·ã«ããã¨ãã«(ï¾Ð´ï¾)ï½³ï¾ï½°ãªæãã«ã§ããããªæãã§ãã How? "th" ã® namespace ãæã£ãå±æ§ãã¿ã°ã«æ¸ãã¾ãã <p>Today is: <span th:text="${today}
ãã®åã®ã¨ããJavaBeansã®çºã®Validationã®ä»æ§ã§ããJSR303ã§ãããè¿é ã§ããªãã§ããHibernateã¯ãã¡ããããã®ä»SpringãOvalãªã©ã®å¨è¾ºãã¬ã¼ã ã¯ã¼ã¯ã®å¯¾å¿ãé²ãã§ããã¶ã使ãããããªã£ã¦ãã¾ããã ã¨ããã§ã¢ããªã±ã¼ã·ã§ã³ä½ã£ã¦ã¦Validationã®ä»çµã¿ã£ã¦æ¯åæ©ã¿ã¾ãããï¼ç§ãJavaã§Webã¢ããªã±ã¼ã·ã§ã³ã¤ããã¯ãããé ãªããã ã¨Struts1.xãå ¨çæã§validation.xmlãvalidation-rule.xmlã¨ã使ã£ã¦æ¸ãã¦ã¾ããã(ä»èããã°äºåº¦ã¨ãããããªãã§ããï½)ãä»ã§ãæ¯åã©ã®ãã§ãã¯ãã©ã®ã¬ã¤ã¤(ã¢ããªã±ã¼ã·ã§ã³ã¬ã¤ã¤ï¼ãã¡ã¤ã³ã¬ã¤ã¤ï¼)ã«æããããã¨ãããã¼ã¿ã¹ãã¢ã«åãåããããªãã¨ãããªãValidationã£ã¦ç»é¢ã®å ¥åã ãã§ãã§ãã¯ã§ããã®ã¨ã©ã管çãããããªã¨ããè²ã ã¨æ©ããã¨ããã°ãã°ã§ããæè¿D
ã¹ããããªã¹ãï¼Skip Listï¼ã¯1990å¹´ã«çºè¡¨ãããæ¯è¼çæ°ããã¢ã«ã´ãªãºã ã§ãè¦ç´ ã®æ¿å ¥ãåé¤ãæ¤ç´¢ã平衡æ¨ã¨åçã®ããã©ã¼ãã³ã¹ã§å®è¡å¯è½ãªãªã¹ãæ§é ã§ãã Skip Listã¯é£çµãªã¹ãã®å¤å±¤æ§æã«ãªã£ã¦ãã¾ããè·¯ç·ã«ä¾ããã¨ãæä¸å±¤ã®ãªã³ã¯ã¯åé§ åè»ã®ããã«ãå ¨è¦ç´ ãçµãã§ãã¾ããä¸æ¹ãä¸å±¤ã®ãªã³ã¯ã¯æ¥è¡ãç¹æ¥ã®ããã«ãéä¸ã®è¦ç´ ãã¹ãããããããã«ãªã£ã¦ãã¾ãããã®è·¯ç·ãç¹æ¥âæ¥è¡ââ¦âåé§ ã¨ä¹ãç¶ããã¨ã§ãç®çã®è¦ç´ ã«é«éã«å°éã§ããä»çµã¿ã§ãããã£ã¨è©³ãã解説ã¯ãã¡ãããã¡ãã«ããã¾ãã ã§ããããããæ¬é¡ã§ããSkip Listã®å®è£ ã¯ããã¤ãåºã¦ãããã§ãããSorted Listã¨ãã¦ã®å®è£ ã°ããã§ãè¦ç´ ãä»»æé åºã§æ ¼ç´ã§ãã¦ã©ã³ãã ã¢ã¯ã»ã¹ï¼indexãæå®ãã¦ã®ã¢ã¯ã»ã¹ï¼å¯è½ãªSkip Listãè¦ã¤ãããªãã£ãã®ã§ãèªåã§ä½ã£ã¦ã¿ã¾ããã é常ã®Skip
2013-06-29 第1åæ¸è°·Javaã«è¡ã£ã¦ãã æ¸è°·ã¸ã£ãã®ã¹ã©ã¤ãã«gifã¢ãã¡è²¼ã£ã¦ãâ ã¬ã¸ã£ã¹ã太é (@rejasupotaro) 2013, 6æ 28 ææ¥æ¸è°·ã§è¥è ãä¸æ°ã«å©ãã°Javaå¢ã«å¤§ããææãä¸ããããâ ä¸ææ° (@r7kamura) 2013, 6æ 28 ã¸ã£ãè¸äººâ¦â ãªãã¦ãã¼ (@naoty_k) 2013, 6æ 28 æ¸è°·ã§Javaã«ã¤ãã¦èªãåãæ¸è°·Javaã«åå ãã¦ãã。ããã·ã¥ã¿ã°ã¯#æ¸è°·java。 主å¬è ã®@seri_kããã¯ããºãªã¼ãã®ã¨ã³ã¸ãã¢ã ã£ãã®ã§ããºãªã¼ãã§éå¬ããã。 ããºãªã¼ã、ãªãã£ã¹ã®ä¸ã«åºããã£ã(ä¸ã¯åèç»åã§ã)。 åå¿è åãã£ã¦æ¸ãã¦ãã£ããã©çµæ§ã¬ãå¢ããã¦ï½¤Mavenã»ã³ãã©ã«ã®ç´°ãã話ã¨ãMixer2ã®è©±ã¨ãããã©ã¼ãã³ã¹ãæèããã³ã¼ãã£ã³ã°ã®è©±ã¨ãåºã¦æ¸ãæãã ã£ã。 ãããªä¸ï½¤èªåã¯å®å ¨ã«
åæ¸ã Scalaã¨ããè¨èªããåç¥ã§ããï¼ Javaã¨åããã³ã³ãã¤ã«ãããã¨classãã¡ã¤ã«ã«ãªããå®è¡æã¯JVMä¸ã§åä½ããããªãã¸ã§ã¯ãæåï¼é¢æ°åã®ããã°ã©ãã³ã°è¨èªã§ãã Scalaãéçºããã®ã¯Javaã®genericsã®è¨è¨ãæãããããjavacã®éçºããã¦ããçµæ´ãæã¤Martin Oderskyæ°ã Scalaã¯å¾çºã®è¨èªã¨ãããã¨ããã£ã¦ãJavaãæ¸ãã¦ããæã«æããåé·ãã«å¯¾ããæ§ã ãªè§£ãç¨æããã¦ãã¾ãã æ¬è¨äºã§ã¯ãScalaã¨Javaã®ã³ã¼ããæ¯è¼ããªãããJavaã¦ã¼ã¶ãScalaã«ç§»ã£ãéã«å¾ãããã¡ãªãããæ示ãã¦ããã¾ãã å°ãåºç¤ã®ãµã³ãã«ã³ã¼ãã¯Javaã¦ã¼ã¶ã«ä¼ãããããããã«ãreturnãæè¨ããããã¡ã½ããã¯å¿ ã{ }ã§å²ããªã©ã極åJavaã£ã½ãè¨è¿°ããã¦ãã¾ãã ã ãããJavaã¨åããããªæ¸ãæ¹ãã§ãã¾ã Scalaã¯Javaã®
ã¤ã¬ã¤ã¸ã£ã§ã¯ã¸ã§ããªã¯ã¹ã®ä½ãæ¶ããã®ãã«ã¦è¦ªã¯ã©ã¹ãç¶æ¿ããéã«æå ¥ãã¦ããã¸ã§ããªã¯ã¹åãã©ã¡ã¼ã¿ã¯classã®æ å ±ã¨ãã¦æ®ã£ã¦ãããã¨ãè¿°ã¹ã¾ããã ãããå©ç¨ããã¨ã public class A<X> { public class B<Y> extends A<Y> { public class C extends B<String> { ã¨ãã£ãç¶æ¿é層ããã£ãå ´åã«ãC.classããA.classã®<X>ã«ã©ã®ãããªå ·è±¡åãé©ç¨ããã¦ããã®ã(ä¸è¨ä¾ã§ã¯Stringå)ããªãã¬ã¯ã·ã§ã³ã§åå¾ãããã¨ãã§ãã¾ãã Aã®åãã©ã¡ã¼ã¿ã®ãã¬ã¼ã¹ãã«ã<X>ãåå¾ Bã§super-classã®åãã©ã¡ã¼ã¿ã«æ¸¡ãããTypeãåå¾ 2ã®Typeãå ·è±¡åã§ã¯ãªãåãã©ã¡ã¼ã¿<Y>ãªã®ã§ããã«ãµãã¯ã©ã¹ãèµ°æ» Cã§super-classã®åãã©ã¡ã¼ã¿ã«æ¸¡ãããTypeãåå¾ B<Y>ã®
Java Advent Calendar 2011ã®16æ¥ç®ã§ãã åï¼JSFUnitã§ãã¹ããããï¼ | Kokuzawaã®æ¥è¨ 次ï¼JavaEE使ã£ã¦ã¦ã§ãã¢ããªã±ã¼ã·ã§ã³ã¤ãããã - æ°´ã¾ããã ã æ¸ãã¦ãã㨠JUnit ã®è©±ã§ãã使ãå§ãããã¡ãã£ã¨ã ãè¸ã¿è¾¼ãã 辺ãã§ããããã¡ãã£ã¨ã ããªã®ã§æ®éã«ä½¿ã£ã¦ãæ¹ã«ã¯ä¸è¦ãªå 容ãã¨æãã¾ããç§ã®ä»æã£ã¦ãç¥èãæ¸ãæ®´ã£ã¦ã¿ãæãã«ãªãã¾ããããå¾®å¦ãªç解ã¨æ®å¿µãªæç« åã®ç¸ä¹å¹æã§ã°ãã°ãã«ãªã£ã¦ã¾ãããå¯ããã ããã å 容㯠Assertion->ã«ã¹ã¿ã AssertionãMatcher->ã«ã¹ã¿ã MatcherãRule->ã«ã¹ã¿ã Rule ã§ãã Assertion JUnit㯠assert ããã£ã¦ããã§ããã¾ã org.junit.Assert ã«ãã馴æã¿æ·±ã assert ã並ã¹ã¦ã¿ã¾ãã assertEquals
使ãåæã®ããã¢ãã¯ã©ã¤ãã©ãª Mockito Posted in Java (RSS) Java åãã®ã¢ãã¯ã©ã¤ãã©ãªã¨ãã¦ã¯ ãjMockã ã ãEasyMockã ãæåã§ããããMockitoã ã¨ããã¢ãã¯ã©ã¤ãã©ãªã®æ¹ã使ãåæãããã¿ããã§ãã é¢é£æ å ± ã»ããã¦ãã¼ãã·ã³ãã«&ã¿ã¤ãã»ã¼ããªJavaç¨ã¢ãã¯ã©ã¤ãã©ãª"Mockito"ã®é å | ãã¤ã³ãã¸ã£ã¼ãã« ã»InfoQ: Javaã¨Flexã®ä¸¡æ¹ã§ä½¿ããã¢ãã¯ãã¬ã¼ã ã¯ã¼ã¯ ã»Mockitoãã¹ã¹ã¡ - Fly me to the Indigo! ã»åä½ãã¹ããâç¥éâåããQuick JUnitã¨Mockito - ï¼ IT ã»Javaéçºç°å¢ï¼ã¦ããããã¹ãç·¨ï¼ - torutkã®æ¥è¨ ã»Javaéçºç°å¢ï¼ã¦ããããã¹ãç·¨ï¼ï¼ç¶ï¼ - torutkã®æ¥è¨ ã»å¿å°è¯ãããã¢ãã¯ã©ã¤ãã©ãª Mockitoãï½ãã®
IOException ã® catch ã«ä½ãæ¸ãã¦ãããåããã¾ããï¼ï¼ï¼ ã¯ããã« é çªãåå¾ãã¾ãããä»å㯠Java ã®ç¹å¾´ã®ã²ã¨ã¤ã§ããä¾å¤æ©æ§ã«ã¤ãã¦ã§ãã ä»åã®ç¯å² 223 ãã¼ã¸ ã 250 ãã¼ã¸ ååã¯ãã¡ã Effective Java èªæ¸ä¼ 12 æ¥ç® ãã¹ã¬ããã»ã»ã¼ãã£ã¦ãªã«ãï¼ï¼ã - ITæ¦è¨ Java ã®ä¾å¤ throw å¯è½ãªãªãã¸ã§ã¯ã Throwable ã¤ã³ã¿ãã§ã¼ã¹ãå®è£ ãããã® Exception ãç¶æ¿ããªã Throwable ã¯åºæ¬çã«ä½¿ããªã ãã§ãã¯ä¾å¤ ã¡ã½ããã®å®è£ è ããå¼ã³åºãå ãå復å¯è½ãã ã¨èãã¦ããä¾å¤ ã¡ããã¨ããªããä¾å¤ã ã£ãã®ããçç±ãæä¾ãããã¹ã å¼ã³åºãå 㯠try catch ã§å²ãã throws 宣è¨ãæ¸ãå¿ è¦ããã Exception ãç¶æ¿ãã¦ã㦠RuntimeException ãç¶æ¿ãã¦ããª
ã¹ã¬ããã»ã¼ããã¹ã¬ããã»ã¼ãã£ã¦ä½ãªã®ãï¼æ¬å½ã®æ°æã¡èããã¦ãï¼ ã¯ããã« çæ§ãã²ããã¶ãã§ãã ä¹ ãã¶ãã« Effective Java èªæ¸ä¼ã®ã¾ã¨ããä¸ãã¦ããããã¨æãã¾ãï¼ï¼ï¼ ä»åã®ç¯å² 269 ãã¼ã¸ ã 278 ãã¼ã¸ ååã¯ãã¡ã http://d.hatena.ne.jp/amachang/20100309/1268153192 synchronized ãä»ããã°ã¹ã¬ããã»ã»ã¼ãã£ã¦ããã§ã¯ãªã synchronized ã¯ã¹ã¬ããã»ã»ã¼ããå®ç¾ããããã®ä¸ã¤ã®æ¹æ³ï¼å®è£ ã®è©³ç´°ï¼ã§ãã£ã¦ã synchronized ã使ã£ã¦ããããã¹ã¬ããã»ã»ã¼ãã¨ããããã§ã¯ãªããã synchronized ã使ã£ã¦ããªãããã¹ã¬ããã»ã»ã¼ããããªãã¨ããããã§ã¯ãªã ãããããã¹ã¬ããã»ã»ã¼ãã¨ã¯ä½ã ãã®ã¯ã©ã¹ã®ã¤ã³ã¹ã¿ã³ã¹ã«å¯¾ããã©ããªé çªã§è¡ãããæä½ãä»æ§çã«æ£ã
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}