Add to build.gradle (!IMPORTANT, add probably at the end of the file, after 'apply'):
springBoot {
// Enable the creation of a fully
// executable archive file.
executable = true
}
Add to build.gradle (!IMPORTANT, add probably at the end of the file, after 'apply'):
springBoot {
// Enable the creation of a fully
// executable archive file.
executable = true
}
//Forget about XML datasource, somehow it wont work... :( just need to pass xml in parameters to make it work.. | |
//Lets say we have strings of XML or XML file or whatever in xml | |
String xmlDoc = '''<tag>PMHGK5860HD301330</tag>''' | |
Map parameters = new HashMap(); | |
parameters.put(JRXPathQueryExecuterFactory.PARAMETER_XML_DATA_DOCUMENT, xmlDoc); | |
parameters.put("chasisno", chassisno); | |
parameters.put("imgFolderPath", path); |
import net.sf.jasperreports.engine.data.JRXmlDataSource; | |
import net.sf.jasperreports.engine.JRException; | |
import net.sf.jasperreports.engine.JasperCompileManager; | |
import net.sf.jasperreports.engine.JasperExportManager; | |
import net.sf.jasperreports.engine.JasperFillManager; | |
import net.sf.jasperreports.engine.JasperPrint; | |
import net.sf.jasperreports.engine.JasperReport; | |
import net.sf.jasperreports.engine.JasperPrintManager; | |
import net.sf.jasperreports.engine.query.JRXPathQueryExecuterFactory; | |
import java.awt.print.PrinterJob; |
//.gitignore content | |
*.iws | |
*Db.properties | |
*Db.script | |
.settings | |
.classpath | |
.project | |
.idea | |
eclipse | |
stacktrace.log |
//Merges Properties file with config grails | |
Properties properties = new Properties() | |
//Lets say we have file in web-app/settings/setting.properties folder | |
File propertiesFile = grailsApplication.mainContext.getResource("settings/settings.properties").file | |
propertiesFile.withInputStream { | |
properties.load(it) | |
} | |
ConfigSlurper cs = new ConfigSlurper() | |
ConfigObject co = cs.parse(properties) |
#How to setup SSH with online repository for WINDOWS only!
##Generate RSA Private key
ssh-keygen -t rsa -C "[email protected]"
Generating public/private rsa key pair.
Enter file in which to save the key (//.ssh/id_rsa): C:\Users\[profile]\.ssh\id_rsa
Enter passphrase (empty for no passphrase): [Type password or leave it empty and press enter]
import javax.mail.* | |
import javax.mail.internet.* | |
/* | |
Get Any JAVAMAIL Dependency | |
=============================== | |
Download JAVAMAIL dependency that you need. | |
download JAVAMAIL at : https://maven.java.net/content/repositories/releases/com/sun/mail/javax.mail/1.5.2/javax.mail-1.5.2.jar | |
To install, copy & paste the *.jar to installed Groovy lib directory: | |
eg: C:\Program Files (x86)\Groovy\Groovy-2.1.1\lib |
--This is the Query for the Host DB | |
--TODO: Change This | |
SELECT * FROM TABLENAME |
import jcifs.smb.* | |
import groovy.xml.MarkupBuilder | |
import org.custommonkey.xmlunit.* | |
def writer = new StringWriter() | |
def xml = new MarkupBuilder(writer) | |
xml.records() { | |
car(name:'HSV Maloo', make:'Holden', year:2006) { |
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0-rc.3/handlebars.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/ember.js/1.0.0-rc.6/ember.min.js"></script> | |
<script src="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.js"></script> | |
<link rel="stylesheet" href="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/css/jquery.dataTables.css"> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> |