Dear all.
I was researching how to post xml I found this blogger that recommends this site to transform xml to html entities. It works fine.
I also found this site to make the see the code beautiful
Also about source code I found this site
Bye
Páginas
domingo, 23 de enero de 2011
Wicket + JPA + Spring
Hello dear friends
I have been this weekend testing the combination of Wicket + JPA + spring. It was Very nice!!!!
At the beginning I discovered a page where to set up easily a project. Using http://www.jweekend.com/dev/LegUp I generated the mvn command to create the project:
Then I transform the project to be opened by eclipse using the command:
Then we can run Start.java
In the browser http://localhost:8080/ we will see running the example, using the Event object to persist.
We can change the persistence.xml to connect with mysql
Be sure also to add mysql to the pom.xml in order to connect to mysql
Then we run again the program and the connection with mysql is ready.
I have been this weekend testing the combination of Wicket + JPA + spring. It was Very nice!!!!
At the beginning I discovered a page where to set up easily a project. Using http://www.jweekend.com/dev/LegUp I generated the mvn command to create the project:
mvn archetype:generate -B -DarchetypeCatalog=http://legup.googlecode.com/svn/repo/archetype-catalog.xml -DarchetypeArtifactId=wicket-spring-jpa-archetype -DarchetypeGroupId=com.jweekend -DarchetypeVersion=0.8.4 -DgroupId=com.mycompany -DartifactId=mycompany -Dversion=1.0-SNAPSHOT -Dpackage=com.mycompany
Then I transform the project to be opened by eclipse using the command:
mvn eclipse:eclipse inside the generated project
Then we can run Start.java
In the browser http://localhost:8080/ we will see running the example, using the Event object to persist.
We can change the persistence.xml to connect with mysql
<properties>
<property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/javatest" />
<property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver" />
<property name="hibernate.connection.password" value="root" />
<property name="hibernate.connection.username" value="root" />
<property name="hibernate.hbm2ddl.auto" value="update" />
</properties>
Be sure also to add mysql to the pom.xml in order to connect to mysql
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.14</version>
<type>jar</type>
<scope>runtime</scope>
</dependency>
Then we run again the program and the connection with mysql is ready.
Suscribirse a:
Comentarios (Atom)