This file contains hidden or 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
<bean id="dataSource" class="org.springframework.jdbc.datasource.SimpleDriverDataSource"> | |
<property name="driverClass" value="com.mysql.jdbc.Driver" /> | |
<property name="url" value="jdbc:mysql://yourdomain/database" /> | |
<property name="username" value="*****" /> | |
<property name="password" value="*****" /> | |
</bean> |
This file contains hidden or 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 java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.List; | |
public class Sort { | |
public static void main(String[] args) { | |
// 배열 |
This file contains hidden or 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
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> | |
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" /> | |
<property name="url" value="jdbc:oracle:thin:@oracle.yourdomain:port:serviceName" /> | |
<property name="username" value="*****" /> | |
<property name="password" value="*****" /> | |
</bean> |
This file contains hidden or 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
<script type="text/javascript"> | |
function enterEvent(e) { | |
if (13 == e.keyCode) { | |
return true; | |
} else { | |
return false; | |
} | |
} | |
</script> | |
<input type="text" name="" id="" onKeypress="enterEvent(event);" /> |
This file contains hidden or 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
<insert id="insertBoard" parameterClass="BoardBean"> | |
insert into board ( | |
board_title | |
, board_content | |
) values ( | |
#boardTitle# | |
, #boardContent# | |
) | |
<selectKey keyProperty="boardSeq" resultClass="int"> | |
select last_insert_id() |
This file contains hidden or 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
// list | |
<c:choose> | |
<c:when test="${empty data}"> | |
<!-- data is empty --> | |
</c:when> | |
<c:otherwise> | |
<c:forEach var="dt" items="${data}" varStatus="status"> | |
<c:out value="${dt.name}" /> | |
</c:forEach> | |
</c:otherwise> |
This file contains hidden or 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 javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
import org.springframework.web.servlet.ModelAndView; | |
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; | |
public class SessionInterceptor extends HandlerInterceptorAdapter { | |
@Override | |
public void afterCompletion(HttpServletRequest request, |
This file contains hidden or 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
<!-- interceptor --> | |
<mvc:interceptors> | |
<mvc:interceptor> | |
<mvc:mapping path="/*****/*Write*" /> | |
<bean class="*****.SessionInterceptor" /> | |
</mvc:interceptor> | |
</mvc:interceptors> | |
<!-- multi mapping --> | |
<mvc:interceptors> |
This file contains hidden or 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
<img src="/image/aa.jpg" id="banner" /> |
This file contains hidden or 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 java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.net.URL; | |
import java.net.URLConnection; | |
public class URLConnectionExam { | |
public static void main(String[] args) { | |
String inputLine = ""; | |
try { |
OlderNewer