Skip to content

Instantly share code, notes, and snippets.

@davecramer
Created April 17, 2014 13:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davecramer/10985071 to your computer and use it in GitHub Desktop.
Save davecramer/10985071 to your computer and use it in GitHub Desktop.
SimpleTransactionExample
package ca.credativ.jdbc;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import java.sql.Array;
/**
* Created by davec on 2014-04-16.
*/
public class SpringTransactionExample
{
public static void main(String []args)
{
ApplicationContext applicationContext = new ClassPathXmlApplicationContext("context.xml");
try
{
PostgresArray postgresArray = (PostgresArray)applicationContext.getBean("postgresArrayImpl");
String []strings = postgresArray.get() ;
for (int i=0;i < strings.length;i++)
{
System.out.println(strings[i]);
}
}
catch( Exception ex )
{
ex.printStackTrace();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment