jirkapinkas / example-spring-annotations

Spring Web MVC (+ Hibernate and Spring Data JPA) hello world without any XML file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spring Web MVC (+ Hibernate, Spring Data JPA) hello world without any XML file

No web.xml, no Spring xml configuration file, no persistence.xml, no *.hbm.xml, simply no XML configuration file is in this example, which retrieves data from database and returns them in JSON format.

This project uses embedded HSQL database, which creates an in-memory database at startup and destroys all data at shutdown.

How to run: mvn jetty:run

  • List all customers (in JSON format): http://localhost:8080/customers
  • Customer detail (in JSON format): http://localhost:8080/customers/1

How to build WAR file: mvn package

About

Spring Web MVC (+ Hibernate and Spring Data JPA) hello world without any XML file

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Java 100.0%