Git Product home page Git Product logo

report-annotation's Introduction

report-annotation

Generate report file through entity bean annotation

Code Example

Annotation report bean. name attribute is column label and columnIndex is the order of column in the report

@ReportField(name = "Brewer", columnIndex = 0)
private String name;

Motivation

Using report framework(Jasper etc..) for simple tabular report is overload. Those framework designed for visual report so it requires undesirable resources for creating simple text list.

When you have well defined report bean, always it becomes tedious task to create individual report by format by hand written code. So I designed annotation mechanism to populate Java bean to three popular file formats which are CSV, Excel and PDF.

Installation

report-annotation running on Spring Boot framework with Maven build. Get the code and then run mvn package. Java version 1.7.X used with Maven 3.1.X

Tests

To start application, enter 'mvn spring-boot:run", default application shall run on port 8080, you can run below line to run the tests.

To generate CSV report: curl http://localhost:8080/brewer/contacts.csv

To generate PDF report: curl http://localhost:8080/brewer/contacts.pdf

To generate Excel report: curl http://localhost:8080/brewer/contacts.xls

report-annotation's People

Contributors

sungung avatar

Watchers

James Cloos avatar  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.