Code Monkey home page Code Monkey logo

fullstack-tutorials4j's Introduction

Taketoday Tutorial4j

Language License MIT Lines of Code Coverage Quality Gate Status All Contributors

这个项目是一个小型和重点教程的集合,每个教程都涵盖了Java生态系统中一个明确定义的开发领域。 当然,其中一个重点在于Spring框架、Spring Data、Spring Boot和Spring Security。 除了Spring之外,这里的模块还涵盖了Java的许多方面。

基于Maven Profile的隔离

我们使用Maven构建Profile来隔离我们仓库中庞大的单个项目列表,就目前而言,绝大多数模块都需要JDK 8才能正确构建和运行。

这些项目大致分为3个列表:first、second和heavy。接下来,根据我们要执行的测试进一步隔离它们。

此外,还有2个专用于JDK 9及更高版本的Profile,以及3个专用于SonarCloud的Profile。

因此,我们总共有11个配置Profile:

Profile 包含 启用的测试类型
default-first 第一批项目 *UnitTest
integration-lite-first 第一批项目 *IntegrationTest
sonarcloud-first 第一批项目 *IntegrationTest、*UnitTest
default-second 第二批项目 *UnitTest
integration-lite-second 第二批项目 *IntegrationTest
sonarcloud-second 第二批项目 *IntegrationTest、*UnitTest
default-heavy 繁重/长时间运行的项目 *UnitTest
integration-heavy 繁重/长时间运行的项目 *IntegrationTest
default-jdk9-and-above JDK9及以上项目 *UnitTest
integration-jdk9-and-above JDK9及以上项目 *IntegrationTest
sonarcloud-jdk9-and-above JDK9及以上项目 *IntegrationTest、*UnitTest

构建项目

尽管不需要经常一次构建整个仓库,因为我们通常关注特定的模块。

但是,如果我们想在仅启用单元测试的情况下构建整个仓库,我们可以从仓库的根目录调用以下命令:

mvn clean install -Pdefault-first,default-second,default-heavy

或者,如果我们想在启用集成测试的情况下构建整个仓库,我们可以执行以下操作:

mvn clean install -Pintegration-lite-first,integration-lite-second,integration-heavy

类似地,对于JDK 9及以上项目,命令为:

mvn clean install -Pdefault-jdk9-and-above

mvn clean install -Pintegration-jdk9-and-above

构建单个模块

要构建特定模块,请在模块目录中运行命令:mvn clean install

运行Spring Boot模块

要运行Spring Boot模块,请在模块目录中运行命令:mvn spring-boot:run

使用IDE

此仓库包含大量模块,当你使用单个模块时,无需导入所有模块(或构建所有模块) - 你可以只需在Eclipse或IntelliJ中导入该特定模块即可。

运行测试

模块中的命令mvn clean install将运行该模块中的单元测试。对于Spring模块,如果存在,这也将运行SpringContextTest

要运行集成测试,请使用以下命令:

mvn clean install -Pintegration-lite-first 或者

mvn clean install -Pintegration-lite-second 或者

mvn clean install -Pintegration-heavy 或者

mvn clean install -Pintegration-jdk9-and-above

取决于我们的模块所在的列表

内容列表

贡献人员


tuyucheng

📆 🚧 🖋

taketoday

🖋

fullstack-tutorials4j's People

Contributors

tuyucheng7 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.