merge
This commit is contained in:
@@ -30,16 +30,15 @@ public class RedisStartupInit implements InitializingBean {
|
||||
*/
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
logger.info("redis has been start");
|
||||
System.out.println("启动执行方法======刷新缓存==================");
|
||||
logger.info("redis启动===========执行方法======刷新缓存==================");
|
||||
redisService.set("test", "插入数据成功");
|
||||
logger.info("redis获取测试数据:{}",redisService.get("test"));
|
||||
logger.info("redis获取测试数据:{}===============================",redisService.get("test"));
|
||||
redisService.del("xwb");
|
||||
boolean exists = redisService.exists("xwb");
|
||||
logger.info("redis测试成功:{}",!exists);
|
||||
logger.info("redis测试成功:{}=================================",!exists);
|
||||
Set<String> set = redisService.keys(redisCode + "*");
|
||||
set.forEach(keyStr -> {
|
||||
logger.info("删除缓存名称=={}",keyStr);
|
||||
logger.info("删除缓存名称:{}===========================",keyStr);
|
||||
redisService.delInit(keyStr);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
redisCode=springboot-
|
||||
redisCode=springboot_
|
||||
systemCode=dataCenter_single
|
||||
@@ -2,7 +2,6 @@ package com.xwbing;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.web.support.SpringBootServletInitializer;
|
||||
|
||||
/**
|
||||
* 项目名称: boot-module-demo
|
||||
@@ -14,7 +13,7 @@ import org.springframework.boot.web.support.SpringBootServletInitializer;
|
||||
//@Configuration 定义为配置类,相当于xml文件中的<beans></beans>
|
||||
//@ComponentScan 组件扫描
|
||||
//@EnableAutoConfiguration 借助@Import的帮助,将所有符合自动配置条件的bean定义加载到IoC容器
|
||||
public class Application extends SpringBootServletInitializer {
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(Application.class, args);
|
||||
|
||||
@@ -6,6 +6,7 @@ import org.springframework.boot.web.support.SpringBootServletInitializer;
|
||||
public class ServletInitializer extends SpringBootServletInitializer {
|
||||
/**
|
||||
* 注册启动类Application。外部web应用服务器构建ApplicationContext的时候,会把启动类添加进去。
|
||||
*
|
||||
* @param application
|
||||
* @return
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user