mitao
2025-02-21 31573d6180d15ef65ed0df9c2732495f40b12663
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package com.springcloud.serviceapi.controller;
 
 
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
@RestController
@RefreshScope
@RequestMapping("/user")
public class ApiController {
 
    @RequestMapping("/me")
    public String showme(){
        return "I'm in! new Api server";
    }
 
    @Value("${common.db_driver}")
    String db_driver;
 
    @RequestMapping(value = "/hi")
    public String hi(){
        return db_driver;
    }
    
 
 
}