sudo wget http://download.redis.io/releases/redis-3.2.6.tar.gz
#redis redis.host=192.168.31.168 redis.port=6379 redis.password=123456
@SpringBootApplication
@ImportResource({"classpath*:redis-client.xml"})
public class LiosBootApplication extends WebMvcConfigurerAdapter {
public static void main(String[] args) {
SpringApplication.run(LiosBootApplication.class, args);
}
}
@RestController
public class HelloController {
@Autowired
RedisClient redisClient;
@PostMapping(value = "/lios/boot/ok",produces = {"application/json;charset=utf-8"})
public void ok(UserParam param){
redisClient.set("xxxxx","lios");
String a = redisClient.get("xxxxx");
}
}