Skip to content
Starter project with Majority of data necessary to start a making a app using Hi-Framework
Java HTML JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/main
.gitignore
README.md
pom.xml

README.md

Hi-Framework with Hibernate

A getting started Project with the basics to use Hi-Framework and Hibernate using MYSQL as BD

Getting Started

First you must only clone the project and start editing, doesn't mather if how you will organize your folders but the project separates in folder the controllers, data(services, DAOs, Models), frontiers and utils

The configuration of the database can be found in src/main/resources/META-INF/persistence.xml and in the DAO src/main/java/com/mycompany/hi/framework/hibernate/data/daos/DAO.java

Information about Hi-Framework can be found in documentation and about Hibernate in http://docs.jboss.org/hibernate/orm/5.1/userguide/html_single/Hibernate_User_Guide.html

Prerequisites

Most of requisites can be found on documentation of Hi and Hibernate but are:

  • Java 8
  • Maven 3
  • Any server that supports CDI 1.2(tomcat/jetty/glassfish/etc)
  • Mysql Server

in this specific case the DB will be created automatically as (mozdevz)

Installing

After cloning you only need configure your DB access credentials(username and password) to run the project on your IDE, and access the page on http://yourlocalhost:yourport/members/index (ex: http://localhost:8080/members/index ), or just access de root context

Modeling and coding

To make your own code you can edit the persistence.xml to add your on DB configurations, and you can model your classes using the Hibernate and JPA annotations, on the dao package you can extend your classes from DAO to make it have all DAO reference from the Generic DAO.

Like:

@ApplicationScoped
public class MemberDAO extends DAO<Member>{

    @Override
    public Class<Member> getEntityClass() {
       return Member.class;
    }

   
}

Deployment

After testing and after all coding your webapp you only need to build a war file and deploy it on the server or can use the exploded war.

Built With

Contributing

Please read open an Issue if you have any problem and feel free to fork and make full requests to improve this example

Authors

  • Adelino José Ngomacha - Junior Web Developer - iamzjohn
You can’t perform that action at this time.