diff --git a/spring-groovy/.gitignore b/spring-groovy/.gitignore new file mode 100644 index 0000000000..c17c227305 --- /dev/null +++ b/spring-groovy/.gitignore @@ -0,0 +1,7 @@ +/target/ +/project/ +.classpath +.settings +.eclipse +.idea +.project diff --git a/spring-groovy/pom.xml b/spring-groovy/pom.xml new file mode 100644 index 0000000000..686633da27 --- /dev/null +++ b/spring-groovy/pom.xml @@ -0,0 +1,35 @@ + + 4.0.0 + + com.baeldug + spring-groovy + 0.0.1-SNAPSHOT + jar + + spring-groovy + http://maven.apache.org + + + UTF-8 + + + + + junit + junit + 3.8.1 + test + + + org.springframework + spring-core + 4.3.6.RELEASE + + + org.springframework.integration + spring-integration-groovy + 4.3.7.RELEASE + + + diff --git a/spring-groovy/src/main/java/com/baeldug/spring_groovy/App.java b/spring-groovy/src/main/java/com/baeldug/spring_groovy/App.java new file mode 100644 index 0000000000..1df6681c42 --- /dev/null +++ b/spring-groovy/src/main/java/com/baeldug/spring_groovy/App.java @@ -0,0 +1,13 @@ +package com.baeldug.spring_groovy; + +/** + * Hello world! + * + */ +public class App +{ + public static void main( String[] args ) + { + System.out.println( "Hello World!" ); + } +} diff --git a/spring-groovy/src/main/java/com/baeldug/spring_groovy/TestConfig.java b/spring-groovy/src/main/java/com/baeldug/spring_groovy/TestConfig.java new file mode 100644 index 0000000000..474216de4e --- /dev/null +++ b/spring-groovy/src/main/java/com/baeldug/spring_groovy/TestConfig.java @@ -0,0 +1,8 @@ +package com.baeldug.spring_groovy; + +import org.springframework.stereotype.Component; + +@Component +public class TestConfig { + +} diff --git a/spring-groovy/src/main/resources/groovyContextConfig.groovy b/spring-groovy/src/main/resources/groovyContextConfig.groovy new file mode 100644 index 0000000000..3ac7366876 --- /dev/null +++ b/spring-groovy/src/main/resources/groovyContextConfig.groovy @@ -0,0 +1,5 @@ +beans{ + testString String, 'test' + testNum int, 100 + testObj(i:101,s:'objVal') +} \ No newline at end of file diff --git a/spring-groovy/src/test/java/com/baeldug/spring_groovy/AppTest.java b/spring-groovy/src/test/java/com/baeldug/spring_groovy/AppTest.java new file mode 100644 index 0000000000..19eefb6c0f --- /dev/null +++ b/spring-groovy/src/test/java/com/baeldug/spring_groovy/AppTest.java @@ -0,0 +1,38 @@ +package com.baeldug.spring_groovy; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + * Unit test for simple App. + */ +public class AppTest + extends TestCase +{ + /** + * Create the test case + * + * @param testName name of the test case + */ + public AppTest( String testName ) + { + super( testName ); + } + + /** + * @return the suite of tests being tested + */ + public static Test suite() + { + return new TestSuite( AppTest.class ); + } + + /** + * Rigourous Test :-) + */ + public void testApp() + { + assertTrue( true ); + } +}