File tree Expand file tree Collapse file tree
spring-boot-h2-remote-app
spring-boot-persistence/src/main Expand file tree Collapse file tree Load diff This file was deleted.
Load diff This file was deleted.
Load diff This file was deleted.
Load diff This file was deleted.
Load diff This file was deleted.
Load diff This file was deleted.
Original file line number Diff line number Diff line change 1- package com .baeldung .h2db . demo ;
1+ package com .baeldung .h2 . client ;
22
33import java .sql .ResultSet ;
44import java .sql .SQLException ;
77import org .springframework .beans .factory .annotation .Autowired ;
88import org .springframework .boot .SpringApplication ;
99import org .springframework .boot .autoconfigure .SpringBootApplication ;
10+ import org .springframework .context .annotation .ComponentScan ;
1011import org .springframework .jdbc .core .JdbcTemplate ;
1112import org .springframework .jdbc .core .RowMapper ;
1213
1314@ SpringBootApplication
15+ @ ComponentScan ("com.baeldung.h2.client" )
1416public class ClientSpringBootApp {
1517
1618 @ Autowired
Original file line number Diff line number Diff line change 1- package com .baeldung .h2db . demo ;
1+ package com .baeldung .h2 . server ;
22
33import java .sql .ResultSet ;
44import java .sql .SQLException ;
99import org .springframework .boot .SpringApplication ;
1010import org .springframework .boot .autoconfigure .SpringBootApplication ;
1111import org .springframework .context .annotation .Bean ;
12+ import org .springframework .context .annotation .ComponentScan ;
1213import org .springframework .jdbc .core .JdbcTemplate ;
1314import org .springframework .jdbc .core .RowMapper ;
1415
1516@ SpringBootApplication
17+ @ ComponentScan ("com.baeldung.h2.server" )
1618public class SpringBootApp {
1719
1820 @ Autowired
Original file line number Diff line number Diff line change 11spring.jpa.show-sql =true
2- spring.jpa.hibernate.ddl-auto =none
2+ spring.jpa.hibernate.ddl-auto =none
3+
4+
5+ spring.datasource.url =jdbc:h2:tcp://localhost:9091/mem:mydb
6+ spring.datasource.driverClassName =org.h2.Driver
7+ spring.datasource.username =sa
8+ spring.datasource.password =
You can’t perform that action at this time.
0 commit comments