Skip to content

Commit

Permalink
修改spring兼容性问题
Browse files Browse the repository at this point in the history
  • Loading branch information
entropy-cloud committed Dec 16, 2023
1 parent d2f53ad commit dd4c373
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
27 changes: 26 additions & 1 deletion nop-demo/nop-rpc-server-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,35 @@
<artifactId>spring-boot-starter-web</artifactId>
</dependency>


<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
<version>1.7.30</version>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.9</version>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.2.9</version>
</dependency>

<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</dependency>

<dependency>
<groupId>io.github.entropy-cloud</groupId>
<artifactId>nop-api-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@
*/
package spring.test;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.QueryParam;

@RestController
public class EchoService {
@PostMapping(value = "/echo/{id}")
public String echo(@QueryParam("msg") String msg, @PathParam("id") String id) {
public String echo(@RequestParam("msg") String msg, @PathVariable("id") String id) {
return "Hello Nacos Discovery " + msg + ",id=" + id;
}
}

0 comments on commit dd4c373

Please sign in to comment.