---
title: "JODD入门"
author: "zhb8015"
date: "2014-08-14T07:41:58Z"
tags: []
categories: ["企业架构"]
slug: "jodd"
draft: false
lastmod: "2014-08-14T07:41:58Z"
id: 2103751
url: "https://peter8015.iteye.com/blog/2103751"
---

Jodd是一个普通开源Java包。你可以把Jodd想象成Java的"瑞士军刀",不仅小，锋利而且包含许多便利的功能。Jodd 提供的功能有：  
 提供操作Java bean，  
 可以从各种数据源加载Bean,  
 简化JDBC的接连与代码，  
 剖析SQL查询，  
 处理时间与日期，  
 操作与格式化String,  
 搜索本地硬盘上的文件，  
 帮助处理Servlet请求等。  
除此之外还包含一个很小，但实用的基于JSP的MVC框架。

 

官方文档中的介绍：

 

## What can I expect from Jodd?

Developer-friendly experience + Excellent performances + Small memory footprint and code-base; under 1.5 MB + Fast redeployments, matter of seconds + Elegant web framework + Slick and lightweight DI container + The fastest and unique proxy creator + Efficient and thin database layers + Transactions manager + Focused validation framework + Fast and versatile HTML parser + Decoration framework based on templates + Fastest bean library + Elegant and precise time class + Powerful properties replacement + Tiny and raw HTTP client + Many carefully selected utilities… and more!

## About

[About Jodd](http://jodd.org/about) - an effective one-page you will love :)

[Jodd overview in 5 minutes](http://oblac.github.io/jodd) - Jodd frameworks overview in 5 minutes.

[Jodd micro-frameworks in 30 minutes](http://joddframework.org) - example of using Jodd micro-frameworks.

## Jodd utilities

[BeanUtil](http://jodd.org/doc/beanutil.html) - fastest bean manipulation library around.

Cache - set of common cache implementation.

[Printf](http://jodd.org/doc/printf.html) - formatted value printing, as in C.

[JDateTime](http://jodd.org/doc/jdatetime.html) - elegant usage and astronomical precision in one time-manipulation class.

[Type Converter](http://jodd.org/doc/typeconverter.html) - converting types.

[StringUtil](http://jodd.org/doc/stringutil.html) - more then 100 of additional String utilities.

[StringTemplateParser](http://jodd.org/doc/stringtemplateparser.html) - simple string template parser.

[Finding, scanning, walking files](http://jodd.org/doc/findfile.html) - few easy ways.

[Class finder](http://jodd.org/doc/class-finder.html) - find classes on classpath.

[Wildcard](http://jodd.org/doc/wildcard.html) - using wildcards.

[Servlets](http://jodd.org/doc/servlets.html) - various servlets-related tools.

[Jodd tag library](http://jodd.org/doc/taglibrary.html) - new power to the JSP.

[Form tag](http://jodd.org/doc/formtag.html) - automagically populates forms.

[Class loading in Jodd](http://jodd.org/doc/class-loading-in-jodd.html) - great ways for loading classes.

[Fast buffers](http://jodd.org/doc/fast-buffers.html) - really fast appendable storage.

## Jodd tools

[Email](http://jodd.org/doc/email.html) - sending and receiving emails.

[Props](http://jodd.org/doc/props.html) - enhanced `Properties` replacement.

[HTTP](http://jodd.org/doc/http.html) - tiny, raw HTTP client.

[Methref](http://jodd.org/doc/methref.html) - strongly-typed method name references.

[SwingSpy](http://jodd.org/doc/swingspy.html) - inspection of swing component hierarchy.

## Jodd micro-frameworks

### Madvoc

Elegant web MVC framework that uses CoC in a pragmatic way to simplify web application development.

- [1. Madvoc](http://jodd.org/doc/madvoc/index.html "Madvoc")
- [2. Actions](http://jodd.org/doc/madvoc/actions.html "Actions")
- [3. Actions (cont.)](http://jodd.org/doc/madvoc/actions-more.html "Actions (cont.)")
- [4. Results](http://jodd.org/doc/madvoc/results.html "Results")
- [5. Results (cont.)](http://jodd.org/doc/madvoc/results-more.html "Results (cont.)")
- [6. Interceptors](http://jodd.org/doc/madvoc/interceptors.html "Interceptors")
- [7. Filters](http://jodd.org/doc/madvoc/filters.html "Filters")
- [8. Injection](http://jodd.org/doc/madvoc/injection.html "Injection")
- [9. REST urls](http://jodd.org/doc/madvoc/rest.html "REST urls")
- [10. Setup](http://jodd.org/doc/madvoc/setup.html "Setup")
- [11. Manual registration](http://jodd.org/doc/madvoc/manual+registration.html "Manual registration")
- [12. Integration](http://jodd.org/doc/madvoc/integration.html "Integration")
- [13. Miscellaneous](http://jodd.org/doc/madvoc/miscellaneous.html "Miscellaneous")
- [Embedded Madvoc](http://jodd.org/doc/madvoc/embeded-madvoc.html "Embedded Madvoc")
- [AOP aware Madvoc action requests](http://jodd.org/doc/madvoc/madvoc-aop-cglib.html "AOP aware Madvoc action requests")
- [Prepare objects before update](http://jodd.org/doc/madvoc/prepare-objects-before-update.html "Prepare objects before update")
- [Skip action paths](http://jodd.org/doc/madvoc/skip-madvoc-on-action-path.html "Skip action paths")

### Petite

Slick and lightweight DI container that supports sufficient most of features offered by other containers.

- [1. Petite](http://jodd.org/doc/petite/index.html "Petite")
- [2. Container](http://jodd.org/doc/petite/container.html "Container")
- [3. More registration](http://jodd.org/doc/petite/more_registration.html "More registration")
- [4. More wiring](http://jodd.org/doc/petite/more_wiring.html "More wiring")
- [5. Beans set injection](http://jodd.org/doc/petite/beans-set-injection.html "Beans set injection")
- [6. Petite Provider](http://jodd.org/doc/petite/petite-provider.html "Petite Provider")
- [7. Setup](http://jodd.org/doc/petite/setup.html "Setup")
- [8. Parameters](http://jodd.org/doc/petite/parameters.html "Parameters")

### Proxetta

The fastest proxy creator with unique approach for defying pointcuts and advices.

- [1. Proxetta](http://jodd.org/doc/proxetta/index.html "Proxetta")
- [2. Pointcuts](http://jodd.org/doc/proxetta/pointcuts.html "Pointcuts")
- [3. Advices](http://jodd.org/doc/proxetta/advices.html "Advices")
- [4. ProxyProxetta](http://jodd.org/doc/proxetta/proxy.html "ProxyProxetta")
- [5. WrapperProxetta](http://jodd.org/doc/proxetta/wrapper.html "WrapperProxetta")
- [6. Invocation replacement](http://jodd.org/doc/proxetta/invocation-replacement.html "Invocation replacement")

### DbOom

Efficient and thin layers that significantly simplifies writing of database code.

- [1. Db & DbOom](http://jodd.org/doc/db/index.html "Db & DbOom")
- [2. DbQuery](http://jodd.org/doc/db/dbquery.html "DbQuery")
- [3. DbSession](http://jodd.org/doc/db/dbsession.html "DbSession")
- [4. DbOomQuery](http://jodd.org/doc/db/dboomquery.html "DbOomQuery")
- [5. Mapping](http://jodd.org/doc/db/mapping.html "Mapping")
- [6. DbOomManager](http://jodd.org/doc/db/dboommanager.html "DbOomManager")
- [7. Sql Generator](http://jodd.org/doc/db/sqlgenerator.html "Sql Generator")
- [8. Template SQL](http://jodd.org/doc/db/template-sql.html "Template SQL")
- [9. Relations & Hints](http://jodd.org/doc/db/relations-and-hints.html "Relations & Hints")
- [10. Db configuration](http://jodd.org/doc/db/configuration.html "Db configuration")
- [DbOom: Mapping to a bean](http://jodd.org/doc/db/db-mapping-to-bean.html "DbOom: Mapping to a bean")
- [DB Relations](http://jodd.org/doc/db/db-relations.html "DB Relations")
- [Inject values into entity using hints](http://jodd.org/doc/db/inject-values-using-hints.html "Inject values into entity using hints")

### JTX

Enjoyable transaction manager.

- [1. JTX](http://jodd.org/doc/jtx/index.html "JTX")
- [2. JTX concepts](http://jodd.org/doc/jtx/concepts.html "JTX concepts")
- [3. JTX example](http://jodd.org/doc/jtx/jtx-example.html "JTX example")
- [4. Db and annotations](http://jodd.org/doc/jtx/db-and-annotation.html "Db and annotations")

### Paramo

Extracts method and constructor parameter names.

- [Paramo](http://jodd.org/doc/paramo/index.html "Paramo")

### VTor

Validation framework.

- [VTor](http://jodd.org/doc/vtor/index.html "VTor")

### Lagarto

HTML parser.

- [1. Lagarto](http://jodd.org/doc/lagarto/index.html "Lagarto")
- [2. Lagarto Parser](http://jodd.org/doc/lagarto/lagarto-parser.html "Lagarto Parser")
- [3. DOM Builder](http://jodd.org/doc/lagarto/dom-builder.html "DOM Builder")
- [4. Lagarto properties](http://jodd.org/doc/lagarto/lagarto-properties.html "Lagarto properties")
- [5. StripHtml](http://jodd.org/doc/lagarto/strip-html.html "StripHtml")

### HtmlStapler

Transparent HTML resource bundles.

- [1. HtmlStapler](http://jodd.org/doc/htmlstapler/index.html "HtmlStapler")
- [2. How HtmlStapler works?](http://jodd.org/doc/htmlstapler/how-htmlstapler-works.html "How HtmlStapler works?")
- [3. Setup](http://jodd.org/doc/htmlstapler/setup.html "Setup")
- [4. Ignoring resources](http://jodd.org/doc/htmlstapler/ignoring-resources.html "Ignoring resources")
- [5. Enabling GZip](http://jodd.org/doc/htmlstapler/enabling-gzip.html "Enabling GZip")

### Decora

Web decorator framework.

- [Decora](http://jodd.org/doc/decora/index.html "Decora")

### CSSelly

CSS3 selectors parser.

- [CSSelly](http://jodd.org/doc/csselly/index.html "CSSelly")

### Jerry

jQuery in Java.

- [1. Jerry](http://jodd.org/doc/jerry/index.html "Jerry")
- [2. Jerry Examples](http://jodd.org/doc/jerry/jerry-examples.html "Jerry Examples")
- [Build Facebook bot in 2 easy hours](http://jodd.org/doc/jerry/facebook-bot.html "Build Facebook bot in 2 easy hours")
- [Facebook browser with Jerry & Http](http://jodd.org/doc/jerry/facebook.html "Facebook browser with Jerry & Http")

## Jodd Labs

[Jodd Joy](http://jodd.org/doc/joy) - Start coding your web applications right away, using best Jodd practices integrated into thin application layer.

## Misc

### Examples

[Uphea](http://jodd.org/uphea/index.html) - real-world web application example built on *Jodd* framework.

[Quickstart](http://jodd.org/doc/quickstart/index.html) - start experiencing *Jodd* right away.

[Build web applications with Jodd](http://jodd.org/doc/example/index.html) - tutorial that gives step-by-step instructions how to build web application using *Jodd*. Along it also provides some best-practices using *Jodd* frameworks.

### Tips, Tricks & Best practice

[Logging](http://jodd.org/doc/logging-jodd.html), make *Jodd* logs to your logging framework.

[Add to classpath](http://jodd.org/doc/add-classpath-in-runtime.html) with `ClassLoaderUtil` in runtime.

Learn how to [remove session id](http://jodd.org/doc/remove-session-id.html) from URL for more security.

*Jodd* can be used on [Android](http://jodd.org/doc/android.html), too!

### Performance

[Benchmarks](http://jodd.org/doc/performance.html) - overview of all available performance tests.

### Reports

[Jodd API](http://jodd.org/api/index.html) javadoc.

[Test results](http://jodd.org/test/index.html).

[Coverage reports](http://jodd.org/test/coverage-report/index.html).

## About Documentation

We put big effort to produce quality documentation. *Jodd* documentation covers core concepts of *Jodd* micro frameworks in depth, but also gives overview and examples for many tools.

Although we are trying hard to keep documentation up to date with the code base, there may be differences between how code works and whats described.

Documentation is written in **kramdown** (excellent markdown extension). You can find and even read our documentation on [GitHub](https://github.com/oblac/jodd-site), too. Feel free to contribute!

Need more documentation on certain topics? Don't hesitate to ask for it!

Thank you!