renamed packages.

This commit is contained in:
ajay74984 2020-02-12 17:15:44 +01:00
parent 41fdaf8484
commit 7feb7bf9d8
9 changed files with 31 additions and 26 deletions

View File

@ -24,12 +24,6 @@
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.12</version>
</dependency>
</dependencies>
<build>

View File

@ -4,10 +4,10 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class DocumentserviceApplication {
public class Application {
public static void main(String[] args) {
SpringApplication.run(DocumentserviceApplication.class, args);
SpringApplication.run(Application.class, args);
}
}

View File

@ -1,9 +1,10 @@
package com.baeldung.adapter;
import com.ajay.documentservice.domain.Document;
import com.ajay.documentservice.port.DocumentRepo;
import org.springframework.stereotype.Repository;
import com.baeldung.domain.Document;
import com.baeldung.port.DocumentRepo;
import java.util.HashMap;
import java.util.Map;

View File

@ -1,10 +1,12 @@
package com.baeldung.adapter;
import com.ajay.documentservice.domain.Document;
import com.ajay.documentservice.port.DocumentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.baeldung.domain.Document;
import com.baeldung.port.DocumentService;
@RestController
@RequestMapping("/doc")
public class DocumentRestAdapter {

View File

@ -1,13 +1,21 @@
package com.baeldung.domain;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@Data
@AllArgsConstructor
@Builder
public class Document {
private String id;
private String data;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getData() {
return data;
}
public void setData(String data) {
this.data = data;
}
}

View File

@ -1,7 +1,6 @@
package com.baeldung.port;
import com.ajay.documentservice.domain.Document;
import com.baeldung.domain.Document;
public interface DocumentRepo {
void storeDocument(Document document);

View File

@ -1,6 +1,6 @@
package com.baeldung.port;
import com.ajay.documentservice.domain.Document;
import com.baeldung.domain.Document;
public interface DocumentService {

View File

@ -1,11 +1,12 @@
package com.baeldung.port.impl;
import com.ajay.documentservice.domain.Document;
import com.ajay.documentservice.port.DocumentRepo;
import com.ajay.documentservice.port.DocumentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baeldung.domain.Document;
import com.baeldung.port.DocumentRepo;
import com.baeldung.port.DocumentService;
@Service
public class DocumentServiceImpl implements DocumentService {

View File

@ -7,7 +7,7 @@ import org.springframework.test.context.junit4.SpringRunner;
@SpringBootTest
@RunWith(SpringRunner.class)
class ApplicationTests {
class ApplicationUnitTest {
@Test
public void contextLoads() {