File tree Expand file tree Collapse file tree 7 files changed +46
-43
lines changed
Expand file tree Collapse file tree 7 files changed +46
-43
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ plugins {
2+ java
3+ id(" idea" )
4+ id(" eclipse" )
5+ id(" org.springframework.boot" ) version " 3.5.0"
6+ id(" io.spring.dependency-management" ) version " 1.1.7"
7+ }
8+
9+ repositories {
10+ mavenLocal()
11+ mavenCentral()
12+ }
13+
14+ java {
15+ sourceCompatibility = JavaVersion .VERSION_17
16+ targetCompatibility = JavaVersion .VERSION_17
17+
18+ toolchain {
19+ languageVersion = JavaLanguageVersion .of(21 )
20+ vendor = JvmVendorSpec .ADOPTIUM
21+ }
22+ }
23+
24+
25+ dependencies {
26+ implementation(" org.springframework.boot:spring-boot-starter-web" )
27+ implementation(" org.springframework.boot:spring-boot-starter-data-jdbc" )
28+
29+ // Database
30+ runtimeOnly(" com.h2database:h2" )
31+
32+ // Testing
33+ testImplementation(" org.springframework.boot:spring-boot-starter-test" )
34+ }
Original file line number Diff line number Diff line change 11distributionBase =GRADLE_USER_HOME
22distributionPath =wrapper/dists
3- distributionUrl =https\://services.gradle.org/distributions/gradle-6.5 -all.zip
3+ distributionUrl =https\://services.gradle.org/distributions/gradle-8.14 -all.zip
44zipStoreBase =GRADLE_USER_HOME
55zipStorePath =wrapper/dists
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ rootProject.name = " spring"
Original file line number Diff line number Diff line change 33import org .springframework .context .annotation .Configuration ;
44import org .springframework .web .servlet .config .annotation .CorsRegistry ;
55import org .springframework .web .servlet .config .annotation .EnableWebMvc ;
6- import org .springframework .web .servlet .config .annotation .WebMvcConfigurerAdapter ;
6+ import org .springframework .web .servlet .config .annotation .WebMvcConfigurer ;
77
88@ Configuration
99@ EnableWebMvc
10- public class WebConfig extends WebMvcConfigurerAdapter {
10+ public class WebConfig implements WebMvcConfigurer {
1111
1212 @ Override
1313 public void addCorsMappings (CorsRegistry registry ) {
1414 registry .addMapping ("/**" );
1515 }
16- }
16+ }
Original file line number Diff line number Diff line change 1+ server.port =3001
12spring.h2.console.enabled =true
3+
24spring.datasource.name =minicom
5+ spring.datasource.username =sa
6+ spring.datasource.password =
7+ spring.datasource.url =jdbc:h2:file:./minicom.db; DB_CLOSE_ON_EXIT=FALSE;IFEXISTS=FALSE;DB_CLOSE_DELAY=-1;
38spring.datasource.driverClassName =org.h2.Driver
49
5- spring.datasource.initialize =false
6- spring.datasource.url =jdbc:h2:file:~/minicom; DB_CLOSE_ON_EXIT=FALSE;IFEXISTS=FALSE;DB_CLOSE_DELAY=-1;
7-
8- spring.jpa.hibernate.ddl-auto = update
9- server.port =3000
10+ spring.sql.init.mode =always
11+ spring.sql.init.schema-locations =classpath:schema.sql
You can’t perform that action at this time.
0 commit comments