Commit Graph

3108 Commits (9e443d772f4fd76baa79dba033b299526e650d79)

Author SHA1 Message Date
Stephane Nicoll 2b140950e3 Merge branch '2.6.x' into 2.7.x
Closes gh-29176
3 years ago
izeye 7fbb5749d1 Polish
See gh-29157
3 years ago
Brian Clozel 88ee4fab36 Polish
See gh-29140
3 years ago
Brian Clozel 6dbcd0e95e Auto-configure security for Spring GraphQL
This commit configures security features for Spring GraphQL.
In the case of both MVC and WebFlux, this contributes
`DataFetcherExceptionResolver` instances to resolve security exceptions
and expose them as proper errors in the GraphQL response.

For MVC only, this also configures a
`SecurityContextThreadLocalAccessor`. This component ensures that the
security context is propagated between `ThreadLocal` and the Reactor
asynchronous execution.

See gh-29140
3 years ago
Brian Clozel 9954b4c63e Auto-configure Query* support for GraphQL
This commit auto-configures Spring Data Querydsl and QueryByExample
support for Spring GraphQL.

See gh-29140
3 years ago
Brian Clozel 6ef1ed0dd0 Auto-configure GraphQL WebSocket endpoint
This commit auto-configures a GraphQL WebSocket endpoint for both Spring
MVC and Spring WebFlux. This is only enabled if the required libraries
are on the classpath and if the `"spring.graphql.websocket.path"`
property is defined.

See gh-29140
3 years ago
Brian Clozel 4ef9b9e3e5 Auto-configure CORS options for GraphQL web endpoints
This commit adds `"spring.graphql.cors.*"` configuration properties to
customize the CORS configuration for GraphQL web endpoints.

See gh-29140
3 years ago
Brian Clozel 0099460155 Auto-configure graphiql endpoint
Spring GraphQL ships with a static version of the graphiql IDE for
exploring and querying GraphQL endpoints.
See https://github.com/graphql/graphiql for more information.

This commit auto-configures the GraphiQL handler for both MVC and
WebFlux and points GraphiQL to the GraphQL HTTP endpoint exposed by the
application. This feature is disabled by default and can be switched on
with "spring.graphql.graphiql.enabled=true".

See gh-29140
3 years ago
Brian Clozel ff9a421786 Auto-configure schema printer endpoint
This commit configuresa new endpoint for printing in text format the
resolved GraphQL schema.
This endpoint is exposed by default under "/graphql/schema" and must be
enabled with "spring.graphql.schema.printer=true".

See gh-29140
3 years ago
Brian Clozel b38d04556e Auto-configure HTTP transport for MVC and WebFlux
This commit adds two new auto-configuration classes for Spring GraphQL
support. Once the base GraphQL infrastructure is in place, we can now
expose the `GraphQlService` over an HTTP transport.

Spring GraphQL supports both MVC and WebFlux, so this commit ships with
one auto-configuration for each.
Developers can configure the HTTP path where the GraphQL resource is
exposed using the `spring.graphql.path` configuration property (this
defaults to `"/graphql"`).

See gh-29140
3 years ago
Brian Clozel 5cf0a4db94 Add FailureAnalyzer for InvalidSchemaLocationsException
This commit adds a new `FailureAnalyzer` for exceptions thrown when no
GraphQL schema file could be found.
This lists configured locations (with `"classpath:..."` notation) and
also resolved locations - this helps developers figure out how the
pattern are resolved and why schema files cannot be found.

See gh-29140
3 years ago
Brian Clozel de808834f5 Auto-configure Spring GraphQL base infrastructure
This commit adds the auto-configuration for setting up the base Spring
GraphQL infrastructure. Because GraphQL doesn't depend on any particular
transport, we must have a separate configuration for creating:

* the `GraphQlSource`, which holds the schema and the `GraphQL` instance
* the `GraphQlService` for executing incoming requests
* the `BatchLoaderRegistry` for batch loading support
* the `AnnotatedControllerConfigurer` for supporting the annotated
  controllers programming model

This comes with a starting point for the `"spring.graphql.*"`
configuration properties; we can now configure the locations and file
extensions of GraphQL schema files we should load and configure at
startup.

See gh-29140
3 years ago
Stephane Nicoll 83d732823d Merge branch '2.6.x' into 2.7.x
Closes gh-29136
3 years ago
Stephane Nicoll 653fdbd0a4 Configure comment prefixes
Closes gh-29095
3 years ago
Stephane Nicoll 63427b77d1 Merge branch '2.6.x' into 2.7.x
Closes gh-29086
3 years ago
Stephane Nicoll 55859ea64c Stop accessing the datasource if initialization mode is set to never
Closes gh-28931
3 years ago
Stephane Nicoll 38aeeee381 Merge branch '2.6.x' into 2.7.x 3 years ago
Stephane Nicoll 3b4d27e4d3 Merge branch '2.5.x' into 2.6.x 3 years ago
Stephane Nicoll 30ebb17b2b Polish 3 years ago
Stephane Nicoll 9ca1cffab7 Merge branch '2.6.x' into 2.7.x
Closes gh-29016
3 years ago
Stephane Nicoll ba60e3d358 Merge branch '2.5.x'
Closes gh-29002
3 years ago
Stephane Nicoll 157b3aa25f Allow platform to be configured in DataSourceInitializers
Closes gh-28932
3 years ago
Stephane Nicoll b961b14d0f Merge branch '2.6.x' into 2.7.x
Closes gh-28980
3 years ago
Stephane Nicoll dfab6ee307 Merge branch '2.5.x' into 2.6.x
Closes gh-28979
3 years ago
Stephane Nicoll f6f5aec183 Polish "Check for the presence of Spring Security"
See gh-28967
3 years ago
Guirong Hu 4462f9157e Check for the presence of Spring Security
See gh-28967
3 years ago
Stephane Nicoll a2eeb77e21 Merge branch '2.6.x' into 2.7.x
Closes gh-28951
3 years ago
Vedran Pavic 0af4431db8 Apply SameSite session cookie property to Spring Session
This commit maps the `server.servlet.session.cookie.same-site`
configuration property to the `DefaultCookieSerializer` bean configured
in the Spring Session auto-configuration.

See gh-28784
3 years ago
Stephane Nicoll 89635eafa3 Update copyright year of changed files
See gh-28862
3 years ago
Stefano Cordio a5c56043b9 Simplify AssertJ usage
See gh-28862
3 years ago
Stephane Nicoll 25a2888be5 Fix default value of spring.mvc.pathmatch.matching-strategy property
Closes gh-28936
3 years ago
Željko Tomić 1c1c85c3f8 Fix MariaDB mapping for Quartz DataSource initialization
See gh-28779
3 years ago
Phillip Webb beb68671bb Update copyright year of changed files 3 years ago
Madhura Bhave e7ff2cf358 Guard ErrorPageSecurityFilter configuration with ConditionalOnClass
Update `ErrorPageSecurityFilterConfiguration` to guard against the case
where `spring-security-core` is on the classpath but
`spring-security-web` is not.

Fixes gh-28774
3 years ago
Andy Wilkinson 03e283a2e6 Mention WebProperties in deprecation of ResourceProperties
Closes gh-28762
3 years ago
Madhura Bhave dd1d1482dc Deny unauthorized access to the error page
Fixes gh-26356

Co-authored-by Andy Wilkinson <wilkinsona@vmware.com>
3 years ago
Stephane Nicoll 7fbb9d471b Polish "Upgrade to Neo4j Java Driver 4.2.8"
See gh-28717
3 years ago
Stephane Nicoll f1991d8d80 Avoid bean override with CachingMetadataReaderFactoryPostProcessor
Closes gh-28705
3 years ago
Stephane Nicoll 8356204430 Upgrade to Flyway 8.0.4
Closes gh-28697
3 years ago
Filip Hrisafov d6bead1a2a Expose RestClientBuilder when RestHighLevelClient is not available
This commits exposes the RestClientBuilder as a bean even when the
RestHighLevelClient is not available. It allows users to create their
own RestClient beans using the Spring Boot configured RestClientBuilder
when they are not using the RestHighLevelClient.

Fixes gh-28655
3 years ago
Stephane Nicoll 6e06e69bba Merge branch '2.5.x'
Closes gh-28673
3 years ago
Stephane Nicoll 4c193a1511 Merge branch '2.4.x' into 2.5.x
Closes gh-28672
3 years ago
Stephane Nicoll d21c48e474 Update copyright year of changed file
See gh-28532
3 years ago
Josh Cummings d817029575 Harmonize @ConditionalOnMissingBean definition
See gh-28532
3 years ago
Andy Wilkinson 2a342ef416 Merge branch '2.5.x'
Closes gh-28662
3 years ago
Andy Wilkinson 5e4a502b2d Merge branch '2.4.x' into 2.5.x
Closes gh-28661
3 years ago
Andy Wilkinson 2cec3971d7 Prohibit unwanted dependencies in all modules not just starters
Closes gh-28658
3 years ago
Andy Wilkinson 925ddd6b09 Merge branch '2.5.x' 3 years ago
Andy Wilkinson 3b180f42b7 Polish 3 years ago
Andy Wilkinson 7a24ee88ae Merge branch '2.5.x'
Closes gh-28607
3 years ago