背景: 部署项目到服务器,springboot启动报错: No bean named ‘org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry’ available 解决: mysql ...
分类:
数据库 时间:
2020-06-01 21:09:25
阅读次数:
411
为了记录日志的使用常常需要写大量而又重复的代码,而通过注解的形式可以大量的减少代码量; 一.maven引入AOP的依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-a ...
分类:
编程语言 时间:
2020-06-01 00:59:10
阅读次数:
79
在启动一台消费者微服务时出现了异常 Field client in com.rachel.web.ConsumerController required a bean of type 'org.springframework.cloud.netflix.ribbon.RibbonLoadBalanc ...
分类:
数据库 时间:
2020-06-01 00:39:29
阅读次数:
215
Spring Boot中常用的三个注解 注解配置截图: @SpringBootConfiguration 这个注解就是根据 @Configuration 注解演化而来的,二者功能也一致,标注当前类是配置类。 @Configuration org.springframework.context.ann ...
分类:
编程语言 时间:
2020-05-31 21:48:13
阅读次数:
109
1.在pom文件下添加 <packaging>war</packaging> 2.在pom下移除tomcat插件 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web< ...
分类:
编程语言 时间:
2020-05-31 15:59:01
阅读次数:
61
<!-- 配置事务管理器 --> <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory" ...
分类:
编程语言 时间:
2020-05-31 15:53:11
阅读次数:
79
applicationContext-tx-xml.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www. ...
分类:
编程语言 时间:
2020-05-30 15:51:32
阅读次数:
69
1 pom <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <mainClass>com.xx.xxAppli ...
分类:
编程语言 时间:
2020-05-30 15:37:58
阅读次数:
58
SpringBoot深入理解 项目打包SpringBoot启动过程 当使用打包时,会下载org-springframework-boot-loader的jar,并且不会放在lib存放的第三方jar包文件中,该jar包中有个JarLauncher.class文件中设置了jar包运行时的入口和打包后文件 ...
分类:
编程语言 时间:
2020-05-30 01:34:45
阅读次数:
128
1. 添加依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-redis</artifactId> <version>1.4.7.RELEASE</version></ ...
分类:
编程语言 时间:
2020-05-29 23:05:07
阅读次数:
106