869 pom.xml

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -17,9 +17,17 @@
<!-- ============================================================= -->
<!-- Properties -->
<!-- ============================================================= -->
<context:property-placeholder location="classpath*:*.properties" />
<util:properties id="envProps" location="classpath:environment.properties"/>

<bean id="appProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="locations">
<list>
<value>classpath:/config.xml</value> <!-- 기본 설정값 -->
<value>classpath:/environment-config.xml</value> <!-- 빌드 환경에 따른 설정값 -->
</list>
</property>
<property name="ignoreResourceNotFound" value="true"/>
<property name="localOverride" value="true"/>
</bean>

<!-- ============================================================= -->
<!-- AOP -->
<!-- ============================================================= -->
@@ -37,18 +45,12 @@
<!-- DataAccess -->
<!-- ============================================================= -->
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
p:driverClass="${db.driver}" p:jdbcUrl="${db.url}" p:user="${db.username}"
p:password="${db.password}" />

<!-- ============================================================= -->
<!-- Transaction -->
<!-- ============================================================= -->
<tx:annotation-driven />

<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager"
p:sessionFactory-ref="sessionFactory" />

p:driverClass="#{appProperties['db.driver']}"
p:jdbcUrl="#{appProperties['db.url']}"
p:user="#{appProperties['db.username']}"
p:password="#{appProperties['db.password']}"
destroy-method="close" />

<!-- ============================================================= -->
<!-- Hibernate -->
<!-- ============================================================= -->
@@ -58,17 +60,27 @@
<property name="packagesToScan" value="springsprout.domain" />
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">${hibernate.dialect}</prop>
<prop key="hibernate.show_sql">${hibernate.show.sql}</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
<prop key="hibernate.generate_statistics">true</prop>
<prop key="hibernate.cache.use_second_level_cache">true</prop>
<prop key="hibernate.cache.use_query_cache">true</prop>
<prop key="hibernate.cache.provider_class">net.sf.ehcache.hibernate.EhCacheProvider</prop>
<prop key="hibernate.dialect">#{appProperties['hibernate.dialect']}</prop>
<prop key="hibernate.show_sql">#{appProperties['hibernate.show_sql']}</prop>
<prop key="hibernate.format_sql">#{appProperties['hibernate.format_sql']}</prop>
<prop key="hibernate.hbm2ddl.auto">#{appProperties['hibernate.hbm2ddl.auto']}</prop>
<prop key="hibernate.generate_statistics">#{appProperties['hibernate.generate_statistics']}</prop>
<prop key="hibernate.cache.use_second_level_cache">#{appProperties['hibernate.cache.use_second_level_cache']}</prop>
<prop key="hibernate.cache.use_query_cache">#{appProperties['hibernate.cache.use_query_cache']}</prop>
<prop key="hibernate.cache.provider_class">#{appProperties['hibernate.cache.provider_class']}</prop>
</props>
</property>
</bean>

</bean>

<!-- ============================================================= -->
<!-- Transaction -->
<!-- ============================================================= -->
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager"
p:sessionFactory-ref="sessionFactory" />

<tx:annotation-driven />

<!-- ============================================================= -->
<!-- Email -->
<!-- ============================================================= -->
@@ -78,8 +90,8 @@

<bean id="mainMailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
<property name="host" value="mail.springsprout.org" />
<property name="username" value="${mail.username}" />
<property name="password" value="${mail.password}" />
<property name="username" value="#{appProperties['mail.username']}" />
<property name="password" value="#{appProperties['mail.password']}" />
<property name="protocol" value="smtp" />
<property name="port" value="25" />
</bean>
@@ -88,9 +100,9 @@
<!-- Messanger -->
<!-- ============================================================= -->
<bean id="jabberService" class="springsprout.service.notification.jabber.JabberService">
<constructor-arg name="username" value="${gmail.username}"/>
<constructor-arg name="password" value="${gmail.password}"/>
<constructor-arg name="runOnStart" value="${jabber.runOnStart}"/>
<constructor-arg name="username" value="#{appProperties['gmail.username']}"/>
<constructor-arg name="password" value="#{appProperties['gmail.password']}"/>
<constructor-arg name="runOnStart" value="#{appProperties['jabber.runOnStart']}"/>
</bean>

<bean id="gTalkConfiguration" class="org.jivesoftware.smack.ConnectionConfiguration">
@@ -119,17 +131,17 @@
</bean>

<bean id="mainTwitter" class="twitter4j.Twitter">
<constructor-arg name="screenName" value="${twitter.username}" />
<constructor-arg name="password" value="${twitter.password}" />
<constructor-arg name="screenName" value="#{appProperties['twitter.username']}" />
<constructor-arg name="password" value="#{appProperties['twitter.password']}" />
</bean>

<bean id="devTermTwitterService" class="springsprout.service.notification.twitter.TwitterService">
<constructor-arg ref="devTermTwitter"/>
</bean>

<bean id="devTermTwitter" class="twitter4j.Twitter">
<constructor-arg name="screenName" value="${devterm.twitter.username}" />
<constructor-arg name="password" value="${devterm.twitter.password}" />
<constructor-arg name="screenName" value="#{appProperties['devterm.twitter.username']}" />
<constructor-arg name="password" value="#{appProperties['devterm.twitter.password']}" />
</bean>

<!-- ============================================================= -->
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties version="1.0">

<comment>애플리케이션 설정</comment>

</properties>
File renamed without changes.

This file was deleted.

This file was deleted.

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%d{HH:mm} %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>

<logger name="springsprout" level="DEBUG"/>
<logger name="org.springframework" level="INFO"/>
<logger name="org.springframework.security" level="INFO"/>
<logger name="org.hibernate" level="INFO"/>

<root level="WARN">
<appender-ref ref="STDOUT" />
</root>

</configuration>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:c="http://www.springframework.org/schema/c"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

<bean class="springsprout.service.init.DefaultRoleSetupService"
init-method="setup" />

</beans>
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties version="1.0">

<comment>애플리케이션 로컬 설정</comment>

<entry key="vertx.chat">http://localhost:8888/chat</entry>
<entry key="url">http://localhost:8080/</entry>
<entry key="mail.username">s2ctester@gmail.com</entry>
<entry key="mail.password">s2cxptmxj</entry>
<entry key="gmail.username">s2ctester@gmail.com</entry>
<entry key="gmail.password">s2cxptmxj</entry>
<entry key="twitter.username">s2ctest</entry>
<entry key="twitter.password">s2cxptmxj</entry>
<entry key="jabber.runOnStart">false</entry>
<entry key="devterm.twitter.username">s2ctest</entry>
<entry key="devterm.twitter.password">s2cxptmxj</entry>

<!-- dataSource config -->
<entry key="db.driver">org.h2.Driver</entry>
<entry key="db.url">jdbc:h2:mem:local;DB_CLOSE_DELAY=-1</entry>
<entry key="db.username">sa</entry>
<entry key="db.password"></entry>

<!-- hibernate config -->
<entry key="hibernate.dialect">org.hibernate.dialect.H2Dialect</entry>
<entry key="hibernate.show_sql">true</entry>
<entry key="hibernate.format_sql">true</entry>
<entry key="hibernate.hbm2ddl.auto">update</entry>
<entry key="hibernate.generate_statistics">true</entry>
<entry key="hibernate.cache.use_second_level_cache">true</entry>
<entry key="hibernate.cache.use_query_cache">true</entry>
<entry key="hibernate.cache.provider_class">net.sf.ehcache.hibernate.EhCacheProvider</entry>

<!-- google calendar config -->
<entry key="calendar.title">SpringSprout Calendar</entry>
<entry key="calendar.username">springsprout.cal.test@gmail.com</entry>
<entry key="calendar.password">googlecal</entry>

<!-- daum map config -->
<entry key="daum.map.key">27a3f692f446be591ac627f5c6e499eddf255ad4</entry>

</properties>
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%d{HH:mm} %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>

<logger name="springsprout" level="DEBUG"/>
<logger name="org.springframework" level="INFO"/>
<logger name="org.springframework.security" level="INFO"/>
<logger name="org.hibernate" level="INFO"/>

<root level="WARN">
<appender-ref ref="STDOUT" />
</root>

</configuration>

This file was deleted.

This file was deleted.

@@ -1,24 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- For assistance related to logback-translator or configuration -->
<!-- files in general, please contact the logback user mailing list -->
<!-- at http://www.qos.ch/mailman/listinfo/logback-user -->
<!-- -->
<!-- For professional support please see -->
<!-- http://www.qos.ch/shop/products/professionalSupport -->
<!-- -->
<configuration>
<appender name="stdout1" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%p - %C{1}.%M(%L) | %m%n</pattern>
</encoder>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%d{HH:mm} %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<logger name="org.hibernate.type" level="INFO"/>
<logger name="springsprout" level="DEBUG"/>
<logger name="org.springframework" level="DEBUG"/>
<logger name="org.springframework.security" level="INFO"/>
<logger name="org.hibernate" level="INFO"/>
<root level="INFO">
<appender-ref ref="stdout1"/>

<logger name="springsprout" level="INFO"/>
<logger name="org.springframework" level="WARN"/>
<logger name="org.springframework.security" level="WARN"/>
<logger name="org.hibernate" level="WARN"/>

<root level="WARN">
<appender-ref ref="STDOUT" />
</root>

</configuration>

This file was deleted.

This file was deleted.

This file was deleted.

@@ -1,16 +1,17 @@
package springsprout.common.propertyeditor;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import springsprout.common.util.ReflectionUtils;
import springsprout.common.util.StringUtils;

import java.beans.PropertyEditorSupport;
import java.lang.reflect.Field;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import springsprout.common.util.ReflectionUtils;
import springsprout.common.util.StringUtils;

public class GenericFakePropertyEditor<T> extends PropertyEditorSupport {

protected Log logger = LogFactory.getLog(getClass());
protected Logger logger = LoggerFactory.getLogger(GenericFakePropertyEditor.class);

protected Class<T> entityClass;

@@ -1,20 +1,19 @@
package springsprout.common.util;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ReflectionUtils {

private ReflectionUtils() {}

protected static Log logger = LogFactory
.getLog(ReflectionUtils.class);
protected static Logger logger = LoggerFactory.getLogger(ReflectionUtils.class);

public static Field getField(Class<?> clazz, String fieldName) {
return getField(clazz, fieldName, false);
@@ -1,52 +1,72 @@
package springsprout.modules.study.meeting;

import static springsprout.common.SpringSprout2System.JSON_VIEW;
import static springsprout.modules.study.support.StudyURLRedirectionUtils.redirectMeetingView;
import static springsprout.modules.study.support.StudyURLRedirectionUtils.redirectStudyView;

import java.util.Date;

import javax.annotation.PostConstruct;
import javax.servlet.http.HttpSession;
import javax.validation.Valid;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.Assert;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.SessionAttributes;
import org.springframework.web.bind.support.SessionStatus;
import org.springframework.web.servlet.ModelAndView;

import springsprout.common.enumeration.PersistentEnumUtil;
import springsprout.common.propertyeditor.FormatDatePropertyEditor;
import springsprout.common.util.BeanUtils;
import springsprout.domain.*;
import springsprout.domain.Attendance;
import springsprout.domain.Comment;
import springsprout.domain.Meeting;
import springsprout.domain.Member;
import springsprout.domain.Resource;
import springsprout.domain.Study;
import springsprout.domain.enumeration.ResourceType;
import springsprout.modules.study.StudyService;
import springsprout.modules.study.exception.JoinMeetingException;
import springsprout.modules.study.exception.MeetingMaximumOverException;
import springsprout.modules.study.meeting.support.CommentDTO;
import springsprout.modules.study.meeting.support.CountInfoDTO;
import springsprout.modules.study.meeting.support.MeetingValidator;
import springsprout.service.security.SecurityService;

import javax.servlet.http.HttpSession;
import javax.validation.Valid;
import java.util.Date;

import static springsprout.common.SpringSprout2System.JSON_VIEW;
import static springsprout.modules.study.support.StudyURLRedirectionUtils.redirectMeetingView;
import static springsprout.modules.study.support.StudyURLRedirectionUtils.redirectStudyView;

@Controller
@SessionAttributes("meeting, presentation")
public class MeetingController {

private static final String MEETING_FORM = "study/meeting/form";
private static final String MEETING_VIEW = "study/meeting/view";

Logger log = LoggerFactory.getLogger(MeetingController.class);
private static final Logger LOGGER = LoggerFactory.getLogger(MeetingController.class);

@javax.annotation.Resource StudyService studyService;
@Autowired MeetingService meetingService;
@Autowired SecurityService securityService;
@Autowired MeetingValidator meetingValidator;

@Value("#{envProps['daum.map.key']}") String mapKey;
@Value("#{appProperties['daum.map.key']}")
private String mapKey;

@PostConstruct
public void init() {
Assert.hasText(mapKey, "daum.map.key의 설정 정보가 없습니다.");
}


@RequestMapping(value = "/study/{studyId}/meeting/form", method = RequestMethod.GET)
public String meetingAddForm(@PathVariable int studyId, Model model) {
@@ -3,7 +3,12 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.encoding.PasswordEncoder;
import org.springframework.stereotype.Service;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.support.TransactionCallbackWithoutResult;
import org.springframework.transaction.support.TransactionTemplate;

import springsprout.domain.Member;
import springsprout.domain.Role;
import springsprout.domain.enumeration.MemberStatus;
@@ -20,12 +25,26 @@
@Transactional
public class DefaultRoleSetupService {

@Autowired PlatformTransactionManager transactionManager;
@Autowired MemberRepository memberRepository;
@Autowired RoleRepository roleRepository;
@Autowired PasswordEncoder passwordEncoder;

public static final String DEFAULT_MEMBER_EMAIL = "springsprout@springsprout.org";
public static final String DEFAULT_ADMIN_EMAIL = "s2cadmin@springsprout.org";

public void setup() {
TransactionTemplate transactionTemplate = new TransactionTemplate(transactionManager);
transactionTemplate.afterPropertiesSet();

transactionTemplate.execute(new TransactionCallbackWithoutResult() {
@Override
protected void doInTransactionWithoutResult(TransactionStatus status) {
addDefaultRoles();
addDefaultUsers();
}
});
}

/**
* Add Admin, Member Role
@@ -1,7 +1,14 @@
package springsprout.service.security;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import java.io.IOException;
import java.lang.reflect.Method;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.core.Authentication;
import org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler;
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
@@ -11,15 +18,9 @@
import org.springframework.util.ReflectionUtils;
import org.springframework.util.StringUtils;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.lang.reflect.Method;

public class AuthenticationSuccessSupportAJAXHandler extends AbstractAuthenticationTargetUrlRequestHandler implements AuthenticationSuccessHandler {

protected final Log logger = LogFactory.getLog(this.getClass());
protected final Logger logger = LoggerFactory.getLogger(AuthenticationSuccessSupportAJAXHandler.class);

private RequestCache requestCache = new HttpSessionRequestCache();
private String ajaxHeaderName;

This file was deleted.

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>%d{HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n</Pattern>
</layout>
</appender>

<logger name="springsprout" level="DEBUG"/>

<logger name="org.springframework" level="INFO"/>
<logger name="org.springframework.transaction" level="DEBUG"/>

<logger name="org.hibernate" level="INFO"/>
<logger name="org.hibernate.SQL" level="DEBUG"/>
<logger name="org.hibernate.tool.hbm2ddl.SchemaExport" level="DEBUG"/>

<root level="WARN">
<appender-ref ref="STDOUT" />
</root>

</configuration>
@@ -1,21 +1,22 @@
package springsprout.common.messages;

import org.apache.log4j.Logger;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.support.MessageSourceAccessor;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations="testContext.xml")
public class MessageAccessorTest {

Logger logger = Logger.getLogger(this.getClass());
Logger logger = LoggerFactory.getLogger(this.getClass());

@Autowired MessageSourceAccessor accessor;

@@ -1,19 +1,25 @@
package springsprout.service.acl.utils;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.acls.domain.ObjectIdentityImpl;
import org.springframework.security.acls.domain.PrincipalSid;
import org.springframework.security.acls.model.*;
import org.springframework.security.acls.model.AccessControlEntry;
import org.springframework.security.acls.model.MutableAcl;
import org.springframework.security.acls.model.MutableAclService;
import org.springframework.security.acls.model.NotFoundException;
import org.springframework.security.acls.model.ObjectIdentity;
import org.springframework.security.acls.model.Permission;
import org.springframework.security.acls.model.Sid;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;

import java.util.List;

public class AclSecurityUtilImpl implements AclSecurityUtil {

private static Log logger = LogFactory.getLog(AclSecurityUtil.class);
private static Logger logger = LoggerFactory.getLogger(AclSecurityUtil.class);

private MutableAclService mutableAclService;

This file was deleted.

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties version="1.0">

<comment>애플리케이션 테스트 설정</comment>

<entry key="vertx.chat">http://localhost:8888/chat</entry>
<entry key="url">http://localhost:8080/</entry>
<entry key="mail.username">s2ctester@gmail.com</entry>
<entry key="mail.password">s2cxptmxj</entry>
<entry key="gmail.username">s2ctester@gmail.com</entry>
<entry key="gmail.password">s2cxptmxj</entry>
<entry key="twitter.username">s2ctest</entry>
<entry key="twitter.password">s2cxptmxj</entry>
<entry key="jabber.runOnStart">false</entry>
<entry key="devterm.twitter.username">s2ctest</entry>
<entry key="devterm.twitter.password">s2cxptmxj</entry>

<!-- dataSource config -->
<entry key="db.driver">org.h2.Driver</entry>
<entry key="db.url">jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</entry>
<entry key="db.username">sa</entry>
<entry key="db.password"></entry>

<!-- hibernate config -->
<entry key="hibernate.dialect">org.hibernate.dialect.H2Dialect</entry>

<!-- google calendar config -->
<entry key="calendar.title">SpringSprout Calendar</entry>
<entry key="calendar.username">springsprout.cal.test@gmail.com</entry>
<entry key="calendar.password">googlecal</entry>

</properties>

This file was deleted.

@@ -18,18 +18,24 @@
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:util="http://www.springframework.org/schema/util">

<!-- ============================================================= -->
<!-- Resources -->
<!-- ============================================================= -->
<context:property-placeholder location="classpath:*.properties" />
<util:properties id="envProps" location="classpath:environment.properties"/>

<!-- ============================================================= -->
<!-- Component Scan -->
<!-- ============================================================= -->
<context:component-scan base-package="springsprout" />

<!-- ============================================================= -->
<!-- Properties -->
<!-- ============================================================= -->
<bean name="appProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="locations">
<list>
<value>classpath:/test-config.xml</value> <!-- 기본 설정값 -->
</list>
</property>
<property name="ignoreResourceNotFound" value="true"/>
<property name="localOverride" value="true"/>
</bean>

<bean class="org.springframework.web.context.support.GenericWebApplicationContext" />
<!-- ============================================================= -->
<!-- AOP -->
<!-- ============================================================= -->
@@ -39,17 +45,19 @@
<!-- DataAccess -->
<!-- ============================================================= -->
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
p:driverClass="${db.driver}" p:jdbcUrl="${db.url}" p:user="${db.username}"
p:password="${db.password}" />
p:driverClass="#{appProperties['db.driver']}"
p:jdbcUrl="#{appProperties['db.url']}"
p:user="#{appProperties['db.username']}"
p:password="#{appProperties['db.password']}" />

<!-- ============================================================= -->
<!-- Transaction -->
<!-- ============================================================= -->
<tx:annotation-driven />

<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager"
p:sessionFactory-ref="sessionFactory" />

<tx:annotation-driven />

<!-- ============================================================= -->
<!-- Hibernate -->
@@ -65,13 +73,14 @@
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">${hibernate.dialect}</prop>
<prop key="hibernate.dialect">#{appProperties['hibernate.dialect']}</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
<prop key="hibernate.format_sql">true</prop>
<prop key="hibernate.hbm2ddl.auto">create-drop</prop>
<prop key="hibernate.generate_statistics">true</prop>
<prop key="hibernate.cache.use_second_level_cache">true</prop>
<prop key="hibernate.cache.use_query_cache">true</prop>
<prop key="hibernate.cache.provider_class">net.sf.ehcache.hibernate.EhCacheProvider</prop>
<prop key="hibernate.generate_statistics">true</prop>
</props>
</property>
</bean>
@@ -82,6 +91,11 @@
<bean id="passwordEncoder" class="org.springframework.security.authentication.encoding.ShaPasswordEncoder">
<constructor-arg value="256" />
</bean>

<!-- ============================================================= -->
<!-- WebApplicationContext -->
<!-- ============================================================= -->
<bean class="org.springframework.web.context.support.GenericWebApplicationContext" />

<!-- ============================================================= -->
<!-- Email -->
@@ -92,8 +106,8 @@

<bean id="mainMailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
<property name="host" value="smtp.gmail.com" />
<property name="username" value="${gmail.username}" />
<property name="password" value="${gmail.password}" />
<property name="username" value="#{appProperties['gmail.username']}" />
<property name="password" value="#{appProperties['gmail.password']}" />
<property name="port" value="465" />
<property name="protocol" value="smtps" />
<property name="javaMailProperties">
@@ -108,9 +122,9 @@
<!-- Messanger -->
<!-- ============================================================= -->
<bean id="jabberService" class="springsprout.service.notification.jabber.JabberService">
<constructor-arg name="username" value="${gmail.username}"/>
<constructor-arg name="password" value="${gmail.password}"/>
<constructor-arg name="runOnStart" value="${jabber.runOnStart}"/>
<constructor-arg name="username" value="#{appProperties['gmail.username']}"/>
<constructor-arg name="password" value="#{appProperties['gmail.password']}"/>
<constructor-arg name="runOnStart" value="#{appProperties['jabber.runOnStart']}"/>
</bean>

<bean id="gTalkConfiguration" class="org.jivesoftware.smack.ConnectionConfiguration">
@@ -135,13 +149,13 @@
<!-- Twitter -->
<!-- ============================================================= -->
<bean id="mainTwitter" class="twitter4j.Twitter">
<constructor-arg name="screenName" value="${twitter.username}" />
<constructor-arg name="password" value="{twitter.password}" />
<constructor-arg name="screenName" value="#{appProperties['twitter.username']}" />
<constructor-arg name="password" value="#{appProperties['twitter.password']}" />
</bean>

<bean id="devTermTwitter" class="twitter4j.Twitter">
<constructor-arg name="screenName" value="{devterm.twitter.username}" />
<constructor-arg name="password" value="{devterm.twitter.password}" />
<constructor-arg name="screenName" value="#{appProperties['devterm.twitter.username']}" />
<constructor-arg name="password" value="#{appProperties['devterm.twitter.password']}" />
</bean>

<bean id="twitterService" class="springsprout.service.notification.twitter.TwitterService">
@@ -221,4 +235,5 @@
</property>
<property name="resourceLoaderPath" value="/WEB-INF/velocity/"/>
</bean>

</beans>
@@ -58,15 +58,6 @@
<url-pattern>/*</url-pattern>
</filter-mapping>

<!-- Log4J 설정 리스너 -->
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>classpath:log4j.properties</param-value>
</context-param>

<!-- Root WebApplicationContext 설정 -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>