• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

shekhargulati/spring-boot-maven-angular-starter: Spring Boot 2.x Angular 9 Multi ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

shekhargulati/spring-boot-maven-angular-starter

开源软件地址(OpenSource Url):

https://github.com/shekhargulati/spring-boot-maven-angular-starter

开源编程语言(OpenSource Language):

HTML 66.2%

开源软件介绍(OpenSource Introduction):

spring-boot-maven-angular-starter Build Status

This is a multi-module Spring Boot Angular Maven starter app with good defaults. The frontend Angular app is built using angular-cli. The project packages Angular application code as a WebJar. This project is geared towards building monolithic applications. I have also written a blog that explains step by step how to create this starter project.

This project provides productive setup for building Spring Boot Angular applications. The application is divided into two Maven modules:

  1. backend: This contains Java code of the application.
  2. ui: This contains source code for the Angular based frontend.

This project uses following versions:

  1. Spring Boot v2.2.6.RELEASE
  2. Angular v9.1.1
  3. Node v12.16.2

Running the full application

You can build the package as a single artifact by running the ./mvnw clean install. Next, you can run the application by executing:

$ java -jar backend/target/app.jar

The application will be accessible at http://localhost:8080.

Features

This starter comes bundled with the following features:

  1. Multi module Maven project: A multi module project to modularize backend and frontend code separately.
  2. Maven wrapper: So, you don't need to install Maven on your machine.
  3. Checkstyle: Enforce sane coding standard guidelines.
  4. ErrorProne: Find errors in your code.
  5. Frontend packaged as a WebJar.
  6. CORS enabled: A global configuration is added to enable CORS so that frontend can work seamlessly with backend during development.
  7. REST API base path: Sets the base REST API path to /api. You can configure it by changing rest.api.base.path property.
  8. Maven release plugin
  9. CI: The project is preconfigured to use TravisCI as continuous integration server.

Running the backend for development mode

There are multiple ways to run the backend. For development, you can use your favorite IDE and run the com.example.app.Application. As soon as your code compiles, Spring Boot DevTools will reload the code.

You can also run the application using Maven.

$ cd backend
$  ../mvnw spring-boot:run

Running the frontend for development mode

To install all the required binaries for your project, you can run following command.

$ cd frontend
$ ../mvnw frontend:install-node-and-npm

Once the above command finishes, you can start the frontend using the npm run serve command.

Hot reloading

Both the front-end and back-end modules support hot reloading.

Example Application

Following are the example applications built using this starter

  1. boot-angular-pagination-example-app



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
prakashk0301/maven-project发布时间:2022-08-16
下一篇:
mojohaus/buildnumber-maven-plugin: BuildNumber Maven Plugin发布时间:2022-08-16
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap