Skip to content

Instantly share code, notes, and snippets.

View codecitizen's full-sized avatar

amp codecitizen

  • Alexander Partsch
  • Vienna, Austria
View GitHub Profile
@codecitizen
codecitizen / LocalDateTimePersistenceConverter.java
Created November 15, 2016 15:28
JPA Attribute Converter for java.time.LocalDateTime to java.sql.Instant
package com.github.gist.codecitizen.jpa.converters;
import javax.persistence.AttributeConverter;
import javax.persistence.Converter;
import java.sql.Timestamp;
import java.time.LocalDateTime;
/**
* Maps {@link java.time.LocalDateTime} entity attributes to {@link java.sql.Timestamp} values
* so a temporal value instead of {@code bytea} is written to the database.
<add path="report.pdf" verb="GET" type="Subcontractor_Module.Handlers.GetPdfReport" name="pdf_report_handler"
resourceType="Unspecified" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,bitness32" />
<add path="report.pdf" verb="GET" type="Subcontractor_Module.Handlers.GetPdfReport" name="pdf_report_handler64"
resourceType="Unspecified" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,bitness64" />