How To Integrate Querydsl Inward Your Javaee7 Project

This take away requires cognition on:
  • maven
  • git
  • eclipse
  • querydsl
  • wild fly
We volition exhibit you lot how to alter the javaee7-archetype projection to integrate querydsl. For those who arrive at non know, it is a library to unify queries inwards java. What I similar to a greater extent than close it is that you lot tin fluently fix your api. For to a greater extent than information bring upwards to: http://www.querydsl.com/static/querydsl/4.1.3/reference/html_single/

Follow this take away to setup your project:
https://ngeblognow.blogspot.com//search?q=how-to-setup-arquillian-testing-with
Take note, of the arquillian configuration, equally nosotros volition postulate it later.

Since I am lazy :-), I volition exactly supply the exam projection that I induce got created inwards GitHub: https://github.com/czetsuya/JavaEE7-QueryDSL-Demo

Things you lot should accept notice:
  • In resources I induce got added a JPAQueryFactoryProducer:
    @Produces  populace JPAQueryFactory produceJPQQueryFactory() {   render novel JPAQueryFactory(em);  } 
  • Note that I induce got modified Member entity, added a BaseEntity as well as Identifiable interface.
  • I induce got added a novel package: com.broodcamp.javaee_querydsl_demo.repository as well as the classes within it.
  • I induce got too modified: MemberRegistrationTest, as well as thence that nosotros tin piece of job the arquillian exam correct.
To piece of job arquillian merely execute this ascendence within your projection inwards the terminal:
>mvn fix clean exam -Parq-wildfly-managed

The exam should piece of job without error.
Next
Previous
Click here for Comments

0 komentar:

Please comment if there are any that need to be asked.