Created
August 9, 2011 14:04
-
-
Save endymuhardin/1134126 to your computer and use it in GitHub Desktop.
This file contains 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
<?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:context="http://www.springframework.org/schema/context" | |
xmlns:p="http://www.springframework.org/schema/p" xmlns:tx="http://www.springframework.org/schema/tx" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd | |
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd | |
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"> | |
<context:property-placeholder location=" | |
classpath*:jdbc.properties, | |
classpath*:jdbc.${stage}.properties | |
" /> | |
<tx:annotation-driven /> | |
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" | |
destroy-method="close" p:driverClassName="${jdbc.driver}" p:url="${jdbc.url}" | |
p:username="${jdbc.username}" p:password="${jdbc.password}" p:maxWait="40000" | |
p:maxActive="80" p:maxIdle="20" /> | |
<bean id="transactionManager" | |
class="org.springframework.orm.hibernate3.HibernateTransactionManager" | |
p:sessionFactory-ref="sessionFactory" /> | |
<bean id="sessionFactory" | |
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean" | |
p:dataSource-ref="dataSource" p:configLocations="classpath*:com/artivisi/**/hibernate.cfg.xml"> | |
<property name="hibernateProperties"> | |
<props> | |
<prop key="hibernate.dialect">${hibernate.dialect}</prop> | |
</props> | |
</property> | |
</bean> | |
<bean id="messageSource" | |
class="org.springframework.context.support.ResourceBundleMessageSource"> | |
<property name="basenames"> | |
<list> | |
<value>messages</value> | |
</list> | |
</property> | |
</bean> | |
</beans> |
This file contains 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
<context:property-placeholder location=" | |
classpath*:jdbc.properties, | |
classpath*:jdbc.${stage}.properties | |
" /> |
This file contains 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
hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect | |
jdbc.driver = com.mysql.jdbc.Driver | |
jdbc.url = jdbc:mysql://localhost/kasbon_live?zeroDateTimeBehavior=convertToNull | |
jdbc.username = root | |
jdbc.password = admin |
This file contains 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
hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect | |
jdbc.driver = com.mysql.jdbc.Driver | |
jdbc.url = jdbc:mysql://localhost/kasbon?zeroDateTimeBehavior=convertToNull | |
jdbc.username = kasbon | |
jdbc.password = kasbon |
This file contains 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
hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect | |
jdbc.driver = com.mysql.jdbc.Driver | |
jdbc.url = jdbc:mysql://localhost/kasbon_testing?zeroDateTimeBehavior=convertToNull | |
jdbc.username = root | |
jdbc.password = admin |
This file contains 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
EXPORT stage=production |
This file contains 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
${stage:-development} |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | |
<encoder> | |
<pattern>%d %-5level %logger{35} - %msg %n</pattern> | |
</encoder> | |
</appender> | |
<appender name="FILE" class="ch.qos.logback.core.FileAppender"> | |
<file>${catalina.home:-.}/logs/kasbon-${stage:-development}.log</file> | |
<encoder> | |
<pattern>%d %-5level %logger{35} - %msg %n</pattern> | |
</encoder> | |
</appender> | |
<include resource="logback-${stage:-development}.xml"/> | |
</configuration> |
This file contains 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
mvn -Denv=production clean install |
This file contains 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
mvn -P production clean install |
This file contains 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
mvn jetty:run -Dstage=testing |
This file contains 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
export CATALINA_OPTS="-Dstage=production" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment