renamed packages.
This commit is contained in:
parent
41fdaf8484
commit
7feb7bf9d8
@ -24,12 +24,6 @@
|
|||||||
<artifactId>spring-boot-starter-test</artifactId>
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.projectlombok</groupId>
|
|
||||||
<artifactId>lombok</artifactId>
|
|
||||||
<version>1.18.12</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
@ -4,10 +4,10 @@ import org.springframework.boot.SpringApplication;
|
|||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class DocumentserviceApplication {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(DocumentserviceApplication.class, args);
|
SpringApplication.run(Application.class, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
package com.baeldung.adapter;
|
package com.baeldung.adapter;
|
||||||
|
|
||||||
import com.ajay.documentservice.domain.Document;
|
|
||||||
import com.ajay.documentservice.port.DocumentRepo;
|
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.baeldung.domain.Document;
|
||||||
|
import com.baeldung.port.DocumentRepo;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
package com.baeldung.adapter;
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import com.baeldung.domain.Document;
|
||||||
|
import com.baeldung.port.DocumentService;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/doc")
|
@RequestMapping("/doc")
|
||||||
public class DocumentRestAdapter {
|
public class DocumentRestAdapter {
|
||||||
|
@ -1,13 +1,21 @@
|
|||||||
package com.baeldung.domain;
|
package com.baeldung.domain;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@AllArgsConstructor
|
|
||||||
@Builder
|
|
||||||
public class Document {
|
public class Document {
|
||||||
private String id;
|
private String id;
|
||||||
private String data;
|
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;
|
package com.baeldung.port;
|
||||||
|
|
||||||
|
import com.baeldung.domain.Document;
|
||||||
import com.ajay.documentservice.domain.Document;
|
|
||||||
|
|
||||||
public interface DocumentRepo {
|
public interface DocumentRepo {
|
||||||
void storeDocument(Document document);
|
void storeDocument(Document document);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.baeldung.port;
|
package com.baeldung.port;
|
||||||
|
|
||||||
import com.ajay.documentservice.domain.Document;
|
import com.baeldung.domain.Document;
|
||||||
|
|
||||||
public interface DocumentService {
|
public interface DocumentService {
|
||||||
|
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
package com.baeldung.port.impl;
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.baeldung.domain.Document;
|
||||||
|
import com.baeldung.port.DocumentRepo;
|
||||||
|
import com.baeldung.port.DocumentService;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class DocumentServiceImpl implements DocumentService {
|
public class DocumentServiceImpl implements DocumentService {
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import org.springframework.test.context.junit4.SpringRunner;
|
|||||||
|
|
||||||
@SpringBootTest
|
@SpringBootTest
|
||||||
@RunWith(SpringRunner.class)
|
@RunWith(SpringRunner.class)
|
||||||
class ApplicationTests {
|
class ApplicationUnitTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void contextLoads() {
|
public void contextLoads() {
|
Loading…
x
Reference in New Issue
Block a user