I am using this guide to initialize the firebase admin sdk on my spring-boot java application: https://firebase.google.com/docs/admin/setup
I've included the correct maven dependency
<dependency>
<groupId>com.google.firebase</groupId>
<artifactId>firebase-admin</artifactId>
<version>5.9.0</version>
</dependency>
And I'm attempting to initialize using the code snippet they provided, but when I import the firebase libraries, none of the symbols (firebase, auth, FirebaseOptions, GoogleCredentials, FirebaseApp) are being resolved.
import java.io.FileInputStream;
import com.google.firebase.*;
import com.google.auth.oauth2.GoogleCredentials;
import org.springframework.context.annotation.Configuration;
@Configuration
public class FirebaseAdminConfig {
FileInputStream serviceAccount = new
FileInputStream("path/to/firebase/credentials/");
FirebaseOptions options = new FirebaseOptions.Builder()
.setCredentials(GoogleCredentials.fromStream(serviceAccount))
.setDatabaseUrl("link to database")
.build();
FirebaseApp.initializeApp(options);
}
Am I missing import statements? Is there some additional configuration needed?