File tree Expand file tree Collapse file tree
java/com/baeldung/repository Expand file tree Collapse file tree Original file line number Diff line number Diff line change 433433 <module >spring-data-couchbase-2</module >
434434 <module >persistence-modules/spring-data-dynamodb</module >
435435 <module >spring-data-elasticsearch</module >
436+ <module >spring-data-jpa</module >
436437 <module >spring-data-keyvalue</module >
437438 <module >spring-data-mongodb</module >
438439 <module >persistence-modules/spring-data-neo4j</module >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <project xmlns =" http://maven.apache.org/POM/4.0.0"
3+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4+ xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
5+ <parent >
6+ <artifactId >parent-boot-2</artifactId >
7+ <groupId >com.baeldung</groupId >
8+ <version >0.0.1-SNAPSHOT</version >
9+ <relativePath >../parent-boot-2</relativePath >
10+ </parent >
11+ <modelVersion >4.0.0</modelVersion >
12+
13+ <artifactId >spring-data-jpa</artifactId >
14+
15+ <dependencies >
16+ <dependency >
17+ <groupId >org.springframework.boot</groupId >
18+ <artifactId >spring-boot-starter-data-jpa</artifactId >
19+ </dependency >
20+ <dependency >
21+ <groupId >com.h2database</groupId >
22+ <artifactId >h2</artifactId >
23+ </dependency >
24+ </dependencies >
25+
26+ </project >
Original file line number Diff line number Diff line change 1+ package com .baeldung ;
2+
3+ import org .springframework .boot .SpringApplication ;
4+ import org .springframework .boot .autoconfigure .SpringBootApplication ;
5+ import org .springframework .context .ApplicationContext ;
6+
7+ @ SpringBootApplication
8+ public class Application {
9+ private static ApplicationContext applicationContext ;
10+
11+ public static void main (String [] args ) {
12+ applicationContext = SpringApplication .run (Application .class , args );
13+ }
14+ }
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 11package com .baeldung .repository ;
22
33import com .baeldung .domain .Article ;
4+ import com .baeldung .repository .ArticleRepository ;
45import org .junit .Test ;
56import org .junit .runner .RunWith ;
67import org .springframework .beans .factory .annotation .Autowired ;
Original file line number Diff line number Diff line change 1+ # spring.datasource.x
2+ spring.datasource.driver-class-name =org.h2.Driver
3+ spring.datasource.url =jdbc:h2:mem:db;DB_CLOSE_DELAY=-1
4+ spring.datasource.username =sa
5+ spring.datasource.password =sa
6+
7+ # hibernate.X
8+ hibernate.dialect =org.hibernate.dialect.H2Dialect
9+ hibernate.show_sql =true
10+ hibernate.hbm2ddl.auto =create-drop
11+ hibernate.cache.use_second_level_cache =true
12+ hibernate.cache.use_query_cache =true
13+ hibernate.cache.region.factory_class =org.hibernate.cache.ehcache.EhCacheRegionFactory
14+
15+ spring.datasource.data =import_articles.sql
File renamed without changes.
You can’t perform that action at this time.
0 commit comments