parse-spring-boot
Parse Spring Boot is a collection of starter libraries to help integrating Parse Server backend features into a Spring Boot application that will act as a client using ParseClient.
See parse-spring-boot-starter-example for a working example application integrating parse-spring-boot-starter and parse-security-spring-boot-starter.
parse-spring-boot-starter
A Starter to integrate ParseClient into a Spring Boot application.
Just include this dependency into your Spring Boot application (see example).
<dependency>
<groupId>ca.pjer</groupId>
<artifactId>parse-spring-boot-starter</artifactId>
<version>1.1.0</version>
</dependency>
Then, define some properties (into your application.properties
(see example):
parse.serverUri=http://localhost:1337/parse # this is the default value
parse.applicationId=MyAppId
parse.restApiKey=MyRestApiKey
parse.masterKey=MyMasterKey
Then, inject some beans (see example):
@Autowired
ca.pjer.parseclient.ParseClient parseClient;
// Injected only if `parse.applicationId` is defined
@Autowired(required = false)
ca.pjer.parseclient.Application application;
@Autowired(required = false)
@Qualifier("anonymousPerspective")
ca.pjer.parseclient.Perspective anonymousPerspective;
// Injected only if `parse.masterKey` is defined
@Autowired(required = false)
@Qualifier("masterPerspective")
ca.pjer.parseclient.Perspective masterPerspective;
parse-security-spring-boot-starter
A Starter to add Spring Security based on Parse users/session into a Spring Boot Web application.
Just include this dependency into your Spring Boot Web application (see example).
<dependency>
<groupId>ca.pjer</groupId>
<artifactId>parse-security-spring-boot-starter</artifactId>
<version>1.1.0</version>
</dependency>
A couple of properties are available for customisation, but out of the box you get authentication and authorization into your app with zero config.
All URIs will requires authentication.
A login page is available at /login
.
Also, you can inject a ParseSession
into your Spring Web controllers methods (see example):
@RestController
public static class MainController {
@GetMapping("/me")
public Object me(ParseSession parseSession) {
return parseSession;
}
}