5.1.0.20 (Sept 5, 2015)

Juno 5.1.0.20 is a moderate update. The biggest improvement is the ability to associate external INI config files with REST servlets using the {@del ConfigFile} functionality.

##### Core

- Significant API changes to org.apache.juneau.config API.
  - {@del ConfigFile} is now thread safe and can be shared across multiple threads.
  - New {@del ConfigMgr} class for managing configuration files.
  - Serializers and parsers can be associated with config files for storing and retrieving POJOs. Default support provided for JSON.
- New {@link oaj.html.SimpleHtmlWriter} class. Can be used for simple HTML DOM construction.
- New {@del oaj.utils.ProcBuilder} class for calling external processes.
- New {@del ObjectMap#remove(Class,String,Object)} method.
- "class='link'" added to links generated by {@link oaj.html.HtmlDocSerializer}.
- New {@del EncoderGroup#append(EncoderGroup)} method.
- New HtmlDocSerializerContext.HTMLDOC_addLinks configuration property.
- Modified the Parser.createContext(ObjectMap,Method,Object) method. Outer context objects can be passed in to create instances of non-static inner classes.
- Fixed bug in {@link oaj.html.HtmlStrippedDocSerializer} where exception was thrown when trying to serialize primitive arrays.
- {@link oaj.json.JsonParser} now handles parsing JSON boolean/numeric values as strings to bean properties of type boolean or number.
- {@link oaj.urlencoding.UrlEncodingSerializer} and {@link oaj.urlencoding.UrlEncodingParser} now represent arrays and collections as key-value pairs where the keys are numbers (e.g. "?0=foo&1=bar").
- Various internal improvements to {@link oaj.utils.IOPipe}.
- New {@del ReflectionUtils#getResource(Class,String)} method.
- {@link oaj.internal.StringUtils#parseNumber(String,Class)} now returns zero for empty strings. This affects the way most parsers handle blank values.

##### Server

- You can now parse into non-static inner classes of a servlet for parameters/attributes/content. Useful if you like to define your marshaller beans inside your servlet.
- Changes to {@del oajr.RestServlet}:
  - New methods for accessing external INI config files:
    {@del RestServlet#getConfig()}
    {@del RestServlet#createConfigFile()}
  - New "$C{...}" variable that resolve to INI config file values.
  - New "$UE{...}" variable that URL-encodes the value inside the variable.
  - New convenience methods for retrieving classpath resource files:
    {@del RestServlet#getResource(String)}
    {@del RestServlet#getResourceAsString(String)}
    {@del RestServlet#getResource(Class,String,String)}. Useful if you want to load predefined POJOs from JSON files in your classpath.
  - New {@del RestServlet#handleNotFound(int,RestRequest,RestResponse)} method for customized handling of when a resource or method was not found.
- {@del oajr.BasicRestServlet} now automatically processes "/favicon.ico" requests by overriding the new {@del RestServlet#handleNotFound(int,RestRequest,RestResponse)} method.
- New {@link oajr.RestRequest} methods:
  - {@del RestRequest#resolveVars(String)}
  - RestRequest.getVarResource(String)
  - {@del RestRequest#getConfig()}
- New {@link oajr.RestResponse} methods:
  - {@link oajr.RestResponse#getDirectWriter(String)}.
  - {@link oajr.RestResponse#getNegotiatedWriter()}. getWriter() now returns an unnegotiated writer. getUnbufferedWriter() has been removed.
- New {@del oajr.annotation.RestMethod#encoders() @RestMethod(encoders)} and {@del RestMethod#inheritEncoders()} annotations. Allows encoders to be fine-tuned at the method level.
- New {@del @RestResource(config)} annotation for associating external {@del ConfigFile} config files with servlets.
- {@del ResourceLink}.
- New org.apache.juneau.rest.matcher package for commonly-used {@link oajr.RestMatcher RestMatchers}:
  - {@del oajr.matchers#MultipartFormDataMatcher}
  - {@del oajr.matchers#UrlEncodedFormMatcher}

##### Microservice

- New juneau-microservice.jar file that encapsulates all 3 juneau jars with code necessary for creating fast and efficent jetty-powered REST microservices.
  Contains the following:
  - Jetty 8.0
  - Apache HttpClient 4.3.5
  - Apache Commons FileUpload 1.3.1
- Microservice now supports Java 6 (previously required Java 7)