Skip to content

Commit 7a1ff29

Browse files
1 parent 64809ce commit 7a1ff29

File tree

1 file changed

+79
-22
lines changed

1 file changed

+79
-22
lines changed

src/main/resources/META-INF/rewrite/examples.yml

Lines changed: 79 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2886,22 +2886,34 @@ examples:
28862886
type: specs.openrewrite.org/v1beta/example
28872887
recipeName: org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_3
28882888
examples:
2889-
- description: '`SpringDataStaxCassandraTest#groupIdChangeCassandraBom`'
2889+
- description: '`SpringCloudVersionUpgradeTest#upgradeSpringCloudVersion`'
28902890
sources:
28912891
- before: project
28922892
language: mavenProject
28932893
- before: |
2894-
<project>
2894+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2895+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
28952896
<modelVersion>4.0.0</modelVersion>
28962897
<groupId>com.example</groupId>
28972898
<artifactId>fooservice</artifactId>
28982899
<version>1.0-SNAPSHOT</version>
2900+
<parent>
2901+
<groupId>org.springframework.boot</groupId>
2902+
<artifactId>spring-boot-starter-parent</artifactId>
2903+
<version>2.2.2.RELEASE</version>
2904+
<relativePath/>
2905+
</parent>
2906+
<properties>
2907+
<java.version>11</java.version>
2908+
<spring-cloud.version>Hoxton.SR9</spring-cloud.version>
2909+
<mockito.version>2.18.3</mockito.version>
2910+
</properties>
28992911
<dependencyManagement>
29002912
<dependencies>
29012913
<dependency>
2902-
<groupId>com.datastax.oss</groupId>
2903-
<artifactId>java-driver-bom</artifactId>
2904-
<version>4.17.0</version>
2914+
<groupId>org.springframework.cloud</groupId>
2915+
<artifactId>spring-cloud-dependencies</artifactId>
2916+
<version>${spring-cloud.version}</version>
29052917
<type>pom</type>
29062918
<scope>import</scope>
29072919
</dependency>
@@ -2910,34 +2922,22 @@ examples:
29102922
</project>
29112923
path: pom.xml
29122924
language: xml
2913-
- description: '`SpringCloudVersionUpgradeTest#upgradeSpringCloudVersion`'
2925+
- description: '`SpringDataStaxCassandraTest#groupIdChangeCassandraBom`'
29142926
sources:
29152927
- before: project
29162928
language: mavenProject
29172929
- before: |
2918-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2919-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2930+
<project>
29202931
<modelVersion>4.0.0</modelVersion>
29212932
<groupId>com.example</groupId>
29222933
<artifactId>fooservice</artifactId>
29232934
<version>1.0-SNAPSHOT</version>
2924-
<parent>
2925-
<groupId>org.springframework.boot</groupId>
2926-
<artifactId>spring-boot-starter-parent</artifactId>
2927-
<version>2.2.2.RELEASE</version>
2928-
<relativePath/>
2929-
</parent>
2930-
<properties>
2931-
<java.version>11</java.version>
2932-
<spring-cloud.version>Hoxton.SR9</spring-cloud.version>
2933-
<mockito.version>2.18.3</mockito.version>
2934-
</properties>
29352935
<dependencyManagement>
29362936
<dependencies>
29372937
<dependency>
2938-
<groupId>org.springframework.cloud</groupId>
2939-
<artifactId>spring-cloud-dependencies</artifactId>
2940-
<version>${spring-cloud.version}</version>
2938+
<groupId>com.datastax.oss</groupId>
2939+
<artifactId>java-driver-bom</artifactId>
2940+
<version>4.17.0</version>
29412941
<type>pom</type>
29422942
<scope>import</scope>
29432943
</dependency>
@@ -4304,6 +4304,63 @@ examples:
43044304
language: java
43054305
---
43064306
type: specs.openrewrite.org/v1beta/example
4307+
recipeName: org.openrewrite.java.spring.search.FindConfigurationProperties
4308+
examples:
4309+
- description: '`FindConfigurationPropertiesTest#findConfigurationPropertiesWithValue`'
4310+
sources:
4311+
- before: |
4312+
package test;
4313+
import org.springframework.boot.context.properties.ConfigurationProperties;
4314+
4315+
@ConfigurationProperties("my.service")
4316+
public class MyProperties {
4317+
private boolean enabled;
4318+
private String url;
4319+
4320+
public boolean isEnabled() {
4321+
return enabled;
4322+
}
4323+
4324+
public void setEnabled(boolean enabled) {
4325+
this.enabled = enabled;
4326+
}
4327+
4328+
public String getUrl() {
4329+
return url;
4330+
}
4331+
4332+
public void setUrl(String url) {
4333+
this.url = url;
4334+
}
4335+
}
4336+
after: |
4337+
package test;
4338+
import org.springframework.boot.context.properties.ConfigurationProperties;
4339+
4340+
/*~~(@ConfigurationProperties("my.service"))~~>*/@ConfigurationProperties("my.service")
4341+
public class MyProperties {
4342+
private boolean enabled;
4343+
private String url;
4344+
4345+
public boolean isEnabled() {
4346+
return enabled;
4347+
}
4348+
4349+
public void setEnabled(boolean enabled) {
4350+
this.enabled = enabled;
4351+
}
4352+
4353+
public String getUrl() {
4354+
return url;
4355+
}
4356+
4357+
public void setUrl(String url) {
4358+
this.url = url;
4359+
}
4360+
}
4361+
language: java
4362+
---
4363+
type: specs.openrewrite.org/v1beta/example
43074364
recipeName: org.openrewrite.java.spring.security5.AuthorizeHttpRequests
43084365
examples:
43094366
- description: '`AuthorizeHttpRequestsTest#noArgAuthorizeRequests`'

0 commit comments

Comments
 (0)