随笔分类 -  spring boot

摘要:elasticsearch.wh.clusterName=whELK elasticsearch.wh.userName= elasticsearch.wh.password= elasticsearch.wh.rest.hostNames=192.168.1.130 elasticsearch.w 阅读全文
posted @ 2020-05-07 09:02 qwer78 阅读(108) 评论(0) 推荐(0)
摘要:#database1 spring.datasource.wh.type=com.zaxxer.hikari.HikariDataSource spring.datasource.wh.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasou 阅读全文
posted @ 2020-05-07 08:57 qwer78 阅读(90) 评论(0) 推荐(0)
摘要:如: @Resource(name = "redisTemplate") private HashOperations hash; redisTemplate并不是HashOperations的实现类,这两个类在继承上也没任何关系。 原因就在于 doGetBean()的一部分代码 // Check 阅读全文
posted @ 2019-11-07 08:41 qwer78 阅读(108) 评论(0) 推荐(0)
摘要:import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.geo.*; import org.springframework.data.redis.connection 阅读全文
posted @ 2019-10-21 10:15 qwer78 阅读(28) 评论(0) 推荐(0)
摘要:1.配置 #第一数据源 spring.datasource.primary.jdbc-url=jdbc:sqlserver://192.168.1.159\\aaa:1433;database=dataserver spring.datasource.primary.username=sa spri 阅读全文
posted @ 2019-08-30 18:01 qwer78 阅读(95) 评论(0) 推荐(0)
摘要:org.thymeleaf.exceptions.TemplateInputException: Error resolving template “user/login”, template might not exist or might not be accessible by any of 阅读全文
posted @ 2019-04-19 09:07 qwer78 阅读(74) 评论(0) 推荐(0)
摘要:1.获取激活的环境值 import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; @Component public class Propert 阅读全文
posted @ 2019-04-11 09:24 qwer78 阅读(115) 评论(0) 推荐(0)
摘要:自行添加 jwt与shiro依赖 1.jwt工具包 import io.jsonwebtoken.Claims; import io.jsonwebtoken.JwtBuilder; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.Signat 阅读全文
posted @ 2019-04-09 17:02 qwer78 阅读(29) 评论(0) 推荐(0)
摘要:set注入失败 构造器注入成功 @Component @Slf4j public class UserCookieInfoUtil { private static RedisTemplate<String, String> redisTemplate; private static JWTUtil 阅读全文
posted @ 2018-11-29 11:10 qwer78 阅读(215) 评论(0) 推荐(0)
摘要:<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-elasticsearch</artifactId> <version>${spring.boot.versio 阅读全文
posted @ 2018-11-07 15:57 qwer78 阅读(65) 评论(0) 推荐(0)
摘要:<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-quartz</artifactId> </dependency> import org.quartz.Scheduler 阅读全文
posted @ 2018-10-08 09:45 qwer78 阅读(47) 评论(0) 推荐(0)
摘要:String id = null; try {SearchRequest request = new SearchRequest(IndexAndTypeConstant.PROPERTY_SQL); request.types(IndexAndTypeConstant.PROPERTY_SQL_T 阅读全文
posted @ 2018-08-29 16:11 qwer78 阅读(139) 评论(0) 推荐(0)
摘要:1 自定义citycode.properties #List properties citycode.list[0]=www citycode.list[1]=localhost citycode.list[2]=wuhan citycode.list[3]=tianjin #Map Propert 阅读全文
posted @ 2018-08-17 16:33 qwer78 阅读(406) 评论(0) 推荐(0)
摘要:我用的2.6.0版本 <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-pool2</artifactId> </dependency> import org.apache.commons.pool2.imp 阅读全文
posted @ 2018-08-16 10:25 qwer78 阅读(163) 评论(0) 推荐(0)
摘要:@Bean LettuceConnectionFactory lettuceConnectionFactory() { RedisStandaloneConfiguration redisStandaloneConfiguration = new RedisStandaloneConfigurati 阅读全文
posted @ 2018-08-13 14:54 qwer78 阅读(2542) 评论(0) 推荐(0)
摘要:<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-websocket</artifactId> </dependency> package cc.datebook.sock 阅读全文
posted @ 2018-07-11 17:43 qwer78 阅读(66) 评论(0) 推荐(0)
摘要:<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-websocket</artifactId> </dependency> import org.springframewo 阅读全文
posted @ 2018-07-11 16:11 qwer78 阅读(32) 评论(0) 推荐(0)
摘要:@Bean JedisConnectionFactory jedisConnectionFactory() { RedisStandaloneConfiguration redisStandaloneConfiguration = new RedisStandaloneConfiguration ( 阅读全文
posted @ 2018-06-26 17:26 qwer78 阅读(350) 评论(0) 推荐(0)
摘要:这样配置多个, @Bean(name = “redisKeyDatabase”)别设置一样就行 package cc.aaa.config; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.ja 阅读全文
posted @ 2018-05-14 16:46 qwer78 阅读(43) 评论(0) 推荐(0)
摘要:redis多数据源 import cc.datebook.common.JsonResult; import cc.datebook.entity.BookInfo; import cc.datebook.enums.ResultCode; import cc.datebook.service.Bo 阅读全文
posted @ 2018-04-23 16:45 qwer78 阅读(378) 评论(0) 推荐(0)