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
<?xml version="1.0" encoding="UTF-8" ?> | |
<!DOCTYPE log4j:configuration SYSTEM "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd"> | |
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" | |
debug="true"> | |
<appender name="console" class="org.apache.log4j.ConsoleAppender"> | |
<param name="Target" value="System.out" /> | |
<param name="Threshold" value="INFO" /> | |
<layout class="org.apache.log4j.EnhancedPatternLayout"> | |
<param name="ConversionPattern" |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.domain</groupId> | |
<artifactId>id</artifactId> | |
<packaging>pom</packaging> | |
<url>https://domain.com/site/</url> | |
<inceptionYear>2011</inceptionYear> | |
<version>3.1</version> |
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
public class SpringLoadTester { | |
// this just is a quick main method to test to see if the spring stuff loads | |
// correctly... | |
public static void main(String[] args) { | |
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext( | |
"classpath:spring-applicationContext.xml"); | |
DataSource ds = (DataSource) ctx.getBean("dataSource"); |
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
<assembly | |
2121xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> | |
<id>deploy</id> | |
<baseDirectory>${artifactId}</baseDirectory> | |
<includeBaseDirectory>false</includeBaseDirectory> | |
<formats> | |
<format>tar.gz</format> | |
<format>zip</format> |
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 org.junit.Before; | |
import org.junit.Test; | |
import static org.junit.Assert.*; | |
public abstract class GenericEqualityTester { | |
// tests we need for all object equality | |
// o1 == o2, o1 != p1 | |
// object type is the same or if different fails | |
// compare fields (equals) works as follows: |
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
jdbcTemplate.execute(new ConnectionCallback() { | |
public Object doInConnection(Connection connection) throws SQLException, DataAccessException { | |
DatabaseMetaData dbmd = connection.getMetaData(); | |
System.out.println("Database version: " + dbmd.getDatabaseProductVersion()); | |
System.out.println("Driver version: " + dbmd.getDriverVersion()); | |
return null; | |
} | |
}); |