Merge remote-tracking branch 'eugenp/master'
This commit is contained in:
commit
0127ae0840
@ -32,7 +32,7 @@ Running a Spring Boot module
|
|||||||
====================
|
====================
|
||||||
To run a Spring Boot module run the command: `mvn spring-boot:run` in the module directory
|
To run a Spring Boot module run the command: `mvn spring-boot:run` in the module directory
|
||||||
|
|
||||||
#Running Tests
|
###Running Tests
|
||||||
|
|
||||||
The command `mvn clean install` will run the unit tests in a module.
|
The command `mvn clean install` will run the unit tests in a module.
|
||||||
To run the integration tests, use the command `mvn clean install -Pintegration-lite-first`
|
To run the integration tests, use the command `mvn clean install -Pintegration-lite-first`
|
||||||
|
@ -20,3 +20,4 @@
|
|||||||
- [Java Constructors vs Static Factory Methods](https://www.baeldung.com/java-constructors-vs-static-factory-methods)
|
- [Java Constructors vs Static Factory Methods](https://www.baeldung.com/java-constructors-vs-static-factory-methods)
|
||||||
- [The Adapter Pattern in Java](https://www.baeldung.com/java-adapter-pattern)
|
- [The Adapter Pattern in Java](https://www.baeldung.com/java-adapter-pattern)
|
||||||
- [Currying in Java](https://www.baeldung.com/java-currying)
|
- [Currying in Java](https://www.baeldung.com/java-currying)
|
||||||
|
- [The Proxy Pattern in Java](https://www.baeldung.com/java-proxy-pattern)
|
||||||
|
4
pom.xml
4
pom.xml
@ -782,7 +782,6 @@
|
|||||||
<module>wicket</module>
|
<module>wicket</module>
|
||||||
|
|
||||||
<module>xml</module>
|
<module>xml</module>
|
||||||
<module>xmlunit-2</module>
|
|
||||||
<module>xstream</module>
|
<module>xstream</module>
|
||||||
|
|
||||||
<module>tensorflow-java</module>
|
<module>tensorflow-java</module>
|
||||||
@ -836,7 +835,8 @@
|
|||||||
<module>spring-boot-camel</module>
|
<module>spring-boot-camel</module>
|
||||||
<module>spring-boot-client</module>
|
<module>spring-boot-client</module>
|
||||||
<module>spring-boot-custom-starter</module>
|
<module>spring-boot-custom-starter</module>
|
||||||
<module>greeter-spring-boot-autoconfigure</module>
|
<module>spring-boot-di</module>
|
||||||
|
<module>greeter-spring-boot-autoconfigure</module>
|
||||||
<module>greeter-spring-boot-sample-app</module>
|
<module>greeter-spring-boot-sample-app</module>
|
||||||
<module>persistence-modules/spring-boot-h2/spring-boot-h2-database</module>
|
<module>persistence-modules/spring-boot-h2/spring-boot-h2-database</module>
|
||||||
<module>spring-boot-jasypt</module>
|
<module>spring-boot-jasypt</module>
|
||||||
|
55
spring-boot-di/pom.xml
Normal file
55
spring-boot-di/pom.xml
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
<?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>
|
||||||
|
<artifactId>spring-boot-mvc</artifactId>
|
||||||
|
<name>spring-boot-mvc</name>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<description>Module For Spring Boot DI</description>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<artifactId>parent-boot-2</artifactId>
|
||||||
|
<groupId>com.baeldung</groupId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
<relativePath>../parent-boot-2</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.tomcat.embed</groupId>
|
||||||
|
<artifactId>tomcat-embed-jasper</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<mainClass>com.baeldung.SpringBootDiApplication</mainClass>
|
||||||
|
<layout>JAR</layout>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<start-class>com.baeldung.SpringBootDiApplication</start-class>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
</project>
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.baeldung;
|
||||||
|
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
@SpringBootApplication
|
||||||
|
public class SpringBootDiApplication {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(SpringBootDiApplication.class, args);
|
||||||
|
}
|
||||||
|
}
|
@ -1,10 +1,6 @@
|
|||||||
package com.baeldung.componentscan.springapp;
|
package com.baeldung.componentscan.springapp;
|
||||||
|
|
||||||
import org.springframework.context.annotation.FilterType;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import com.baeldung.componentscan.ExampleBean;
|
import com.baeldung.componentscan.ExampleBean;
|
||||||
import com.baeldung.componentscan.springapp.flowers.Rose;
|
|
||||||
|
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
@ -1,14 +1,11 @@
|
|||||||
package com.baeldung.componentscan.springbootapp;
|
package com.baeldung.componentscan.springbootapp;
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.context.annotation.FilterType;
|
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.ComponentScan;
|
|
||||||
|
|
||||||
import com.baeldung.componentscan.ExampleBean;
|
import com.baeldung.componentscan.ExampleBean;
|
||||||
import com.baeldung.componentscan.springbootapp.flowers.Rose;
|
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
//@ComponentScan(basePackages = "com.baeldung.componentscan.springbootapp.animals")
|
//@ComponentScan(basePackages = "com.baeldung.componentscan.springbootapp.animals")
|
@ -5,7 +5,6 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring
|
|||||||
|
|
||||||
- [A Guide to Spring in Eclipse STS](http://www.baeldung.com/eclipse-sts-spring)
|
- [A Guide to Spring in Eclipse STS](http://www.baeldung.com/eclipse-sts-spring)
|
||||||
- [The @ServletComponentScan Annotation in Spring Boot](http://www.baeldung.com/spring-servletcomponentscan)
|
- [The @ServletComponentScan Annotation in Spring Boot](http://www.baeldung.com/spring-servletcomponentscan)
|
||||||
- [Intro to Building an Application with Spring Boot](http://www.baeldung.com/intro-to-spring-boot)
|
|
||||||
- [How to Register a Servlet in Java](http://www.baeldung.com/register-servlet)
|
- [How to Register a Servlet in Java](http://www.baeldung.com/register-servlet)
|
||||||
- [Guide to Spring WebUtils and ServletRequestUtils](http://www.baeldung.com/spring-webutils-servletrequestutils)
|
- [Guide to Spring WebUtils and ServletRequestUtils](http://www.baeldung.com/spring-webutils-servletrequestutils)
|
||||||
- [Using Custom Banners in Spring Boot](http://www.baeldung.com/spring-boot-custom-banners)
|
- [Using Custom Banners in Spring Boot](http://www.baeldung.com/spring-boot-custom-banners)
|
||||||
@ -36,5 +35,4 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring
|
|||||||
- [Injecting Git Information Into Spring](https://www.baeldung.com/spring-git-information)
|
- [Injecting Git Information Into Spring](https://www.baeldung.com/spring-git-information)
|
||||||
- [Validation in Spring Boot](https://www.baeldung.com/spring-boot-bean-validation)
|
- [Validation in Spring Boot](https://www.baeldung.com/spring-boot-bean-validation)
|
||||||
- [Guide to Creating and Running a Jar File in Java](https://www.baeldung.com/java-create-jar)
|
- [Guide to Creating and Running a Jar File in Java](https://www.baeldung.com/java-create-jar)
|
||||||
- [Entity To DTO Conversion for a Spring REST API](https://www.baeldung.com/entity-to-and-from-dto-for-a-java-spring-application)
|
|
||||||
- [Guide to @EnableConfigurationProperties](https://www.baeldung.com/spring-enable-config-properties)
|
- [Guide to @EnableConfigurationProperties](https://www.baeldung.com/spring-enable-config-properties)
|
||||||
|
@ -144,6 +144,11 @@
|
|||||||
<artifactId>spring-messaging</artifactId>
|
<artifactId>spring-messaging</artifactId>
|
||||||
<version>${spring.version}</version>
|
<version>${spring.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.glassfish</groupId>
|
||||||
|
<artifactId>javax.el</artifactId>
|
||||||
|
<version>${javax.el.version}</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
@ -290,7 +295,7 @@
|
|||||||
<!-- excel -->
|
<!-- excel -->
|
||||||
<poi.version>3.16-beta1</poi.version>
|
<poi.version>3.16-beta1</poi.version>
|
||||||
|
|
||||||
<javax.el.version>3.0.1-b06</javax.el.version>
|
<javax.el.version>3.0.1-b09</javax.el.version>
|
||||||
|
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.web.controller;
|
package com.baeldung.web.controller.message;
|
||||||
|
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
@ -15,7 +15,7 @@ import org.thymeleaf.templateresolver.ServletContextTemplateResolver;
|
|||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@EnableWebMvc
|
@EnableWebMvc
|
||||||
@ComponentScan(basePackages = { "com.baeldung.web.controller" })
|
@ComponentScan(basePackages = { "com.baeldung.web.controller.message" })
|
||||||
public class TestConfig implements WebMvcConfigurer {
|
public class TestConfig implements WebMvcConfigurer {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -44,5 +44,4 @@ public class TestConfig implements WebMvcConfigurer {
|
|||||||
templateEngine.setTemplateResolver(templateResolver());
|
templateEngine.setTemplateResolver(templateResolver());
|
||||||
return templateEngine;
|
return templateEngine;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -36,5 +36,6 @@
|
|||||||
<module>junit-5-basics</module>
|
<module>junit-5-basics</module>
|
||||||
<module>easymock</module>
|
<module>easymock</module>
|
||||||
<module>junit-5-advanced</module>
|
<module>junit-5-advanced</module>
|
||||||
|
<module>xmlunit-2</module>
|
||||||
</modules>
|
</modules>
|
||||||
</project>
|
</project>
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<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/maven-v4_0_0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.baeldung</groupId>
|
|
||||||
<artifactId>xmlunit-2</artifactId>
|
<artifactId>xmlunit-2</artifactId>
|
||||||
<version>1.0</version>
|
|
||||||
<name>xmlunit-2</name>
|
<name>xmlunit-2</name>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung</groupId>
|
||||||
<artifactId>parent-modules</artifactId>
|
<artifactId>parent-modules</artifactId>
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
<relativePath>../../</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
Loading…
x
Reference in New Issue
Block a user