Skip to content
Snippets Groups Projects
Commit 83b10025 authored by Martin Weise's avatar Martin Weise
Browse files

maven problems

parent 2db3ac49
No related branches found
No related tags found
No related merge requests found
Showing
with 138 additions and 38 deletions
package api.dto.container; package at.tuwien.api.dto.container;
public enum ContainerActionTypeDto { public enum ContainerActionTypeDto {
START, STOP, REMOVE START, STOP, REMOVE
......
package api.dto.container; package at.tuwien.api.dto.container;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
......
package api.dto.container; package at.tuwien.api.dto.container;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
......
package api.dto.container; package at.tuwien.api.dto.container;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
......
package api.dto.container; package at.tuwien.api.dto.container;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
......
package api.dto.database; package at.tuwien.api.dto.database;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
......
package api.dto.database; package at.tuwien.api.dto.database;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
......
package api.dto.database; package at.tuwien.api.dto.database;
import lombok.Builder; import lombok.Builder;
import lombok.Getter; import lombok.Getter;
......
...@@ -2,27 +2,30 @@ ...@@ -2,27 +2,30 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
<modules>
<module>rest-service</module>
<module>api</module>
<module>services</module>
</modules>
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.4.RELEASE</version> <version>2.3.4.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent> </parent>
<groupId>at.tuwien</groupId> <groupId>at.tuwien</groupId>
<artifactId>fda-container-managing-service</artifactId> <artifactId>fda-container-managing-service</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<name>fda-container-managing-service</name> <name>fda-container-managing-service</name>
<description>Demo project for Spring Boot</description> <description>Demo project for Spring Boot</description>
<packaging>pom</packaging>
<modules>
<module>rest-service</module>
<module>api</module>
<module>services</module>
</modules>
<properties> <properties>
<java.version>11</java.version> <java.version>11</java.version>
<spring-cloud.version>Hoxton.SR8</spring-cloud.version> <spring-cloud.version>Hoxton.SR8</spring-cloud.version>
<mapstruct.version>1.4.2.Final</mapstruct.version>
<mainClass>at.tuwien.FdaContainerManagingApplication</mainClass>
</properties> </properties>
<dependencies> <dependencies>
......
...@@ -17,4 +17,13 @@ ...@@ -17,4 +17,13 @@
<maven.compiler.target>11</maven.compiler.target> <maven.compiler.target>11</maven.compiler.target>
</properties> </properties>
<dependencies>
<dependency>
<groupId>at.tuwien</groupId>
<artifactId>services</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project> </project>
\ No newline at end of file
package at.tuwien;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import springfox.documentation.swagger2.annotations.EnableSwagger2; import springfox.documentation.swagger2.annotations.EnableSwagger2;
@SpringBootApplication @SpringBootApplication
@ComponentScan(basePackages = "entities") @EnableJpaAuditing
@ComponentScan(basePackages = {"at.tuwien"})
@EnableJpaRepositories(basePackages = {"at.tuwien.repositories"})
@EntityScan(basePackages = {"at.tuwien.entities"})
@EnableSwagger2 @EnableSwagger2
public class FdaContainerManagingApplication { public class FdaContainerManagingApplication {
......
package config; package at.tuwien.config;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
...@@ -26,7 +26,7 @@ public class SwaggerConfig { ...@@ -26,7 +26,7 @@ public class SwaggerConfig {
private ApiInfo apiInfo() { private ApiInfo apiInfo() {
return new ApiInfo("FDA-Container-Managing API", return new ApiInfo("FDA-Container-Managing API",
"Docker service that can manage Docker services", "Docker at.tuwien.service that can manage Docker services",
"1.0", "1.0",
null, null,
new Contact("Martin Weise", "https://informatics.tuwien.ac.at/people/martin-weise", "martin.weise@tuwien.ac.at"), new Contact("Martin Weise", "https://informatics.tuwien.ac.at/people/martin-weise", "martin.weise@tuwien.ac.at"),
......
package endpoints; package at.tuwien.endpoints;
import api.dto.container.ContainerActionTypeDto; import at.tuwien.api.dto.container.ContainerActionTypeDto;
import api.dto.container.DatabaseContainerBriefDto; import at.tuwien.api.dto.container.DatabaseContainerBriefDto;
import api.dto.container.DatabaseContainerDto; import at.tuwien.api.dto.container.DatabaseContainerDto;
import api.dto.database.CreateDatabaseContainerDto; import at.tuwien.api.dto.database.CreateDatabaseContainerDto;
import api.dto.database.CreateDatabaseResponseDto; import at.tuwien.api.dto.database.CreateDatabaseResponseDto;
import at.tuwien.entities.DatabaseContainer;
import at.tuwien.mapper.DatabaseContainerMapper;
import at.tuwien.service.ContainerService;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import services.entities.DatabaseContainer;
import services.mapper.DatabaseContainerMapper;
import services.service.ContainerService;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
......
...@@ -19,7 +19,7 @@ spring: ...@@ -19,7 +19,7 @@ spring:
loadbalancer.ribbon.enabled: false loadbalancer.ribbon.enabled: false
server.port: 9091 server.port: 9091
logging: logging:
pattern.console: %d %highlight(%-5level) %msg%n pattern.console: "%d %highlight(%-5level) %msg%n"
level: level:
root: warn root: warn
at.: info at.: info
......
spring: spring:
main.banner-mode: off
datasource: datasource:
url: jdbc:postgresql://localhost:5432/fda url: jdbc:postgresql://localhost:5432/fda
driver-class-name: org.postgresql.Driver driver-class-name: org.postgresql.Driver
...@@ -8,12 +9,17 @@ spring: ...@@ -8,12 +9,17 @@ spring:
show-sql: true show-sql: true
properties: properties:
hibernate: hibernate:
ddl-auto: update ddl-auto: create-drop
dialect: org.hibernate.dialect.PostgreSQLDialect dialect: org.hibernate.dialect.PostgreSQLDialect
hibernate.ddl-auto: none hibernate.ddl-auto: none
hibernate.show-sql: true hibernate.show-sql: true
application: application:
name: fda-container-managing name: fda-container-managing
server.port: 9091 server.port: 9091
logging:
pattern.console: "%d %highlight(%-5level) %msg%n"
level:
root: warn
at.: debug
eureka: eureka:
client.serviceUrl.defaultZone: http://localhost:9090/eureka/ client.serviceUrl.defaultZone: http://localhost:9090/eureka/
\ No newline at end of file
...@@ -3,14 +3,6 @@ ...@@ -3,14 +3,6 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<dependencies>
<dependency>
<groupId>at.tuwien</groupId>
<artifactId>api</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
<parent> <parent>
<groupId>at.tuwien</groupId> <groupId>at.tuwien</groupId>
<artifactId>fda-container-managing-service</artifactId> <artifactId>fda-container-managing-service</artifactId>
...@@ -25,4 +17,13 @@ ...@@ -25,4 +17,13 @@
<maven.compiler.target>11</maven.compiler.target> <maven.compiler.target>11</maven.compiler.target>
</properties> </properties>
<dependencies>
<dependency>
<groupId>at.tuwien</groupId>
<artifactId>api</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project> </project>
\ No newline at end of file
package config; package at.tuwien.config;
import com.github.dockerjava.api.DockerClient; import com.github.dockerjava.api.DockerClient;
import com.github.dockerjava.core.DefaultDockerClientConfig; import com.github.dockerjava.core.DefaultDockerClientConfig;
......
package at.tuwien.entities;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import javax.persistence.*;
import java.time.Instant;
@Data
@EqualsAndHashCode(onlyExplicitlyIncluded = true)
@ToString(onlyExplicitlyIncluded = true)
@MappedSuperclass
@EntityListeners(AuditingEntityListener.class)
public abstract class Auditable {
@Id
@EqualsAndHashCode.Include
@ToString.Include
@GeneratedValue(generator = "sequence-per-entity")
@GenericGenerator(
name = "sequence-per-entity",
strategy = "enhanced-sequence",
parameters = @Parameter(name = "prefer_sequence_per_entity", value = "true")
)
private Long id;
@Column(nullable = false, updatable = false)
@CreatedDate
private Instant created;
@Column
@LastModifiedDate
private Instant lastModified;
}
\ No newline at end of file
package at.tuwien.entities;
import lombok.*;
import javax.persistence.Column;
import javax.persistence.Entity;
import java.time.Instant;
@Entity
@EqualsAndHashCode(callSuper = true, onlyExplicitlyIncluded = true)
@ToString(callSuper = true, onlyExplicitlyIncluded = true)
public class DatabaseContainer extends Auditable{
@Column(nullable = false)
private String containerId;
@Column(nullable = false)
private Instant containerCreated;
@Column(nullable = false)
private String containerName;
@Column(nullable = false)
private String databaseName;
@Column
private String status;
@Column
private String ipAddress;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment