multi pom
This commit is contained in:
33
state_machines/maven_multi_module/api-module/.gitignore
vendored
Normal file
33
state_machines/maven_multi_module/api-module/.gitignore
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
HELP.md
|
||||
target/
|
||||
.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
22
state_machines/maven_multi_module/api-module/pom.xml
Normal file
22
state_machines/maven_multi_module/api-module/pom.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?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>
|
||||
<parent>
|
||||
<groupId>click.kamil.maven</groupId>
|
||||
<artifactId>maven-multi-module</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<artifactId>api-module</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-webflux</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-activemq</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,9 @@
|
||||
package click.kamil.maven.api;
|
||||
|
||||
import org.springframework.jms.annotation.JmsListener;
|
||||
|
||||
public interface JmsOrderListener {
|
||||
|
||||
@JmsListener(destination = "order.queue")
|
||||
void onMessage(String message);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package click.kamil.maven.api;
|
||||
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@RequestMapping("/maven/orders")
|
||||
public interface MavenOrderApi {
|
||||
|
||||
@PostMapping("/submit")
|
||||
void submitOrder(@RequestBody String orderId);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package click.kamil.maven.api;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.reactive.function.server.RouterFunction;
|
||||
import org.springframework.web.reactive.function.server.ServerResponse;
|
||||
import static org.springframework.web.reactive.function.server.RouterFunctions.route;
|
||||
|
||||
@Configuration
|
||||
public class ReactiveOrderApi {
|
||||
|
||||
@Bean
|
||||
public RouterFunction<ServerResponse> orderRoutes() {
|
||||
return route().POST("/reactive/order", request -> ServerResponse.ok().build()).build();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user