Create a Simple JPA Query

Create a simple PostgreSQL Database Table psql mydb mydb=#¬†create user john with password ‘secret’; CREATE ROLE mydb=# create table person( personid serial, name varchar(30), age integer, height decimal (4,2) ); NOTICE: CREATE TABLE will create implicit sequence “person_personid_seq” for serial column “person.personid” CREATE TABLE mydb=# grant all on person to john; GRANT mydb=# GRANT USAGE,…

Create a Maven JPA Project

These instructions are for Eclipse or Spring Tool Suite (STS) 1. Make Certain you have a Database Connection Window -> Show View -> Other -> Database Management -> Database Explorer Database Connections -> New -> PostgreSQL -> Next New Driver Definition -> Jar List -> Add Jar Zip select your downloaded PostgreSQL JDBC Jar OK…

Lock Down Location Services on iPhone

Obviously location services and find my iPhone are useless if the first thing a would-be thief does is turn off location services and find my iPhone. Here is a great article that explains how to lock down location services and find my iPhone to prevent a would-be thief from doing just that. Improve Find My…

Spring Java Based Config

The following app-context.xml can be replaced with the following The code needs to be modified as follows: You will also need the CGLib jar This can be added in the Pom as follows: or downloaded from

Spring Annotations

Annotations include: @Required @Autowired @Qualifier @Resource @PostConstruct @PreDestroy Autowired Annotations @AutoWired @AutoWired(required=false) @AutoWired @Qualifier(“student1”) @Resource(name=”student1″) AutoWired = required by default