如何让Firebase与Java后端一起工作 [英] How to get Firebase working with Java backend

查看:387
本文介绍了如何让Firebase与Java后端一起工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先我想道歉,如果这个问题是抽象的或不适合这个网站。我真的不知道还有什么要问的。



目前我已经在iOS和Android上开发了应用程序。他们将自己的所有状态都保存在Firebase中,因此所有内容都会立即保存到Firebase实时数据库中。

在创建用户之前,我需要手动填充实时数据库中的一些数据,以便应用程序可以运行,比如用户的配置数据。当我完成使用应用程序时,我直接在Firebase控制台中查看数据。



现在我想要一个后端来完成我手动完成的工作。我希望后端能够填充实时数据库,我也希望它能够从Firebase中检索数据。我希望这是从Java后端(Spring MVC,但现在可能不是关键信息)完成。



我应该怎么做呢?谷歌搜索没有得到我(Java +后端+ Firebase的主要告诉我,Firebase提供了一个Android Java的后端)。



如果这是错误的地方张贴这个,那么请建议在哪里可以发布它。



编辑:我知道的Server SDK。我想说的是如何在通常情况下是无状态的休息解决方案中实现这一点,而不是指明如何执行服务器SDK中的方法。

解决方案 Firebase拥有自己的RestApi,你可以在你的api中使用 https: //firebase.google.com/docs/database/rest/start


First of all I'd like to apologize if this question is to abstract or unsuitable for this site. I really don't know where else to ask.

Currently I have developed apps in iOS and Android. They keep all their state in firebase, so everything is instantly persisted to the Firebase Realtime Database.

Before a user is created I populate the realtime database manually with some data that is expected to be there so that the app can run, such as config data for the user. When I'm "done" using the app I view the data directly in the Firebase console.

Now I want a backend to do the job I have done manually. I want the backend to be able to populate the realtime database and I want it also to be able to retrieve data from Firebase. I would like this to be done from a Java backend(Spring MVC but that might not be critical information right now).

How should I go about doing this? Googling hasn't gotten me that far(java+backend+firebase mostly tells me that "Firebase offers a backend to Android Java").

If this is the wrong place to post this, then please suggest where I can post it instead.

Edit: I am aware of the Server SDK. I am rather referring on how to implement this in what would typically be a stateless rest solution than specifically how the methods in the Server SDK are executed.

解决方案

Firebase has its own RestApi, you can use it in your api https://firebase.google.com/docs/database/rest/start

这篇关于如何让Firebase与Java后端一起工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆