Coder Social home page Coder Social logo

andreykatarin / jparestresource Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ilb/jparestresource

0.0 1.0 0.0 3.65 MB

Example Rest JPA application

License: Apache License 2.0

PHP 38.77% Shell 1.40% HTML 0.95% CSS 0.11% JavaScript 19.19% XSLT 28.93% Java 10.41% PLpgSQL 0.24%

jparestresource's Introduction

jparestresource

JAX-RS + JPA application

##Example project creation based on this archetype in command line

mvn -DarchetypeGroupId=ru.ilb.jparestresource -DarchetypeArtifactId=jparestresource-archetype -DarchetypeVersion=1.0-SNAPSHOT -DgroupId=ru.ilb.sampleapplication -DartifactId=sampleapplication -Dversion=1.0-SNAPSHOT -Dpackage=ru.ilb.sampleapplication -Darchetype.interactive=false --batch-mode --update-snapshots archetype:generate

##Example project creation based on this archetype in Netbeans

  1. File -> New Project, choose Maven -> Project from archetype, click Next
  2. Start typing jparesresource in Search field and choose jparestresource-archetype, click Next
  3. Enter Project name (sampleapplication), Group Id and Package must equals, enter in both fields ru.ilb.sampleapplication. Click Next.

Project will be created. Before first run database should be created and access to web application granted (see schema.sql);

Environment configuration

Place in ${catalina.base}/lib following jars:

  • eclipselink-2.6.4.jar
  • javax.json-1.0.4.jar
  • javax.persistence-2.1.0.jar
  • mysql-connector-java-5.1.31.jar

##Note about Tomcat before 8.0.33 TomcatInstrumentableClassLoader is not intended to work on Tomcat 8.0.33+, but required in older versions. In case of exception javax.persistence.TransactionRequiredException: No EntityManager with actual transaction available for current thread uncomment line with <Loader loaderClass="org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader"/> in context.xml and place spring-instrument-tomcat-4.3.2.RELEASE.jar in ${catalina.base}/lib

##React frontend Install netbeans support for .nbigonre plugin, or node_modules background scanning will never end: https://netbeans.org/bugzilla/show_bug.cgi?id=238709#c36

Direct link: http://deadlock.netbeans.org/job/nbms-and-javadoc/lastSuccessfulBuild/artifact/nbbuild/nbms/extra/org-netbeans-modules-nbignore.nbm

Jeddict plugin for Netbeans

Install Jeddict from https://jeddict.github.io

#Code snippets

common dependencies

<!-- jettison JSON provider -->
<dependency>
    <groupId>org.codehaus.jettison</groupId>
    <artifactId>jettison</artifactId>
    <version>1.3.7</version>
</dependency>
<!-- jackson JSON provider -->
<dependency>
    <groupId>com.fasterxml.jackson.jaxrs</groupId>
    <artifactId>jackson-jaxrs-json-provider</artifactId>
    <version>2.7.4</version>
</dependency>
<!-- dependency to enable CORS support -->
<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-rt-rs-security-cors</artifactId>
    <version>${apache-cxf.version}</version>
</dependency>
<!-- dynamic entity graph -->
<dependency>
    <groupId>com.cosium.spring.data</groupId>
    <artifactId>spring-data-jpa-entity-graph</artifactId>
    <version>1.10.13</version>
</dependency>

file tasks (delete, create, copy...)

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-antrun-plugin</artifactId>
    <version>1.7</version>
    <executions>
        <execution>
            <phase>generate-sources</phase>
            <goals>
                <goal>run</goal>
            </goals>
            <configuration>
                <tasks>
                    <delete>
                        <fileset dir="${project.build.directory}/..." includes="*" />
                    </delete>
                </tasks>
            </configuration>
        </execution>
    </executions>
</plugin>

jparestresource's People

Contributors

slavb18 avatar unsfer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.