如何启动Java API(后端)

huangapple go评论63阅读模式
英文:

How Can I Start Java API (backend)

问题

我需要安装Maven或其他程序吗?

后端使用MongoDB作为数据库。

我只想启动它并在Angular应用程序中显示数据。

Node.js示例:

npm install
npm start

英文:

How Can I start a java API (backend)

I need to install maven or another program?

the backend has mongodb as database.

I just want to start it and show the data in a Angular Application.

example in nodejs:

npm install
npm start

答案1

得分: 0

你可以学习Spring Boot来创建API。

英文:

You can learn spring boot for API.

答案2

得分: 0

首先,您需要部署一个REST控制器,用于为您的应用程序提供数据:这里有一个好的教程。请注意,此示例使用一个简单的存储库,其中包含硬编码的数据。

然后,您必须调整存储库以从mongo db中读取数据。

英文:

First, you need to deploy a REST controller that will serve the data to your application: here is a good tutorial. Note that this example is built with a trivial repository, with hard-coded data.

Then, you must adapt the repository to read data from mongo db.

huangapple
  • 本文由 发表于 2020年8月5日 20:34:30
  • 转载请务必保留本文链接:https://go.coder-hub.com/63265327.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定