{"id":15184508,"url":"https://github.com/hantsy/angularjs-springmvc-sample-boot","last_synced_at":"2025-10-01T23:30:37.791Z","repository":{"id":35945373,"uuid":"40234428","full_name":"hantsy/angularjs-springmvc-sample-boot","owner":"hantsy","description":"A RESTful sample using Spring Boot, Spring MVC, Spring Data and Angular/Bootstrap.","archived":true,"fork":false,"pushed_at":"2024-01-31T08:12:06.000Z","size":447,"stargazers_count":315,"open_issues_count":2,"forks_count":133,"subscribers_count":44,"default_branch":"master","last_synced_at":"2024-09-28T17:03:27.685Z","etag":null,"topics":["angularjs","bootstrap","hibernate","jpa","lombok","nodejs","rest","spring","spring-boot","spring-data","spring-data-jpa","spring-mvc","swagger"],"latest_commit_sha":null,"homepage":"https://www.gitbook.com/book/hantsy/build-a-restful-app-with-spring-mvc-and-angularjs/details","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hantsy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-05T08:39:08.000Z","updated_at":"2024-04-25T21:34:13.000Z","dependencies_parsed_at":"2022-09-24T17:57:41.100Z","dependency_job_id":null,"html_url":"https://github.com/hantsy/angularjs-springmvc-sample-boot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hantsy%2Fangularjs-springmvc-sample-boot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hantsy%2Fangularjs-springmvc-sample-boot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hantsy%2Fangularjs-springmvc-sample-boot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hantsy%2Fangularjs-springmvc-sample-boot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hantsy","download_url":"https://codeload.github.com/hantsy/angularjs-springmvc-sample-boot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234909086,"owners_count":18905504,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angularjs","bootstrap","hibernate","jpa","lombok","nodejs","rest","spring","spring-boot","spring-data","spring-data-jpa","spring-mvc","swagger"],"created_at":"2024-09-27T17:03:39.931Z","updated_at":"2025-10-01T23:30:37.376Z","avatar_url":"https://github.com/hantsy.png","language":"Java","readme":"angularjs-springmvc-sample-boot\n===============================\n\nAn example application using AnguarJS/Bootstrap as frontend and Spring MVC as REST API producer.\n\n**More details about the source codes, please read the online GitBook: [Building REST APIs with Spring MVC](https://www.gitbook.com/book/hantsy/build-a-restful-app-with-spring-mvc-and-angularjs/details).**\n\n\u003e NOTE: This project is under maintenance, no more new features added in future. If you are looking for the new Spring Boot 2 and Angular 5, check [angular-spring-reactive-sample](https://github.com/hantsy/angular-spring-reactive-sample).\n\nTechnology stack:\n\n* Spring Boot\n* Spring MVC\n* Spring Data JPA\n* JPA\n* Hibernate 5.2\n* Spring Security\n* Swagger/Swagger2Markup/Spring Rest Docs\n* Spring Test/JUnit/Mockito/JBehave/RestAssured\n* Lombok\n* ModelMapper\n* AngularJS\n* Bootstrap\n\nThis version improved [the original version(without Spring Boot)](https://github.com/hantsy/angularjs-springmvc-sample), including:\n\n* Introduction of Gulp build system to processing the static resources\n* The frontend UI can be run standalone via NodeJS eco-system\n* An option provided and allow you to package the static resources as part of final jar and run the application via `mvn spring-boot:run` directly\n\n## Requirements\n\n* JDK 8\n\n  Oracle Java 8 is required, go to [Oracle Java website](http://java.oracle.com) to download it and install into your system. \n \n  Optionally, you can set **JAVA\\_HOME** environment variable and add *\u0026lt;JDK installation dir\u003e/bin* in your **PATH** environment variable.\n\n* Apache Maven\n\n  Download the latest Apache Maven from [http://maven.apache.org](http://maven.apache.org), and uncompress it into your local system. \n\n  Optionally, you can set **M2\\_HOME** environment varible, and also do not forget to append *\u0026lt;Maven Installation dir\u003e/bin* your **PATH** environment variable.  \n\n* NodeJS\n\n  NodeJS is required to build the frontend static resources.\n \n  Download [NodeJS](http://nodejs.org) and install it into your local system. \n \n  After it is installed, open terminal, and using `node -v` command to confirm.\n \n  ```\n  node -v \n  \u003ev4.2.2\n  ```\n \n  `bower` is also requried to install the runtime dependencies, and `gulp` is chosen as our build tools for the statics resources.\n \n  ```\n  npm install -g bower\n  npm install -g gulp\n  ```\n \n## Get the source codes\n\nGet a copy of the source codes into your local system.\n\n```\ngit clone https://github.com/hantsy/angularjs-springmvc-sample-boot\n```\n\n## Run the project\n\nYou can use one of the following approaches to run this project.\n\n### Run frontend UI and backend respectively\n\n1. Run the backend API server via Spring Boot.\n\n   ```\n   mvn spring-boot:run\n   ```\n\n   The backend APIs will run on port 9000.\n\n2. Run the frontend UI standalone.\n   \n   ```\n   npm install\n   bower install\n   gulp serve\n   ```\n\n   By default, gulp serves the frontend UI static resources on port 3000.\n\n3. Go to [http://localhost:3000](http://localhost:3000) to test it.\n\n### Run the project via Spring Boot maven plugin\n     \n1. Run the following command to resovle the dependencies of the frontend static resources.\n   \n   ```\n   npm install\n   bower install\n   ```\n\n2. Run the backend API server with `spring-boot` command. The parameter `-Dstatic-ui` will copy the static resources and package into the jar archive.\n\n   ```\n   mvn spring-boot:run -Dstatic-ui\n   ```\n\n3. Go to [http://localhost:9000](http://localhost:9000) to test it. \n\nIf you want to explore the REST API docs online, there is a *Swagger UI* configured for visualizing the REST APIs, just go to [http://localhost:9000/swagger-ui.html](http://localhost:9000/swagger-ui.html).\n \n### Generate static REST API reference documentation\n\nI have moved the REST docs generation configuration into a standalone Maven profile.\n\nExecute the following command to generate HTML and PDF format files for your REST APIs from Swagger API description file and Spring test code snippets(as code samples).\n\n```\nmvn clean package -Drestdocs\n```\n\nThe detailed configuration is explained in [API documention](https://hantsy.gitbooks.io/build-a-restful-app-with-spring-mvc-and-angularjs/content/swagger.html) section.\n\nWhen it is done, check the generated static docs in *target/asciidoc* folder, it includes a HTML 5 file(under html folder), and a PDF file(in pdf folder).\n\nOpen the pdf document in Adobe Reader, it looks like.\n\n![pdf](https://github.com/hantsy/angularjs-springmvc-sample-boot/blob/master/restdocs.png) \n \n### Docker\n\nYou can run the project in multistage Docker building development environment, check [Multistage Builds](https://github.com/hantsy/devops-sandbox/blob/master/multistage.md).","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhantsy%2Fangularjs-springmvc-sample-boot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhantsy%2Fangularjs-springmvc-sample-boot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhantsy%2Fangularjs-springmvc-sample-boot/lists"}