- Mastering Microservices with Java
- Sourabh Sharma
- 174字
- 2021-07-02 13:03:41
OTRS implementation
We'll create the multi-module Maven project for implementing OTRS. The following stack would be used to develop the OTRS application. Please note that at the time of writing this book, only the snapshot build of Spring Boot and Cloud was available. Therefore, in the final release, one or two things may change:
- Java version 1.11
- Spring Boot 2.1.0.M4
- Spring Cloud Finchley.SR1
- Maven version 3.3.9
- Maven Compiler Plugin (for Java 11) with 6.2 version of org.ow2.asm
All the preceding points are mentioned in the root pom.xml file, along with the following OTRS modules:
- restaurant-service
- user-service
- booking-service
The root pom.xml file will look something like this:
...
<groupId>com.packtpub.mmj</groupId>
<artifactId>11537_chapter4</artifactId>
<version>PACKT-SNAPSHOT</version>
<name>Chapter4</name>
<description>Master Microservices with Java 11, Chapter 4</description>
<packaging>pom</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.11</java.version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.0.M4</version>
</parent>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Finchley.SR1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<modules>
<module>restaurant-service</module>
<module>user-service</module>
<module>booking-service</module>
</modules>
<!-- Build step is required to include the spring boot artifacts in generated jars -->
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>11</release>
<source>1.11</source>
<target>1.11</target>
<executable>${JAVA_1_11_HOME}/bin/javac</executable>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
</configuration>
<dependencies>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>6.2</version> <!-- Use newer version of ASM -->
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
...
...
</project>
We are developing REST-based microservices. We'll implement the restaurant module. The booking and user modules are developed on similar lines.
推薦閱讀
- Boost程序庫(kù)完全開發(fā)指南:深入C++”準(zhǔn)”標(biāo)準(zhǔn)庫(kù)(第5版)
- 深入理解Django:框架內(nèi)幕與實(shí)現(xiàn)原理
- Mastering Python High Performance
- Flux Architecture
- 網(wǎng)絡(luò)爬蟲原理與實(shí)踐:基于C#語(yǔ)言
- 組態(tài)軟件技術(shù)與應(yīng)用
- 區(qū)塊鏈技術(shù)與應(yīng)用
- 零基礎(chǔ)學(xué)C語(yǔ)言第2版
- Visual Studio Code 權(quán)威指南
- Machine Learning for Developers
- Training Systems Using Python Statistical Modeling
- Akka入門與實(shí)踐
- Java高并發(fā)編程詳解:深入理解并發(fā)核心庫(kù)
- RESTful Web API Design with Node.js
- Mastering ASP.NET Web API