Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
RustamKuramshin committed Mar 30, 2023
1 parent 8096e65 commit bd66efa
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,4 @@ Temporary Items

/db_data/
/.idea/httpRequests/
/data/
16 changes: 16 additions & 0 deletions .run/companies.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="companies" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
<option name="ACTIVE_PROFILES" value="h2" />
<module name="com.zen-code.companies-data-rest.main" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.zencode.companiesdatarest.CompaniesDataRestApplication" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="com.zencode.companiesdatarest.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ repositories {
}

dependencies {
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-data-rest")
implementation("org.springframework.boot:spring-boot-starter-validation")
Expand All @@ -35,6 +34,7 @@ dependencies {
compileOnly("org.projectlombok:lombok")
runtimeOnly("io.micrometer:micrometer-registry-prometheus")
runtimeOnly("org.postgresql:postgresql")
runtimeOnly("com.h2database:h2")

// QueryDSL
annotationProcessor("com.querydsl:querydsl-apt:5.0.0:general")
Expand Down
35 changes: 35 additions & 0 deletions src/main/resources/application-h2.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
server.port=8080
spring.application.name=companies-api

# Hibernate
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql=true
spring.jpa.properties.hibernate.jdbc.batch_size=500

# Spring Data JPA
spring.datasource.url=jdbc:h2:file:./data/persons
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=password
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect

# connection path jdbc:h2:/Users/zen/IdeaProjects/companies-data-rest/data/persons
spring.h2.console.enabled=true

spring.sql.init.encoding=UTF-8
spring.liquibase.enabled=false
#spring.liquibase.change-log=classpath:db/changelog/db.changelog-master.xml

# Logging
logging.level.org.hibernate.SQL=DEBUG
logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
#logging.level.root=DEBUG

# Spring Data Rest
spring.data.rest.return-body-on-create=true
spring.data.rest.return-body-on-update=true
#spring.data.rest.base-path=/api/v1
#spring.data.rest.default-page-size=2147483647
#spring.data.rest.max-page-size=2147483647

0 comments on commit bd66efa

Please sign in to comment.