Skip to content

Commit

Permalink
http
Browse files Browse the repository at this point in the history
  • Loading branch information
sim-wangyan committed Mar 13, 2024
1 parent 3c76123 commit d03558c
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@

import io.xream.acku.bean.dto.AckuDto;
import io.xream.acku.bean.dto.ConsumedAckuDto;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.service.annotation.HttpExchange;
import org.springframework.web.service.annotation.PostExchange;


/**
Expand All @@ -28,19 +30,19 @@
@HttpExchange("http://${acku.app}/message" )
public interface AckuServiceRemote {

@RequestMapping("/create")
AckuDto create(AckuDto dto);
@PostExchange("/create")
AckuDto create(@RequestBody AckuDto dto);

@RequestMapping("/produce")
boolean produce(AckuDto dto);
@PostExchange("/produce")
boolean produce(@RequestBody AckuDto dto);

@RequestMapping("/consume")
boolean consume(ConsumedAckuDto dto);
@PostExchange("/consume")
boolean consume(@RequestBody ConsumedAckuDto dto);

@RequestMapping("/tryToConfirm")
@PostExchange("/tryToConfirm")
boolean tryToConfirm(String msgId);

@RequestMapping("/cancel")
@PostExchange("/cancel")
boolean cancel(String msgId);

}
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package io.xream.acku.remote.acku;

import io.xream.acku.bean.entity.AckuMessage;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.service.annotation.GetExchange;
import org.springframework.web.service.annotation.HttpExchange;

import java.util.List;
Expand All @@ -15,16 +17,16 @@
public interface FailedServiceRemote {


@RequestMapping(value = "/find", method = RequestMethod.GET)
@GetExchange(value = "/find")
List<AckuMessage> findFailed();

@RequestMapping(value = "/find/{topic}", method = RequestMethod.GET)
List<AckuMessage> findFailedByTopic();
@GetExchange(value = "/find/{topic}")
List<AckuMessage> findFailedByTopic(@PathVariable("topic") String topic);

@RequestMapping(value = "/retryAll", method = RequestMethod.GET)
@GetExchange(value = "/retryAll")
boolean retryAll();

@RequestMapping(value = "/retry/{messageId}", method = RequestMethod.GET)
boolean retry(String messageId);
@GetExchange(value = "/retry/{messageId}")
boolean retry(@PathVariable("messageId") String messageId);

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.service.annotation.GetExchange;
import org.springframework.web.service.annotation.HttpExchange;

/**
Expand All @@ -26,6 +27,6 @@
@HttpExchange("http://${acku.dashboard.authorization.url.server}" )
public interface AuthorizationServiceRemote {

@RequestMapping(value = "/{token}/{userId}", method = RequestMethod.GET)
@GetExchange(value = "/{token}/{userId}")
boolean verify(String token, String userId);
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
import io.xream.acku.bean.entity.AckuMessage;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.service.annotation.GetExchange;
import org.springframework.web.service.annotation.HttpExchange;
import org.springframework.web.service.annotation.PostExchange;

import java.util.List;

Expand All @@ -30,18 +32,18 @@
public interface ScheduledAckuServiceRemote {


@RequestMapping(value = "/retry")
@PostExchange(value = "/retry")
boolean retry(AckuMessage message);

@RequestMapping(value = "/listForRetry", method = RequestMethod.GET)
@GetExchange(value = "/listForRetry")
List<AckuMessage> listForRetry();

@RequestMapping(value = "/tryToFinish",method = RequestMethod.GET)
@GetExchange(value = "/tryToFinish")
boolean tryToFinish();

@RequestMapping(value = "/tryToProduceNext",method = RequestMethod.GET)
@GetExchange(value = "/tryToProduceNext")
boolean tryToProduceNext();

@RequestMapping(value = "/clean",method = RequestMethod.GET)
@GetExchange(value = "/clean")
boolean clean();
}
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.compilerVersion>17</maven.compiler.compilerVersion>
<maven.test.skip>true</maven.test.skip>
<x7.boot.version>3.1.6</x7.boot.version>
<x7.boot.version>3.1.7</x7.boot.version>
</properties>

<modules>
Expand Down Expand Up @@ -70,7 +70,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>3.1.5</version>
<version>3.2.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -141,7 +141,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<version>3.1.0</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand Down

0 comments on commit d03558c

Please sign in to comment.