diff --git a/hai-msg/src/main/java/com/MsgApplication.java b/hai-msg/src/main/java/com/MsgApplication.java index ae0bfa1b..7f30ce53 100644 --- a/hai-msg/src/main/java/com/MsgApplication.java +++ b/hai-msg/src/main/java/com/MsgApplication.java @@ -1,5 +1,7 @@ package com; +import com.alicp.jetcache.anno.config.EnableCreateCacheAnnotation; +import com.alicp.jetcache.anno.config.EnableMethodCache; import com.hai.common.utils.SpringContextUtil; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; @@ -11,11 +13,12 @@ import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.transaction.annotation.EnableTransactionManagement; @SpringBootApplication -// @ComponentScan +//@ComponentScan @EnableTransactionManagement @EnableScheduling +@EnableMethodCache(basePackages = "com.hai") +@EnableCreateCacheAnnotation @ServletComponentScan -@EnableAspectJAutoProxy(proxyTargetClass = true) @MapperScan("com.hai.dao") public class MsgApplication { diff --git a/hai-msg/src/main/resources/dev/application.yml b/hai-msg/src/main/resources/dev/application.yml index 3828365e..b0380cc4 100644 --- a/hai-msg/src/main/resources/dev/application.yml +++ b/hai-msg/src/main/resources/dev/application.yml @@ -39,6 +39,25 @@ spring: max-wait: -1 max-idle: 10 min-idle: 0 + #MQTT配置信息 + mqtt: + #MQTT服务地址 + url: ws://139.159.177.244:8083/mqtt + #用户名 + username: printer_provider + #密码 + password: 123654 + #客户端id(不能重复) + # client: + # id: provider-id + #MQTT默认的消息推送主题,实际可在调用接口是指定 + # default: + # topic: topic +rocketmq: + name-server: 139.159.177.244:9876 + producer: + #必须指定group + group: default-group #配置日期返回至前台为时间戳 jackson: serialization: @@ -49,6 +68,28 @@ mybatis: type-aliases-package: org.springboot.sample.entity +jetcache: + statIntervalMinutes: 15 + areaInCacheName: false + local: + default: + type: linkedhashmap + keyConvertor: fastjson + remote: + default: + type: redis + host: 139.159.177.244 + port: 36379 + password: HF123456.Redis + keyConvertor: fastjson + broadcastChannel: projectA + valueEncoder: java + valueDecoder: java + poolConfig: + minIdle: 5 + maxIdle: 20 + maxTotal: 50 + pagehelper: helperDialect: mysql reasonable: true