38 changed files with 201 additions and 78 deletions
0
spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/AbstractRepositoryConfigurationSourceSupport.java → spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/AbstractRepositoryConfigurationSourceSupport.java
0
spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/AbstractRepositoryConfigurationSourceSupport.java → spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/AbstractRepositoryConfigurationSourceSupport.java
@ -0,0 +1,49 @@
@@ -0,0 +1,49 @@
|
||||
/* |
||||
* Copyright 2012-present the original author or authors. |
||||
* |
||||
* Licensed under the Apache License, Version 2.0 (the License); |
||||
* you may not use this file except in compliance with the License. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* https://www.apache.org/licenses/LICENSE-2.0 |
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
|
||||
plugins { |
||||
id "java-library" |
||||
id "org.springframework.boot.auto-configuration" |
||||
id "org.springframework.boot.configuration-properties" |
||||
id "org.springframework.boot.deployed" |
||||
id "org.springframework.boot.optional-dependencies" |
||||
} |
||||
|
||||
description = "Spring Boot Data JPA" |
||||
|
||||
dependencies { |
||||
api(project(":spring-boot-project:spring-boot-jpa")) |
||||
api("org.springframework.data:spring-data-jpa") |
||||
api("org.springframework:spring-aspects") |
||||
|
||||
optional(project(":spring-boot-project:spring-boot-autoconfigure")) |
||||
optional("org.springframework.data:spring-data-envers") { |
||||
exclude group: "javax.activation", module: "javax.activation-api" |
||||
exclude group: "javax.persistence", module: "javax.persistence-api" |
||||
exclude group: "javax.xml.bind", module: "jaxb-api" |
||||
exclude group: "org.jboss.spec.javax.transaction", module: "jboss-transaction-api_1.2_spec" |
||||
} |
||||
|
||||
testImplementation(project(":spring-boot-project:spring-boot-jdbc")) |
||||
testImplementation(project(":spring-boot-project:spring-boot-test")) |
||||
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) |
||||
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-autoconfigure"))) |
||||
|
||||
testRuntimeOnly("ch.qos.logback:logback-classic") |
||||
testRuntimeOnly("com.h2database:h2") |
||||
testRuntimeOnly("com.zaxxer:HikariCP") |
||||
} |
||||
2
spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/jpa/EnversRevisionRepositoriesRegistrar.java → spring-boot-project/spring-boot-data-jpa/src/main/java/org/springframework/boot/data/jpa/autoconfigure/EnversRevisionRepositoriesRegistrar.java
2
spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/jpa/EnversRevisionRepositoriesRegistrar.java → spring-boot-project/spring-boot-data-jpa/src/main/java/org/springframework/boot/data/jpa/autoconfigure/EnversRevisionRepositoriesRegistrar.java
@ -0,0 +1,17 @@
@@ -0,0 +1,17 @@
|
||||
{ |
||||
"groups": [], |
||||
"properties": [ |
||||
{ |
||||
"name": "spring.data.jpa.repositories.bootstrap-mode", |
||||
"type": "org.springframework.data.repository.config.BootstrapMode", |
||||
"description": "Bootstrap mode for JPA repositories.", |
||||
"defaultValue": "default" |
||||
}, |
||||
{ |
||||
"name": "spring.data.jpa.repositories.enabled", |
||||
"type": "java.lang.Boolean", |
||||
"description": "Whether to enable JPA repositories.", |
||||
"defaultValue": true |
||||
} |
||||
] |
||||
} |
||||
@ -0,0 +1 @@
@@ -0,0 +1 @@
|
||||
org.springframework.boot.data.jpa.autoconfigure.JpaRepositoriesAutoConfiguration |
||||
20
spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/jpa/AbstractJpaRepositoriesAutoConfigurationTests.java → spring-boot-project/spring-boot-data-jpa/src/test/java/org/springframework/boot/data/jpa/autoconfigure/AbstractJpaRepositoriesAutoConfigurationTests.java
20
spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/jpa/AbstractJpaRepositoriesAutoConfigurationTests.java → spring-boot-project/spring-boot-data-jpa/src/test/java/org/springframework/boot/data/jpa/autoconfigure/AbstractJpaRepositoriesAutoConfigurationTests.java
4
spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/jpa/EnversRevisionRepositoriesAutoConfigurationTests.java → spring-boot-project/spring-boot-data-jpa/src/test/java/org/springframework/boot/data/jpa/autoconfigure/EnversRevisionRepositoriesAutoConfigurationTests.java
4
spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/jpa/EnversRevisionRepositoriesAutoConfigurationTests.java → spring-boot-project/spring-boot-data-jpa/src/test/java/org/springframework/boot/data/jpa/autoconfigure/EnversRevisionRepositoriesAutoConfigurationTests.java
2
spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/jpa/JpaRepositoriesAutoConfigurationTests.java → spring-boot-project/spring-boot-data-jpa/src/test/java/org/springframework/boot/data/jpa/autoconfigure/JpaRepositoriesAutoConfigurationTests.java
2
spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/jpa/JpaRepositoriesAutoConfigurationTests.java → spring-boot-project/spring-boot-data-jpa/src/test/java/org/springframework/boot/data/jpa/autoconfigure/JpaRepositoriesAutoConfigurationTests.java
@ -0,0 +1,76 @@
@@ -0,0 +1,76 @@
|
||||
/* |
||||
* Copyright 2012-present the original author or authors. |
||||
* |
||||
* Licensed under the Apache License, Version 2.0 (the "License"); |
||||
* you may not use this file except in compliance with the License. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.springframework.boot.data.jpa.autoconfigure.domain.city; |
||||
|
||||
import java.io.Serializable; |
||||
|
||||
import jakarta.persistence.Column; |
||||
import jakarta.persistence.Entity; |
||||
import jakarta.persistence.GeneratedValue; |
||||
import jakarta.persistence.Id; |
||||
|
||||
@Entity |
||||
public class City implements Serializable { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
@Id |
||||
@GeneratedValue |
||||
private Long id; |
||||
|
||||
@Column(nullable = false) |
||||
private String name; |
||||
|
||||
@Column(nullable = false) |
||||
private String state; |
||||
|
||||
@Column(nullable = false) |
||||
private String country; |
||||
|
||||
@Column(nullable = false) |
||||
private String map; |
||||
|
||||
protected City() { |
||||
} |
||||
|
||||
public City(String name, String country) { |
||||
this.name = name; |
||||
this.country = country; |
||||
} |
||||
|
||||
public String getName() { |
||||
return this.name; |
||||
} |
||||
|
||||
public String getState() { |
||||
return this.state; |
||||
} |
||||
|
||||
public String getCountry() { |
||||
return this.country; |
||||
} |
||||
|
||||
public String getMap() { |
||||
return this.map; |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return getName() + "," + getState() + "," + getCountry(); |
||||
} |
||||
|
||||
} |
||||
Loading…
Reference in new issue