renamed packages.
This commit is contained in:
parent
41fdaf8484
commit
7feb7bf9d8
|
@ -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>
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.baeldung.port;
|
||||
|
||||
import com.ajay.documentservice.domain.Document;
|
||||
import com.baeldung.domain.Document;
|
||||
|
||||
public interface DocumentService {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import org.springframework.test.context.junit4.SpringRunner;
|
|||
|
||||
@SpringBootTest
|
||||
@RunWith(SpringRunner.class)
|
||||
class ApplicationTests {
|
||||
class ApplicationUnitTest {
|
||||
|
||||
@Test
|
||||
public void contextLoads() {
|
Loading…
Reference in New Issue