@@ -5044,6 +5044,45 @@ examples:
50445044 language: java
50455045 ---
50465046type : specs.openrewrite.org/v1beta/example
5047+ recipeName : org.openrewrite.java.spring.security5.ConvertSecurityMatchersToSecurityMatcher
5048+ examples :
5049+ - description : ' `ConvertSecurityMatchersToSecurityMatcherTest#requestMatchersAntMatchersToSecurityMatcher`'
5050+ sources :
5051+ - before : |
5052+ import org.springframework.context.annotation.Bean;
5053+ import org.springframework.context.annotation.Configuration;
5054+ import org.springframework.security.config.annotation.web.builders.HttpSecurity;
5055+ import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
5056+ import org.springframework.security.web.SecurityFilterChain;
5057+
5058+ @Configuration
5059+ @EnableWebSecurity
5060+ class SecurityConfig {
5061+ @Bean
5062+ SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
5063+ http.requestMatchers().antMatchers("/oidc/*", "/events/syncs**");
5064+ return http.build();
5065+ }
5066+ }
5067+ after: |
5068+ import org.springframework.context.annotation.Bean;
5069+ import org.springframework.context.annotation.Configuration;
5070+ import org.springframework.security.config.annotation.web.builders.HttpSecurity;
5071+ import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
5072+ import org.springframework.security.web.SecurityFilterChain;
5073+
5074+ @Configuration
5075+ @EnableWebSecurity
5076+ class SecurityConfig {
5077+ @Bean
5078+ SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
5079+ http.securityMatcher("/oidc/*", "/events/syncs**");
5080+ return http.build();
5081+ }
5082+ }
5083+ language: java
5084+ ---
5085+ type : specs.openrewrite.org/v1beta/example
50475086recipeName : org.openrewrite.java.spring.security5.RenameNimbusdsJsonObjectPackageName
50485087examples :
50495088- description : ' `RenameNimbusdsJsonObjectPackageNameTest#renamePackage`'
@@ -5865,6 +5904,31 @@ examples:
58655904 language: java
58665905 ---
58675906type : specs.openrewrite.org/v1beta/example
5907+ recipeName : org.openrewrite.java.springdoc.CleanupRemainingSpringfox
5908+ examples :
5909+ - description : ' `CleanupRemainingSpringfoxTest#removeOrphanedPrivateMethodsWithSpringfoxTypes`'
5910+ sources :
5911+ - before : |
5912+ import springfox.documentation.service.ApiInfo;
5913+
5914+ class SwaggerConfig {
5915+
5916+ public void publicMethod() {
5917+ }
5918+
5919+ private ApiInfo appInfo() {
5920+ return new ApiInfo("My API", "Description", "1.0", "", "", "", "");
5921+ }
5922+ }
5923+ after: |
5924+ class SwaggerConfig {
5925+
5926+ public void publicMethod() {
5927+ }
5928+ }
5929+ language: java
5930+ ---
5931+ type : specs.openrewrite.org/v1beta/example
58685932recipeName : org.openrewrite.java.springdoc.MigrateSpringdocCommon
58695933examples :
58705934- description : ' `MigrateSpringdocCommonTest#fixCustomiserAndGroupedOpenApi`'
@@ -5914,6 +5978,35 @@ examples:
59145978 language: java
59155979 ---
59165980type : specs.openrewrite.org/v1beta/example
5981+ recipeName : org.openrewrite.java.springdoc.SpringFoxToSpringDoc
5982+ examples :
5983+ - description : ' `SpringFoxToSpringDocJsonTypesTest#addTodoCommentToJsonSerializerConstructor`'
5984+ sources :
5985+ - before : |
5986+ import springfox.documentation.spring.web.json.JacksonModuleRegistrar;
5987+ import springfox.documentation.spring.web.json.JsonSerializer;
5988+ import java.util.List;
5989+
5990+ class SwaggerConfig {
5991+
5992+ public JsonSerializer jsonSerializer(List<JacksonModuleRegistrar> registrars) {
5993+ return new JsonSerializer(registrars);
5994+ }
5995+ }
5996+ after: |
5997+ import springfox.documentation.spring.web.json.JacksonModuleRegistrar;
5998+ import springfox.documentation.spring.web.json.JsonSerializer;
5999+ import java.util.List;
6000+
6001+ class SwaggerConfig {
6002+
6003+ public JsonSerializer jsonSerializer(List<JacksonModuleRegistrar> registrars) {
6004+ return /* TODO: springfox.documentation.spring.web.json types have no SpringDoc equivalent. Remove this Springfox-internal code and use Jackson ObjectMapper directly if JSON serialization is still needed. See https://springdoc.org/migrating-from-springfox.html for guidance. */ new JsonSerializer(registrars);
6005+ }
6006+ }
6007+ language: java
6008+ ---
6009+ type : specs.openrewrite.org/v1beta/example
59176010recipeName : org.openrewrite.java.springdoc.UpgradeSpringDoc_2
59186011examples :
59196012- description : ' `UpgradeSpringDoc2Test#upgradeMaven`'
0 commit comments