This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import spock.lang.Specification | |
/** | |
* Unit tests for {@link Controller} | |
*/ | |
class ControllerTest extends Specification { | |
private static final String USERNAME = 'Duggie' | |
private static final String EMAIL = 'Duggie@test.com' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print("Starting MongoDB Library Database Build Script") | |
print("Creating Libary Database") | |
var libraryDB = db.getSiblingDB("library") | |
print("Creating Book Collection") | |
libraryDB.createCollection("book") | |
print("Creating index on 'type' field") | |
libraryDB.book.ensureIndex({type:1}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version='1.0' encoding='UTF-8'?> | |
<!-- Test Dataset - mix of FANTASY and SC-FI to suppor the BookManagerDBUnitTest --> | |
<dataset> | |
<book id="1" title="The Lord of the Rings" | |
description="the Lord of the Rings is an epic high fantasy novel written by English philologist and University of Oxford professor J. R. R. Tolkien" | |
category="FANTASY" /> | |
<book id="2" title="The War of the Worlds" description="War in space" | |
category="FANTASY" /> | |
<book id="3" title="Apollo 13" | |
description="Apollo 13 was the seventh manned mission in the American Apollo space program and the third intended to land on the Moon" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.cor.demo.jpa.manager; | |
import java.io.InputStream; | |
import java.util.List; | |
import org.dbunit.DBTestCase; | |
import org.dbunit.database.DatabaseConnection; | |
import org.dbunit.database.IDatabaseConnection; | |
import org.dbunit.dataset.IDataSet; | |
import org.dbunit.dataset.xml.FlatXmlDataSetBuilder; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:p="http://www.springframework.org/schema/p" | |
xmlns:camel="http://camel.apache.org/schema/spring" xmlns:tx="http://www.springframework.org/schema/tx" | |
xmlns:context="http://www.springframework.org/schema/context" | |
xsi:schemaLocation=" | |
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd | |
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd | |
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.cor.demo.jpa.manager; | |
import java.util.List; | |
import javax.persistence.EntityManager; | |
import javax.persistence.PersistenceContext; | |
import javax.persistence.PersistenceContextType; | |
import javax.persistence.Query; | |
import org.hibernate.search.jpa.FullTextEntityManager; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.cor.demo.jpa.entity; | |
import javax.persistence.Entity; | |
import javax.persistence.EnumType; | |
import javax.persistence.Enumerated; | |
import javax.persistence.GeneratedValue; | |
import javax.persistence.Id; | |
import javax.persistence.Lob; | |
import org.hibernate.search.annotations.Boost; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.cor.demo; | |
import java.util.Date; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.beans.factory.BeanFactory; | |
import org.springframework.context.ApplicationContext; | |
import org.springframework.context.support.ClassPathXmlApplicationContext; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.cor.demo; | |
import java.io.Serializable; | |
import javax.jms.JMSException; | |
import javax.jms.Message; | |
import javax.jms.ObjectMessage; | |
import javax.jms.Session; | |
import org.slf4j.Logger; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Server Camel Context (running inside ActiveMQ) | |
--> | |
<camelContext xmlns="http://camel.apache.org/schema/spring"> | |
<!-- Load properties to Camel Context --> | |
<propertyPlaceholder id="properties" location="application.properties" /> | |
<!-- Camel Broadcast Message Route --> | |
<route id="processIncomingFilesRoute" trace="true" xmlns="http://camel.apache.org/schema/spring"> |
NewerOlder