![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
springboot
左边有只汪
程序员中的小欻欻
展开
-
SpringBoot自定义校验注解校验日期时间格式字符串
先定义一个注解@Target({ElementType.FIELD, ElementType.PARAMETER})@Retention(RetentionPolicy.RUNTIME)@Constraint(validatedBy = DateTimeStrValidator.class)public @interface DateTimeStr { String message() default "format incorrect"; String format().原创 2021-08-05 14:02:39 · 3724 阅读 · 0 评论 -
异常处理No bean named ‘ConfigurationClassPostProcessor.importRegistry‘ available
SpringBoot + MybatisPlus环境启动报错No bean named ‘ConfigurationClassPostProcessor.importRegistry’ available这是因为我使用了MybatisPlus的Mapper后没加@Mapper注解和启动类没加@MapperScan注解导致的, 如果其他人遇到了这个问题可以从这方面来找, 或者还有可能是数据库连接信息没配置完全的原因...原创 2021-07-19 15:49:35 · 1581 阅读 · 0 评论 -
SpringBoot项目打成war包放入tomcat中运行
pom文件<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0..原创 2021-03-10 14:42:17 · 110 阅读 · 0 评论 -
rabbitmq springboot应用部署到服务器上不能自动创建exchange和queue问题
问题描述:用idea启动时可以创建,但是发布到服务器上就不可以创建了解决办法:在RabbitConfig上加配置@Configurationpublic class RabbitConfig { @Autowired RabbitAdmin rabbitAdmin;/** * 死信交换机 **/ @Bean public DirectExchange deadExchange() { //参数1:交换机名 参数2:是否可持久化 一般设置true 参数3:一不再使用是否自原创 2020-05-20 11:24:53 · 5332 阅读 · 2 评论 -
rabbitmq配置类RabbitConfig中注入RabbitTemplate后在下面设置@BeanRabbitTemplate设置消息确认时springboot启动报错的问题
问题:在rabbitConfig配置类中既使用@Resource注入rabbitTemplate 又在下面使用@Bean声明一个RabbitTemplate用来设置消息确认时发现,springboot启动报错报错信息如下:java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframe...原创 2019-12-26 14:33:40 · 9073 阅读 · 2 评论 -
springboot打成jar包发布到服务器运行
在本地已经指定了打成jar包后的名字<build> <finalName>app_msgpush</finalName>在logback.xml中配置日志文件存储路径<?xml version="1.0" encoding="UTF-8"?> <configuration> <springPr...原创 2019-12-30 14:16:12 · 274 阅读 · 0 评论 -
springboot1.5.16整合jdk1.6_使用c3p0连接池_使用pagehelper分页插件搭建项目
在网上找了很多,一直在错了又试,试了又错,最终终于找到一个可以用的,而且启动不报错的版本,现在贴上来pom 因为用到了webservice,所以还有webservice的依赖,只看自己用的就可以了<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" x...原创 2020-01-02 13:35:27 · 407 阅读 · 0 评论 -
springboot报错_No converter found for return value of type原因是没有这个对象的json转换器
上网找了很多的资料,有的说要加入 <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> <version>2.9....原创 2020-01-03 16:01:04 · 196 阅读 · 0 评论