JAVA-2422: Merge spring-groovy into spring-boot-groovy (#9970)
* JAVA-2422: Moved article to spring-boot-groovy * JAVA-2422: removed module spring-groovy * JAVA-2422: Moved spring-boot-groovy inside spring-boot-modules module * JAVA-2422: Added entry to spring-boot-module's pom * JAVA-2422: main pom changes for module movements * JAVA-2422: Renamed test as it needs the app up and running * JAVA-2422: Renamed test to live as it needs App to be running
This commit is contained in:
parent
f3b82b28e8
commit
9c5ed84bd4
8
pom.xml
8
pom.xml
@ -655,9 +655,7 @@
|
||||
<module>spring-ejb</module>
|
||||
<module>spring-exceptions</module>
|
||||
|
||||
<module>spring-freemarker</module>
|
||||
|
||||
<module>spring-groovy</module>
|
||||
<module>spring-freemarker</module>
|
||||
|
||||
<module>spring-integration</module>
|
||||
|
||||
@ -1159,9 +1157,7 @@
|
||||
<module>spring-ejb</module>
|
||||
<module>spring-exceptions</module>
|
||||
|
||||
<module>spring-freemarker</module>
|
||||
|
||||
<module>spring-groovy</module>
|
||||
<module>spring-freemarker</module>
|
||||
|
||||
<module>spring-integration</module>
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
### Relevant Articles:
|
||||
|
||||
- [Building a Simple Web Application with Spring Boot and Groovy](https://www.baeldung.com/spring-boot-groovy-web-app)
|
@ -41,6 +41,7 @@
|
||||
<module>spring-boot-environment</module>
|
||||
<module>spring-boot-exceptions</module>
|
||||
<module>spring-boot-flowable</module>
|
||||
<module>spring-boot-groovy</module>
|
||||
<!-- <module>spring-boot-gradle</module> --> <!-- Not a maven project -->
|
||||
<module>spring-boot-jasypt</module>
|
||||
<module>spring-boot-keycloak</module>
|
||||
|
9
spring-boot-modules/spring-boot-groovy/README.md
Normal file
9
spring-boot-modules/spring-boot-groovy/README.md
Normal file
@ -0,0 +1,9 @@
|
||||
## Spring Boot Groovy
|
||||
|
||||
This module contains articles about Spring with Groovy
|
||||
|
||||
|
||||
### Relevant Articles:
|
||||
|
||||
- [Building a Simple Web Application with Spring Boot and Groovy](https://www.baeldung.com/spring-boot-groovy-web-app)
|
||||
- [Groovy Bean Definitions](https://www.baeldung.com/spring-groovy-beans)
|
@ -14,7 +14,7 @@
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>parent-boot-2</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../parent-boot-2</relativePath>
|
||||
<relativePath>../../parent-boot-2</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
@ -72,7 +72,7 @@
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<start-class>com.baeldung.app.SpringBootGroovyApplication</start-class>
|
||||
<start-class>com.baeldung.springwithgroovy.SpringBootGroovyApplication</start-class>
|
||||
</properties>
|
||||
|
||||
</project>
|
@ -1,4 +1,4 @@
|
||||
package com.baeldug.groovyconfig;
|
||||
package com.baeldung.groovyconfig;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
@ -1,4 +1,4 @@
|
||||
package com.baeldug.groovyconfig;
|
||||
package com.baeldung.groovyconfig;
|
||||
|
||||
beans {
|
||||
javaPesronBean(JavaPersonBean) {
|
@ -1,4 +1,4 @@
|
||||
package com.baeldug.groovyconfig;
|
||||
package com.baeldung.groovyconfig;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
@ -1,4 +1,4 @@
|
||||
package com.baeldug.groovyconfig;
|
||||
package com.baeldung.groovyconfig;
|
||||
|
||||
public class JavaPersonBean {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.baeldug.spring_groovy;
|
||||
package com.baeldung.spring_groovy;
|
||||
|
||||
/**
|
||||
* Hello world!
|
@ -1,4 +1,4 @@
|
||||
package com.baeldug.spring_groovy;
|
||||
package com.baeldung.spring_groovy;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
@ -2,7 +2,7 @@
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
<bean id="JavaPersonBean" class="com.baeldug.groovyconfig.JavaPersonBean">
|
||||
<bean id="JavaPersonBean" class="com.baeldung.groovyconfig.JavaPersonBean">
|
||||
<property name="firstName" value="John" />
|
||||
<property name="LastName" value="Doe" />
|
||||
<property name="age" value="30" />
|
@ -17,8 +17,11 @@ import com.baeldung.springwithgroovy.entity.Todo
|
||||
import io.restassured.RestAssured
|
||||
import io.restassured.response.Response
|
||||
|
||||
class TodoAppUnitTest {
|
||||
static API_ROOT = 'http://localhost:8081/todo'
|
||||
// This test requires the com.baeldung.springwithgroovy.SpringBootGroovyApplication to be up
|
||||
// For that, run the maven build - spring-boot:run on the module
|
||||
|
||||
class TodoAppLiveTest {
|
||||
static API_ROOT = 'http://localhost:8080/todo'
|
||||
static readingTodoId
|
||||
static writingTodoId
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.baeldug.groovyconfig;
|
||||
package com.baeldung.groovyconfig;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@ -7,10 +7,13 @@ import java.io.File;
|
||||
import org.junit.Test;
|
||||
import org.springframework.context.support.GenericGroovyApplicationContext;
|
||||
|
||||
import com.baeldung.groovyconfig.BandsBean;
|
||||
import com.baeldung.groovyconfig.JavaPersonBean;
|
||||
|
||||
public class GroovyConfigurationUnitTest {
|
||||
|
||||
private static final String FILE_NAME = "GroovyBeanConfig.groovy";
|
||||
private static final String FILE_PATH = "src/main/java/com/baeldug/groovyconfig/";
|
||||
private static final String FILE_PATH = "src/main/java/com/baeldung/groovyconfig/";
|
||||
|
||||
@Test
|
||||
public void whenGroovyConfig_thenCorrectPerson() throws Exception {
|
@ -1,10 +1,13 @@
|
||||
package com.baeldug.groovyconfig;
|
||||
package com.baeldung.groovyconfig;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
|
||||
import com.baeldung.groovyconfig.JavaBeanConfig;
|
||||
import com.baeldung.groovyconfig.JavaPersonBean;
|
||||
|
||||
public class JavaConfigurationUnitTest {
|
||||
|
||||
@Test
|
@ -1,4 +1,4 @@
|
||||
package com.baeldug.groovyconfig;
|
||||
package com.baeldung.groovyconfig;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
@ -6,6 +6,8 @@ import org.junit.Test;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
import com.baeldung.groovyconfig.JavaPersonBean;
|
||||
|
||||
public class XmlConfigurationUnitTest {
|
||||
|
||||
@Test
|
@ -1,4 +1,4 @@
|
||||
package com.baeldug.spring_groovy;
|
||||
package com.baeldung.spring_groovy;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
7
spring-groovy/.gitignore
vendored
7
spring-groovy/.gitignore
vendored
@ -1,7 +0,0 @@
|
||||
/target/
|
||||
/project/
|
||||
.classpath
|
||||
.settings
|
||||
.eclipse
|
||||
.idea
|
||||
.project
|
@ -1,7 +0,0 @@
|
||||
## Spring Groovy
|
||||
|
||||
This module contains articles about Spring with Groovy
|
||||
|
||||
## Relevant Articles:
|
||||
|
||||
- [Groovy Bean Definitions](https://www.baeldung.com/spring-groovy-beans)
|
@ -1,67 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.baeldug</groupId>
|
||||
<artifactId>spring-groovy</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>spring-groovy</name>
|
||||
<packaging>jar</packaging>
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>parent-spring-4</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../parent-spring-4</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-groovy</artifactId>
|
||||
<version>${spring-integration-groovy.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-all</artifactId>
|
||||
<version>${groovy-all.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
<configuration>
|
||||
<compilerId>groovy-eclipse-compiler</compilerId>
|
||||
<verbose>true</verbose>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-eclipse-compiler</artifactId>
|
||||
<version>${groovy-eclipse-compiler.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-eclipse-batch</artifactId>
|
||||
<version>${groovy-eclipse-batch.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<groovy-eclipse-compiler.version>2.9.2-01</groovy-eclipse-compiler.version>
|
||||
<groovy-eclipse-batch.version>2.4.3-01</groovy-eclipse-batch.version>
|
||||
<spring-integration-groovy.version>4.3.7.RELEASE</spring-integration-groovy.version>
|
||||
<groovy-all.version>2.4.12</groovy-all.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
Loading…
x
Reference in New Issue
Block a user