{"id":130,"date":"2014-06-23T07:39:30","date_gmt":"2014-06-23T16:39:30","guid":{"rendered":"http:\/\/blog.box.kr\/?p=130"},"modified":"2014-06-23T07:39:30","modified_gmt":"2014-06-23T16:39:30","slug":"simple-spring-quartz-web-app-with-maven-and-eclipse","status":"publish","type":"post","link":"https:\/\/blog.box.kr\/?p=130","title":{"rendered":"Simple Spring Quartz Web App with Maven and Eclipse"},"content":{"rendered":"<h3 class=\"post-title entry-title\" style=\"color: #000000;\">Simple Spring Quartz Web App with Maven and Eclipse<\/h3>\n<div class=\"post-header\" style=\"color: #000000;\">\n<\/div>\n<div id=\"post-body-1432632047768188131\" class=\"post-body entry-content\" style=\"color: #000000;\">\n<b>1. Create a Maven Web App project with Eclipse<\/b><\/p>\n<p>File -&gt; New -&gt; Project -&gt; Other -&gt; Maven Project -&gt;<\/p>\n<div class=\"separator\"><a style=\"color: #4a4a4a;\" href=\"https:\/\/i0.wp.com\/2.bp.blogspot.com\/-jQPX5aFgXCI\/UEz7N6HbfRI\/AAAAAAAAAIk\/rRh1qFCkcJk\/s1600\/1-MavenProj.PNG\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone\" src=\"https:\/\/i0.wp.com\/2.bp.blogspot.com\/-jQPX5aFgXCI\/UEz7N6HbfRI\/AAAAAAAAAIk\/rRh1qFCkcJk\/s320\/1-MavenProj.PNG?resize=320%2C301\" alt=\"\" width=\"320\" height=\"301\" border=\"0\" data-recalc-dims=\"1\" \/><\/a>\n<\/div>\n<p>Next -&gt; Next -&gt;<\/p>\n<p>You should be at the Select Archtype Screen.<\/p>\n<div class=\"separator\"><a style=\"color: #4a4a4a;\" href=\"https:\/\/i0.wp.com\/4.bp.blogspot.com\/-dOpU54BxRWM\/UEz7Tq2uHQI\/AAAAAAAAAIs\/KyrEOmBF070\/s1600\/2-MavenArch.PNG\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/i0.wp.com\/4.bp.blogspot.com\/-dOpU54BxRWM\/UEz7Tq2uHQI\/AAAAAAAAAIs\/KyrEOmBF070\/s320\/2-MavenArch.PNG?resize=320%2C259\" alt=\"\" width=\"320\" height=\"259\" border=\"0\" data-recalc-dims=\"1\" \/><\/a>\n<\/div>\n<p>Type &#8220;webapp&#8221; (without the quotes) in the &#8220;filter&#8221; textbox.<br \/>\nSelect the archtype with group Id: org.apache.maven.archtypes<br \/>\nand artifact id: maven-archtype-webapp.<\/p>\n<p>Next -&gt; Type whatever floats your boat for you Group Id and Artifact Id on the next screen:<\/p>\n<div class=\"separator\"><a style=\"color: #4a4a4a;\" href=\"https:\/\/i0.wp.com\/2.bp.blogspot.com\/-cZC1GgVzz6k\/UEz7m_w_F8I\/AAAAAAAAAI0\/XkVuGF78hhc\/s1600\/3-MavenGroup.PNG\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/i0.wp.com\/2.bp.blogspot.com\/-cZC1GgVzz6k\/UEz7m_w_F8I\/AAAAAAAAAI0\/XkVuGF78hhc\/s320\/3-MavenGroup.PNG?resize=320%2C255\" alt=\"\" width=\"320\" height=\"255\" border=\"0\" data-recalc-dims=\"1\" \/><\/a>\n<\/div>\n<p>-&gt; Finish<\/p>\n<p><b>2. Add needed dependencies to pom.xml.\u00a0<\/b><\/p>\n<div class=\"separator\"><a style=\"color: #4a4a4a;\" href=\"https:\/\/i0.wp.com\/2.bp.blogspot.com\/-nwSRXLdjfEQ\/UEz7xaWFpQI\/AAAAAAAAAI8\/TPhN2Xcymuk\/s1600\/4-pom.PNG\"><img decoding=\"async\" src=\"https:\/\/i0.wp.com\/2.bp.blogspot.com\/-nwSRXLdjfEQ\/UEz7xaWFpQI\/AAAAAAAAAI8\/TPhN2Xcymuk\/s1600\/4-pom.PNG?w=623\" alt=\"\" border=\"0\" data-recalc-dims=\"1\" \/><\/a>\n<\/div>\n<p>You are going to need all the listed\u00a0dependencies, here is my pom:<\/p>\n<p>&lt;project xmlns=&#8221;http:\/\/maven.apache.org\/POM\/4.0.0&#8243; xmlns:xsi=&#8221;http:\/\/www.w3.org\/2001\/XMLSchema-instance&#8221;<br \/>\nxsi:schemaLocation=&#8221;http:\/\/maven.apache.org\/POM\/4.0.0 http:\/\/maven.apache.org\/maven-v4_0_0.xsd&#8221;&gt;<br \/>\n&lt;modelVersion&gt;4.0.0&lt;\/modelVersion&gt;<br \/>\n&lt;groupId&gt;boyko&lt;\/groupId&gt;<br \/>\n&lt;artifactId&gt;batch-example&lt;\/artifactId&gt;<br \/>\n&lt;packaging&gt;war&lt;\/packaging&gt;<br \/>\n&lt;version&gt;0.0.1-SNAPSHOT&lt;\/version&gt;<br \/>\n&lt;name&gt;batch-example Maven Webapp&lt;\/name&gt;<br \/>\n&lt;url&gt;http:\/\/maven.apache.org&lt;\/url&gt;<br \/>\n&lt;dependencies&gt;<br \/>\n&lt;dependency&gt;<br \/>\n&lt;groupId&gt;org.opensymphony.quartz&lt;\/groupId&gt;<br \/>\n&lt;artifactId&gt;quartz&lt;\/artifactId&gt;<br \/>\n&lt;version&gt;1.6.1&lt;\/version&gt;<br \/>\n&lt;\/dependency&gt;<br \/>\n&lt;dependency&gt;<br \/>\n&lt;groupId&gt;org.springframework&lt;\/groupId&gt;<br \/>\n&lt;artifactId&gt;spring-context&lt;\/artifactId&gt;<br \/>\n&lt;version&gt;3.1.1.RELEASE&lt;\/version&gt;<br \/>\n&lt;\/dependency&gt;<br \/>\n&lt;dependency&gt;<br \/>\n&lt;groupId&gt;org.springframework&lt;\/groupId&gt;<br \/>\n&lt;artifactId&gt;spring-context-support&lt;\/artifactId&gt;<br \/>\n&lt;version&gt;3.1.1.RELEASE&lt;\/version&gt;<br \/>\n&lt;\/dependency&gt;<br \/>\n&lt;dependency&gt;<br \/>\n&lt;groupId&gt;org.springframework&lt;\/groupId&gt;<br \/>\n&lt;artifactId&gt;spring-web&lt;\/artifactId&gt;<br \/>\n&lt;version&gt;3.1.1.RELEASE&lt;\/version&gt;<br \/>\n&lt;\/dependency&gt;<br \/>\n&lt;dependency&gt;<br \/>\n&lt;groupId&gt;org.springframework&lt;\/groupId&gt;<br \/>\n&lt;artifactId&gt;spring-tx&lt;\/artifactId&gt;<br \/>\n&lt;version&gt;3.1.1.RELEASE&lt;\/version&gt;<br \/>\n&lt;\/dependency&gt;<br \/>\n&lt;dependency&gt;<br \/>\n&lt;groupId&gt;commons-collections&lt;\/groupId&gt;<br \/>\n&lt;artifactId&gt;commons-collections&lt;\/artifactId&gt;<br \/>\n&lt;version&gt;3.2.1&lt;\/version&gt;<br \/>\n&lt;\/dependency&gt;<br \/>\n&lt;\/dependencies&gt;<br \/>\n&lt;build&gt;<br \/>\n&lt;finalName&gt;batch-example&lt;\/finalName&gt;<br \/>\n&lt;\/build&gt;<br \/>\n&lt;\/project&gt;<\/p>\n<p><b>3. Add Spring to your web app.<\/b><\/p>\n<p>Add Spring&#8217;s ContextLoaderListener and the contextConfigLocation to web.xml.<\/p>\n<div class=\"separator\"><a style=\"color: #4a4a4a;\" href=\"https:\/\/i0.wp.com\/4.bp.blogspot.com\/-7NbA1h3IFtY\/UEz8OLV8kHI\/AAAAAAAAAJE\/CoGcK-LWccQ\/s1600\/5-web-xml.PNG\"><img decoding=\"async\" src=\"https:\/\/i0.wp.com\/4.bp.blogspot.com\/-7NbA1h3IFtY\/UEz8OLV8kHI\/AAAAAAAAAJE\/CoGcK-LWccQ\/s1600\/5-web-xml.PNG?w=623\" alt=\"\" border=\"0\" data-recalc-dims=\"1\" \/><\/a>\n<\/div>\n<p>This is my web.xml:<\/p>\n<p>&lt;!DOCTYPE web-app PUBLIC<br \/>\n&#8220;-\/\/Sun Microsystems, Inc.\/\/DTD Web Application 2.3\/\/EN&#8221;<br \/>\n&#8220;http:\/\/java.sun.com\/dtd\/web-app_2_3.dtd&#8221; &gt;<\/p>\n<p>&lt;web-app&gt;<br \/>\n&lt;display-name&gt;Archetype Created Web Application&lt;\/display-name&gt;<\/p>\n<p>&lt;context-param&gt;<br \/>\n&lt;param-name&gt;contextConfigLocation&lt;\/param-name&gt;<br \/>\n&lt;param-value&gt;classpath:applicationContext.xml&lt;\/param-value&gt;<br \/>\n&lt;\/context-param&gt;<\/p>\n<p>&lt;listener&gt;<br \/>\n&lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;\/listener-class&gt;<br \/>\n&lt;\/listener&gt;<\/p>\n<p>&lt;\/web-app&gt;<\/p>\n<p><b>4. Create applicationContext.xml under src\/main\/resources<\/b><\/p>\n<p>Right click on the project -&gt; New -&gt; Other -&gt; XML file<\/p>\n<div class=\"separator\"><a style=\"color: #4a4a4a;\" href=\"https:\/\/i0.wp.com\/4.bp.blogspot.com\/-Qj9hfDXUxPs\/UEz9NvPdJuI\/AAAAAAAAAJM\/w6V4yTUc3hQ\/s1600\/6-appContext.PNG\"><img decoding=\"async\" src=\"https:\/\/i0.wp.com\/4.bp.blogspot.com\/-Qj9hfDXUxPs\/UEz9NvPdJuI\/AAAAAAAAAJM\/w6V4yTUc3hQ\/s1600\/6-appContext.PNG?w=623\" alt=\"\" border=\"0\" data-recalc-dims=\"1\" \/><\/a>\n<\/div>\n<p><b>5. Create src\/main\/java source folder<\/b><\/p>\n<p>Right click on the project -&gt; New -&gt; Other -&gt; Source Folder<\/p>\n<p><b>6. Create the job<\/b><\/p>\n<p>Create a package under src\/main\/java<\/p>\n<p>Create a class that would be your Spring Batch job.<\/p>\n<div class=\"separator\"><a style=\"color: #4a4a4a;\" href=\"https:\/\/i0.wp.com\/2.bp.blogspot.com\/-Tv3I9tW7ftw\/UEz9i7j0gFI\/AAAAAAAAAJU\/jUxefm6DhzI\/s1600\/7-Job.PNG\"><img decoding=\"async\" src=\"https:\/\/i0.wp.com\/2.bp.blogspot.com\/-Tv3I9tW7ftw\/UEz9i7j0gFI\/AAAAAAAAAJU\/jUxefm6DhzI\/s1600\/7-Job.PNG?w=623\" alt=\"\" border=\"0\" data-recalc-dims=\"1\" \/><\/a>\n<\/div>\n<p>Here is what mine looks like:<\/p>\n<p>package boyko;<\/p>\n<p>import java.text.DateFormat;<br \/>\nimport java.text.SimpleDateFormat;<\/p>\n<p>public class SampleJob {<\/p>\n<p>public void sampleJobMethod() {<\/p>\n<p>DateFormat dateFormat = new SimpleDateFormat(&#8220;dd\/MM\/yyyy hh:mm:ss&#8221;);<\/p>\n<p>System.out.println(&#8220;Invoked on &#8221; + dateFormat.format(System.currentTimeMillis()));<br \/>\n}<br \/>\n}<\/p>\n<p><b>7. Add all needed configuration in applicationContext.xml<\/b><\/p>\n<p>The final version of my specific applicationContext.xml is at the end of this section, but here are the additions step-by-step<\/p>\n<p><b>7.1. Add the Job<\/b><\/p>\n<p>&lt;bean id=&#8221;sampleJob&#8221; class=&#8221;boyko.SampleJob&#8221; \/&gt;<\/p>\n<p><b>7.2. Create a Job Spring Quartz Bean and associate it with the Job and the Job method<\/b><\/p>\n<p>&lt;bean id=&#8221;sampleJobBean&#8221;<br \/>\nclass=&#8221;org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean&#8221;&gt;<br \/>\n&lt;property name=&#8221;targetObject&#8221; ref=&#8221;sampleJob&#8221; \/&gt;<br \/>\n&lt;property name=&#8221;targetMethod&#8221; value=&#8221;sampleJobMethod&#8221; \/&gt;<br \/>\n&lt;\/bean&gt;<\/p>\n<p><b>7.3. Create a trigger<\/b><\/p>\n<p>&lt;bean id=&#8221;sampleJobTrigger&#8221; class=&#8221;org.springframework.scheduling.quartz.SimpleTriggerBean&#8221;&gt;<br \/>\n&lt;property name=&#8221;jobDetail&#8221; ref=&#8221;sampleJobBean&#8221; \/&gt;<br \/>\n&lt;property name=&#8221;repeatInterval&#8221; value=&#8221;10000&#8243; \/&gt;<br \/>\n&lt;property name=&#8221;startDelay&#8221; value=&#8221;3000&#8243; \/&gt;<br \/>\n&lt;\/bean&gt;<\/p>\n<p><b>7.4. Create a scheduler and associate it with the Job Bean and the Trigger<\/b><\/p>\n<p>&lt;bean class=&#8221;org.springframework.scheduling.quartz.SchedulerFactoryBean&#8221;&gt;<br \/>\n&lt;property name=&#8221;jobDetails&#8221;&gt;<br \/>\n&lt;list&gt;<br \/>\n&lt;ref bean=&#8221;sampleJobBean&#8221; \/&gt;<br \/>\n&lt;\/list&gt;<br \/>\n&lt;\/property&gt;<br \/>\n&lt;property name=&#8221;triggers&#8221;&gt;<br \/>\n&lt;list&gt;<br \/>\n&lt;ref bean=&#8221;sampleJobTrigger&#8221; \/&gt;<br \/>\n&lt;\/list&gt;<br \/>\n&lt;\/property&gt;<br \/>\n&lt;\/bean&gt;<\/p>\n<p><span style=\"text-decoration: underline;\">The numbers in trigger mean that the job will run for first time 3 seconds after app starts, then it will run every 10 seconds.<\/span><\/p>\n<p>Here is the entire applicationContext.xml:<\/p>\n<p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt;<br \/>\n&lt;beans xmlns=&#8221;http:\/\/www.springframework.org\/schema\/beans&#8221;<br \/>\nxmlns:xsi=&#8221;http:\/\/www.w3.org\/2001\/XMLSchema-instance&#8221;<br \/>\nxsi:schemaLocation=&#8221;http:\/\/www.springframework.org\/schema\/beans http:\/\/www.springframework.org\/schema\/beans\/spring-beans-3.1.xsd&#8221;&gt;<\/p>\n<p>&lt;bean id=&#8221;sampleJob&#8221; class=&#8221;boyko.SampleJob&#8221; \/&gt;<\/p>\n<p>&lt;bean id=&#8221;sampleJobBean&#8221;<br \/>\nclass=&#8221;org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean&#8221;&gt;<br \/>\n&lt;property name=&#8221;targetObject&#8221; ref=&#8221;sampleJob&#8221; \/&gt;<br \/>\n&lt;property name=&#8221;targetMethod&#8221; value=&#8221;sampleJobMethod&#8221; \/&gt;<br \/>\n&lt;\/bean&gt;<\/p>\n<p>&lt;bean id=&#8221;sampleJobTrigger&#8221; class=&#8221;org.springframework.scheduling.quartz.SimpleTriggerBean&#8221;&gt;<br \/>\n&lt;property name=&#8221;jobDetail&#8221; ref=&#8221;sampleJobBean&#8221; \/&gt;<br \/>\n&lt;property name=&#8221;repeatInterval&#8221; value=&#8221;10000&#8243; \/&gt;<br \/>\n&lt;property name=&#8221;startDelay&#8221; value=&#8221;3000&#8243; \/&gt;<br \/>\n&lt;\/bean&gt;<\/p>\n<p>&lt;bean class=&#8221;org.springframework.scheduling.quartz.SchedulerFactoryBean&#8221;&gt;<br \/>\n&lt;property name=&#8221;jobDetails&#8221;&gt;<br \/>\n&lt;list&gt;<br \/>\n&lt;ref bean=&#8221;sampleJobBean&#8221; \/&gt;<br \/>\n&lt;\/list&gt;<br \/>\n&lt;\/property&gt;<br \/>\n&lt;property name=&#8221;triggers&#8221;&gt;<br \/>\n&lt;list&gt;<br \/>\n&lt;ref bean=&#8221;sampleJobTrigger&#8221; \/&gt;<br \/>\n&lt;\/list&gt;<br \/>\n&lt;\/property&gt;<br \/>\n&lt;\/bean&gt;<\/p>\n<p>&lt;\/beans&gt;<\/p>\n<p>That should be that.<\/p>\n<p>Run it on whatever server you prefer( I run on Tomcat 7 &#8211; right click on project -&gt; Run On Server -&gt; Tomcat 7) and you should see the sysouts in the console:<\/p>\n<div class=\"separator\">\n<\/div>\n<div class=\"separator\"><a style=\"color: #4a4a4a;\" href=\"https:\/\/i0.wp.com\/2.bp.blogspot.com\/-u_zqjmZPXzw\/UE0EdivxfCI\/AAAAAAAAAJs\/SBInURaW7gk\/s1600\/8-console.PNG\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/i0.wp.com\/2.bp.blogspot.com\/-u_zqjmZPXzw\/UE0EdivxfCI\/AAAAAAAAAJs\/SBInURaW7gk\/s320\/8-console.PNG?resize=218%2C320\" alt=\"\" width=\"218\" height=\"320\" border=\"0\" data-recalc-dims=\"1\" \/><\/a>\n<\/div>\n<p>Attached is the sample. You could import it as an eclipse project after you unzip it and give a try on your own.<\/p>\n<p><span class=\"Apple-tab-span\"><a style=\"color: #4a4a4a;\" href=\"https:\/\/sites.google.com\/site\/boykofiles\/boyko-spring-batch-example.zip\">boyko-spring-batch-example<\/a> <\/span><\/p>\n<p><span class=\"Apple-tab-span\">And here is an identical example which uses Cron Trigger and JobDetailBean:<\/span><br \/>\n<span class=\"Apple-tab-span\"><br \/>\n<\/span><span class=\"Apple-tab-span\"><a style=\"color: #4a4a4a;\" href=\"https:\/\/sites.google.com\/site\/boykofiles\/boyko-spring-batch-cron-example.zip\">boyko-cron-jobDetailBean-example<\/a><\/span><\/p>\n<p>Update:12-11-2013: There&#8217;s a better way to do a scheduled job these days. Use the\u00a0<a style=\"color: #4a4a4a;\" href=\"http:\/\/boyko11.blogspot.com\/2013\/12\/java-web-app-with-spring-annotations.html\">@Scheduled annotation<\/a>.\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Simple Spring Quartz Web App with Maven and Eclipse 1. Create a Maven Web App project with Eclipse File -&gt; New -&gt; Project -&gt; Other -&gt; Maven Project -&gt; Next -&gt; Next -&gt; You should be at the Select Archtype Screen. Type &#8220;webapp&#8221; (without the quotes) in the &#8220;filter&#8221; textbox. Select the archtype with group Id: org.apache.maven.archtypes and artifact id: maven-archtype-webapp. Next -&gt; Type whatever floats your boat for you Group Id and Artifact Id on the next screen: -&gt; Finish 2. Add needed dependencies to pom.xml.\u00a0 You are going to need all the listed\u00a0dependencies, here is my pom: &lt;project xmlns=&#8221;http:\/\/maven.apache.org\/POM\/4.0.0&#8243; xmlns:xsi=&#8221;http:\/\/www.w3.org\/2001\/XMLSchema-instance&#8221; xsi:schemaLocation=&#8221;http:\/\/maven.apache.org\/POM\/4.0.0 http:\/\/maven.apache.org\/maven-v4_0_0.xsd&#8221;&gt; &lt;modelVersion&gt;4.0.0&lt;\/modelVersion&gt; &lt;groupId&gt;boyko&lt;\/groupId&gt; &lt;artifactId&gt;batch-example&lt;\/artifactId&gt; &lt;packaging&gt;war&lt;\/packaging&gt; &lt;version&gt;0.0.1-SNAPSHOT&lt;\/version&gt; &lt;name&gt;batch-example Maven Webapp&lt;\/name&gt; &lt;url&gt;http:\/\/maven.apache.org&lt;\/url&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;org.opensymphony.quartz&lt;\/groupId&gt; &lt;artifactId&gt;quartz&lt;\/artifactId&gt; &lt;version&gt;1.6.1&lt;\/version&gt; &lt;\/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework&lt;\/groupId&gt; &lt;artifactId&gt;spring-context&lt;\/artifactId&gt; &lt;version&gt;3.1.1.RELEASE&lt;\/version&gt; &lt;\/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework&lt;\/groupId&gt; &lt;artifactId&gt;spring-context-support&lt;\/artifactId&gt; &lt;version&gt;3.1.1.RELEASE&lt;\/version&gt; &lt;\/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework&lt;\/groupId&gt; &lt;artifactId&gt;spring-web&lt;\/artifactId&gt; &lt;version&gt;3.1.1.RELEASE&lt;\/version&gt; &lt;\/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework&lt;\/groupId&gt; &lt;artifactId&gt;spring-tx&lt;\/artifactId&gt; &lt;version&gt;3.1.1.RELEASE&lt;\/version&gt; &lt;\/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;commons-collections&lt;\/groupId&gt; &lt;artifactId&gt;commons-collections&lt;\/artifactId&gt; &lt;version&gt;3.2.1&lt;\/version&gt; &lt;\/dependency&gt; &lt;\/dependencies&gt; &lt;build&gt; &lt;finalName&gt;batch-example&lt;\/finalName&gt; &lt;\/build&gt; &lt;\/project&gt; 3. Add Spring to your web app. Add Spring&#8217;s ContextLoaderListener and the contextConfigLocation to web.xml. This is my web.xml: &lt;!DOCTYPE web-app PUBLIC &#8220;-\/\/Sun Microsystems, Inc.\/\/DTD Web Application 2.3\/\/EN&#8221; &#8220;http:\/\/java.sun.com\/dtd\/web-app_2_3.dtd&#8221; &gt; &lt;web-app&gt; &lt;display-name&gt;Archetype Created Web Application&lt;\/display-name&gt; &lt;context-param&gt; &lt;param-name&gt;contextConfigLocation&lt;\/param-name&gt; &lt;param-value&gt;classpath:applicationContext.xml&lt;\/param-value&gt; &lt;\/context-param&gt; &lt;listener&gt; &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;\/listener-class&gt; &lt;\/listener&gt; &lt;\/web-app&gt; 4. Create applicationContext.xml under src\/main\/resources Right click on [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"ngg_post_thumbnail":0,"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[15,7],"tags":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5q9Zn-26","jetpack-related-posts":[{"id":122,"url":"https:\/\/blog.box.kr\/?p=122","url_meta":{"origin":130,"position":0},"title":"Maven\uc744 \ub118\uc5b4 Gradle\ub85c \uac00\uc790","date":"2014-06-23","format":false,"excerpt":"Maven\uc744 \ub118\uc5b4 Gradle\ub85c \uac00\uc790.\u00a0\ud504\ub85c\uadf8\ub798\ubc0d by\u00a0\uad8c\ub0a8 2012\/10\/14 21:33 kwon37xi.egloos.com\/4747016 \ub367\uae00\uc218 :\u00a029 Maven\uc744 \uc368 \ubcf8 \uc0ac\ub78c\ub4e4\uc740 \ub300\ubd80\ubd84 \ub290\ub07c\ub9ac\ub77c \uc0dd\uac01\ud558\uc9c0\ub9cc \ub9e4\uc6b0 \uacbd\uc9c1\ub3fc \uc788\uace0 \uadf8\ub85c\uc778\ud574 \ubb34\uc5b8\uac00 Maven\uc774 \uae30\ubcf8 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ube4c\ub4dc \uacfc\uc815\uc744 \ucd94\uac00\ud574\uc57c \ud560 \uacbd\uc6b0 \uace0\uc0dd\uc774 \uc774\ub9cc \uc800\ub9cc\uc774 \uc544\ub2c8\ub2e4. \uc774\uc5d0, \uc694\uc998 Maven \ub300\ud55c \ub300\uc548\uc774 \ub9ce\uc774 \ub098\uc624\uace0 \uc788\uc73c\uba70 \uadf8 \uc911 \uac00\uc7a5 \ub3cb\ubcf4\uc774\ub294 \uac83\uc774\u00a0Gradle(Groovy\u00a0\uae30\ubc18)\uc774 \uc544\ub2cc\uac00 \uc2f6\ub2e4.\u2026","rel":"","context":"In &quot;JAVA&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":722,"url":"https:\/\/blog.box.kr\/?p=722","url_meta":{"origin":130,"position":1},"title":"[\ud38c]Maven\uc744 \ub118\uc5b4 Gradle\ub85c \uac00\uc790.","date":"2015-04-15","format":false,"excerpt":"http:\/\/kwon37xi.egloos.com\/4747016 \u00a0 Maven\uc744 \uc368 \ubcf8 \uc0ac\ub78c\ub4e4\uc740 \ub300\ubd80\ubd84 \ub290\ub07c\ub9ac\ub77c \uc0dd\uac01\ud558\uc9c0\ub9cc \ub9e4\uc6b0 \uacbd\uc9c1\ub3fc \uc788\uace0 \uadf8\ub85c\uc778\ud574 \ubb34\uc5b8\uac00 Maven\uc774 \uae30\ubcf8 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ube4c\ub4dc \uacfc\uc815\uc744 \ucd94\uac00\ud574\uc57c \ud560 \uacbd\uc6b0 \uace0\uc0dd\uc774 \uc774\ub9cc \uc800\ub9cc\uc774 \uc544\ub2c8\ub2e4. \uc774\uc5d0, \uc694\uc998 Maven \ub300\ud55c \ub300\uc548\uc774 \ub9ce\uc774 \ub098\uc624\uace0 \uc788\uc73c\uba70 \uadf8 \uc911 \uac00\uc7a5 \ub3cb\ubcf4\uc774\ub294 \uac83\uc774 Gradle(Groovy \uae30\ubc18)\uc774 \uc544\ub2cc\uac00 \uc2f6\ub2e4. \uadf8\ub798\uc11c \ucc28\uae30 \ud504\ub85c\uc81d\ud2b8\uc758 \ube4c\ub4dc \ud234\ub85c Gradle\uc744\u2026","rel":"","context":"In &quot;JAVA&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":124,"url":"https:\/\/blog.box.kr\/?p=124","url_meta":{"origin":130,"position":2},"title":"Spring Framework + Akka Actor + Maven \uc0ac\uc6a9\ud558\uae30","date":"2014-06-23","format":false,"excerpt":"Spring Framework + Akka Actor + Maven \uc0ac\uc6a9\ud558\uae30 \uac1c\ubc1c \uc911\uc5d0 \uc694\uccad\uc5d0 \ub300\ud55c \ub85c\uadf8\ub97c \ub0a8\uae30\ub294 \ubd80\ubd84\uc774 \uc788\ub294\ub370 \ub85c\uac70\ub97c \uc0ac\uc6a9\ud558\uae30\uc5d0 \ubd80\uc871\ud55c \ubd80\ubd84\uc774 \uc788\uace0 async\ub85c \ucc98\ub9ac\ud574\uc57c \ud558\ub294 \ubd80\ubd84\uc774 \uc0dd\uaca8 akka actor\ub97c \uc0ac\uc6a9\ud558\uc5ec \uad6c\ud604\ud558\uac8c \ub418\uc5c8\ub2e4. akka.io \uc0ac\uc774\ud2b8\uc758 \uba54\ub274\uc5bc\uc744 \ud655\uc778\ud574\ubcf4\uba74.. Spring \uc5f0\uacc4 \uac1c\ubc1c\uc744\u00a01.3.1\uae4c\uc9c0\ub9cc \uc9c0\uc6d0\ud558\uace0 \uc788\uace0 \ub2e4\uc74c \ubc84\uc804\uc778\u00a02.0.5\uc5d0\uc11c\ub294 \uc544\uc9c1 \ub9c8\uc774\uadf8\ub808\uc774\uc158\uc774 \uc548\ub418\uc5c8\ub2e4\ub294 \uba54\uc138\uc9c0\uac00 \ub098\uc640 \uc788\ub2e4. \uc774\ubc88 \ud3ec\uc2a4\ud2b8\uc5d0\uc11c\ub294\u2026","rel":"","context":"In &quot;JAVA&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":367,"url":"https:\/\/blog.box.kr\/?p=367","url_meta":{"origin":130,"position":3},"title":"[\ud38c]Scala \uc2dc\uc791\ud558\uae30","date":"2014-09-15","format":false,"excerpt":"\u00a0 http:\/\/ppassa.wordpress.com\/2012\/02\/19\/getting_started_scala\/ Scala \uc2dc\uc791\ud558\uae30 \uc694\uc998 \ub4e4\uc5b4\uc11c\u00a0Scala\ub97c \uacf5\ubd80\ud558\uace0 \uc788\ub2e4. \uc544\uc9c1 \ub9ce\uc774 \ubd80\uc871\ud558\uc9c0\ub9cc, \uc9c0\uae08\uae4c\uc9c0 \ubc30\uc6b4 \uac83\ub4e4 \uae30\ub85d\ud574\ub450\uace0, \ub610 \ud639\uc2dc \uc870\uae08\uc774\ub77c\ub3c4 \ub3c4\uc6c0\uc774 \ub418\ub294 \ubd84\ub4e4\uc774 \uc788\uc744 \uc9c0 \ubab0\ub77c \uacf5\uc720\ud574\ubcf4\uace0\uc790 \ud55c\ub2e4. 1. \ub4e4\uc5b4\uac00\uba70 \ubb58 \ub610 \ubc30\uc6cc\uc57c \ud55c\ub2e8 \ub9d0\uc778\uac00? \uc774\ubbf8 C++, Java, Python, Ruby, JavaScript \ub4f1 \ub9ce\uc740 \ud504\ub85c\uadf8\ub798\ubc0d \uc5b8\uc5b4\ub4e4\uc774 \uc788\ub294\ub370, \uc65c \uc790\uafb8 \uc0c8\ub85c\uc6b4 \uc5b8\uc5b4\uac00 \ub098\uc624\uace0 \uc788\ub0d0?\u2026","rel":"","context":"In &quot;\ucc38\uace0\ub97c \uc704\ud55c \uc800\uc7a5\ubb3c&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":170,"url":"https:\/\/blog.box.kr\/?p=170","url_meta":{"origin":130,"position":4},"title":"[\uac1c\ubc1c\ud301] Spring + Quartz\uc5d0\uc11c \ud30c\ub77c\ubbf8\ud130\ub97c \uac00\uc838\uc624\ub294 \ubc29\ubc95","date":"2014-07-08","format":false,"excerpt":"\uc77c\uc804\uc5d0\u00a0\uc608\uc57d\uc791\uc5c5\uc744 \uc2e4\ud589\ud558\ub294 \uba87\uac00\uc9c0 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc0b4\ud3b4\ubd24\ub294\ub370\uc5ec.. Spring + Quartz\ub97c \uc774\uc6a9\ud560\ub54c \uc0ac\uc6a9\uc790 \ud30c\ub77c\ubbf8\ud130\ub97c Job \uc124\uc815\ud30c\uc77c\uc5d0 \ub4f1\ub85d\ud558\uace0 \uc2e4\ud589\uc2dc \uc774\ub97c \uac00\uc838\uc62c \uc218 \uc788\uc2b5\ub2c8\ub2e4.. \uba3c\uc800 Job \uc124\uc815\ud30c\uc77c\uc5d0 \uc544\ub798\uc640 \uac19\uc774 \uc0ac\uc6a9\uc790 \ud30c\ub77c\ubbf8\ud130\ub97c \ucd94\uac00\ud558\uace0 <bean id=\"MyJob\" class=\"org.springframework.scheduling.quartz.JobDetailBean\"> <property name=\"jobClass\" value=\"net.openintegration.sample.scheduling.MySpringQuartzJob\" \/> <property name=\"jobDataAsMap\"> <map> \u00a0\u00a0\u00a0<entry key=\"timeout\" value=\"5\" \/> \u00a0\u00a0\u00a0<!--entry key=\"timeout\"><value>5<\/value><\/entry--> <\/map> <\/property> <\/bean> \uc544\ub798\uc640 \uac19\uc774 \ubd88\ub7ec\uc624\uba74\u2026","rel":"","context":"In &quot;JAVA&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":273,"url":"https:\/\/blog.box.kr\/?p=273","url_meta":{"origin":130,"position":5},"title":"ECLPISE\uac00 \uc774\uc0c1 \ub3d9\uc791 \ud560\ub54c","date":"2014-08-03","format":false,"excerpt":"ECLIPSE\uac00 Control + Click \ub3c4 \uc548\uba39\uace0.. Debug\uc2dc\uc5d0 Watching\ub3c4 \uc548\ub420 \ub54c\ub294 jdk \ud658\uacbd \uc124\uc815\uc774 \ubb38\uc81c \uc788\uc744 \uacbd\uc6b0 \uadf8\ub7f4 \uc218 \uc788\ub2e4. \ud574\ub2f9 \ud504\ub85c\uc81d\ud2b8 \uc18d\uc131\uc5d0\uc11c java compile \ubd80\ubd84\uc5d0 jdk \uc14b\ud305 \ubd80\ubd84\uc744 \ubcf4\uba74 \ub41c\ub2e4. \u00a0 \ub610\ub294 debug\uc2dc\uc5d0 \uc11c\ubc84 \ud658\uacbd\uc5d0 \uc624\ub978\ucabd \ubc84\ud2bc\uc744 \ub20c\ub974\uba74. source lookup \uc774\ub77c\ub294 \ubd80\ubd84\uc774 \uc788\ub294\ub370 \uc5ec\uae30\uc5d0 \ud574\ub2f9 \ub514\ubc84\uae45 \uc18c\uc2a4 path\ub97c \uc7a1\uc544 \uc8fc\uba74\u2026","rel":"","context":"In &quot;JAVA&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/posts\/130"}],"collection":[{"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.box.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=130"}],"version-history":[{"count":0,"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/posts\/130\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.box.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.box.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=130"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.box.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}