简体   繁体   中英

IntelliJ IDEA Project with Angular and Spring Boot

i've created an IntelliJ 'Empty Project' and added 2 Modules: One for Spring Boot (Backend) and one for Angular CLI (Frontend). So far, so good. File Structure of my Project

Now i added the project to GitLab and got problems when cloning the project, bc for some reason it sometimes only gets one module. Also I got Problems with .gitignore file, bc this would need to be outside of a specific module in my root-project. The same for .gitlab-ci.yml.

I can't add anything into my project except for new modules. Or at least it is then only shown in the project structure like here: Hidden folders in my project

What i now would need is some kind of root module/project which has the Spring and ANgular Modules as childs. So that they can start separately. But still can have some project-level files.

Is there any way to achieve this in IntelliJ?

Thank you for your help :)

My suggestion would be to just create two separate projects, with different repos in GitLab. And then, you could open them separately in IntelliJ. From the workflow perspective, this approach would be more natural. For example, when you do work on the frontend, you keep your backend running, but do changes only in the frontend and vice-versa.

If I understood it well, what you want is similar to a mono-repo ? I don't know if thee is any libs that can help you doing that in java. But you can give a try to git submodules ( https://git-scm.com/docs/git-submodule ). It works with Gitlab.

You just have to create a .gitmodules file in root folder and reference your both git project. then you have plenty of command that can help you (like get your whole project with only one git clone).

resource : https://www.atlassian.com/git/tutorials/git-submodule

hope it'll help !

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM