Git Product home page Git Product logo

bootjlibfprint's Introduction

BootJlibfprint

This is a simple implementation of Jlibfprint (https://github.com/eduardobogoni/jlibfprint#jlibfprint) in a Spring Boot application.

It has no error handling and is part of a initial research with the intent of analyse if it would be possible implement libfprint with a web based interface.

Currently is works just in Linux.

#Jlibfprint Installation Follow the steps described at https://github.com/eduardobogoni/jlibfprint#jlibfprint to compile libfprint_jni.

In the section to edit the file JlibFprint_jni/src/Makefile.am, I've found the Phil Lavin's hints (https://github.com/phil-lavin/libfprint-java) usefull:

You need to add 5 things here, in the same style as the example below:

  • The path to the libfprint source directory. In my case, /home/pi/fprint/libfprint/libfprint-0.5.1
  • The path from point 1 but this time as a -L param. In my case, /home/pi/fprint/libfprint/libfprint-0.5.1
  • The path to the libfprint/nbis/include directory. In my case, /home/pi/fprint/libfprint/libfprint-0.5.1/libfprint/nbis/include
  • The system path which contains jni.h (hint use the locate command). In my case, /usr/lib/jvm/jdk-7-oracle-armhf/include
  • The system path which contains jni_md.h (hint use the locate command). In my case, /usr/lib/jvm/jdk-7-oracle-armhf/include/linux.

A full example of that line is:

ADD_INCLUDES=-I/home/pi/fprint/libfprint/libfprint-0.5.1 -L/home/pi/fprint/libfprint/libfprint-0.5.1  -I/home/pi/fprint/libfprint/libfprint-0.5.1/libfprint/nbis/include -I/usr/lib/jvm/jdk-7-oracle-armhf/include  -I/usr/lib/jvm/jdk-7-oracle-armhf/include/linux

#Spring Boot project After compile libfprint_jni and the Jlibfprint java project, change the pom.xml file of the project BootJlibfprint to set jlibfprint-1.0-SNAPSHOT.jar as a dependency. In the following example, both projects are in the same workspace.

<dependency>
			<groupId>jlibfprint</groupId>
			<artifactId>jlibfprint</artifactId>
			<version>1.0-SNAPSHOT</version>
			<scope>system</scope>
			<systemPath>${project.basedir}/../JlibFprint/target/jlibfprint-1.0-SNAPSHOT.jar</systemPath>
</dependency>

To debug on Spring Tool Suite or Eclipse, add the environment variable JLIBFPRINT_JNI=/usr/local/lib/libfprint_jni.so on Run -> Run Configurations -> Environment.

#Configuration - application.properties

server.port=9000
spring.datasource.name=test
spring.thymeleaf.cache=false
spring.h2.console.enabled=true
spring.h2.console.path=/console
spring.datasource.platform=h2

With the default configuration, the application will be available on port 9000. Ex: http://localhost:9000.

It uses h2 in memory database, so be aware that every time that you restart the application, the database is erased. The database is accessible on /console, no password is necessary. Ex: http://localhost:9000/console.

#Contributors Copyright (C) 2016 Fabio Bento Luiz [email protected]

Many thanks to:

Look the Libfprint license file for more informations. See http://www.freedesktop.org/wiki/Software/fprint/libfprint

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.