Начало

This commit is contained in:
DyCTaTOR 2024-04-28 16:58:18 +04:00
parent cf3f1f3758
commit f32685f332
9 changed files with 30 additions and 21 deletions

View File

@ -16,8 +16,13 @@ repositories {
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0'
implementation 'org.modelmapper:modelmapper:3.2.0'
implementation 'org.postgresql-postgresql-runtime'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
}
tasks.named('test') {

View File

@ -1,4 +1,4 @@
package com.example.demo.core.configuration;
package com.example.autoservice.core.configuration;
public class Constants {
public static final String SEQUENCE_NAME = "hibernate_sequence";

View File

@ -1,4 +1,4 @@
package com.example.demo.core.configuration;
package com.example.autoservice.core.configuration;
import org.modelmapper.ModelMapper;
import org.springframework.context.annotation.Bean;

View File

@ -1,4 +1,4 @@
package com.example.demo.core.configuration;
package com.example.autoservice.core.configuration;
import org.springframework.context.annotation.Configuration;
import org.springframework.lang.NonNull;

View File

@ -1,4 +1,4 @@
package com.example.demo.core.error;
package com.example.autoservice.core.error;
public class NotFoundException extends RuntimeException {
public <T> NotFoundException(Class<T> clazz, Long id) {

View File

@ -1,6 +1,6 @@
package com.example.demo.core.model;
package com.example.autoservice.core.model;
import com.example.demo.core.configuration.Constants;
import com.example.autoservice.core.configuration.Constants;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;

View File

@ -1 +1,7 @@
spring.application.name=autoservice
spring.datasource.url=jdbc:postgresql://localhost:5432/autoservice
spring.datasource.username=postgres
spring.datasource.password=postgres
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.hibernate.ddl-auto=update

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Clients</title>
</head>
<body>
<h1>CLIENTS</h1>
</body>
</html>

View File

@ -1,13 +0,0 @@
package com.example.autoservice;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class AutoserviceApplicationTests {
@Test
void contextLoads() {
}
}