- 博客(10)
- 资源 (4)
- 收藏
- 关注
原创 baomidou-mybatis自己写数据源切换执行updateBatchById无法切换的原因分析
baomidou-mybatis将大量方法封装,在自己的service类中的方法中利用DynamicDataSource切换数据源却失败了,原因是updateBatchById方法调用了updateById代码位置org.apache.ibatis.executor.BatchExecutordoUpdate方法中利用Connection connection = getConnection(ms...
2018-07-13 16:39:27
4962
原创 Spring boot actuator与Spring boot admin对接,2.0版本
gradle构建工程spring-boot-admin-serverbuild.gradle compile group: 'de.codecentric', name: 'spring-boot-admin-starter-server', version: '2.0.0' compile group: 'org.springframework.boot', name: 'spri...
2018-06-25 09:09:54
3293
1
原创 Invocation of init method failed; nested exception is java.lang.NoSuchFieldError: DEFAULT_INCOMPATIB
这类错误一般出现在整合项目包的时候,解决方法最好是打开源代码org.springframework.ui.freemarker.FreeMarkerConfigurationFactoryprotected Configuration newConfiguration() throws IOException, TemplateException { return new Configurati...
2018-06-19 11:46:54
68853
原创 Springboot为什么加载不上application.yml的配置文件?
调试源代码,配置文件加载代码位置是:org.springframework.boot.context.config.ConfigFileApplicationListenerpublic void postProcessEnvironment(ConfigurableEnvironment environment,SpringApplication application)方法这个方法执行完,en...
2018-06-17 11:54:03
24707
原创 Idea 错误解决 Error:(5, 0) Project with path ':xxxxxx' could not be found in root project 'xxxxxx'.
多模块开发中报错解决办法:主模块中的settings.gradle输入类似下面的代码完成。include ':common'include ':admin'include ':api'project(':common').projectDir = "$rootDir/common" as Fileproject(':admin').projectDir = "$rootDir/admin...
2018-06-12 12:17:38
10132
原创 Shiro组件标注
Subject:会话者、操作者SecurityManager:内部组件管理类Realm:会话信息保存实体及操作方法Authenticator:用户身份核实认证Authorizer:访问控制SessionManager:Session容器CacheManager:缓存...
2018-06-11 10:38:19
249
转载 Springboot解决跨域访问
import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.CorsRegistry; import org.springframework.web.servlet.config.annotation.WebMvcC...
2018-06-08 10:33:26
875
原创 Springboot前后端分离访问controller报404原因
将访问的Controller注解为@RestController@RestController其实是@ResponseBody和@Controller的组合@Controller返回jsp,加入@Response返回json
2018-06-08 10:32:36
5976
原创 Spring注入失败原因
ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error c...
2018-06-08 09:10:36
1334
原创 Spring Boot和Spring区别
1、SpringBoot直接将启动类放到最上层可以扫包,Spring需要指定路径2、@Configuration会被自动扫描,内容和@Bean配置一样,Spring需要手动导入配置文件路径。SpringBoot自动将@Configuration变成@Bean...
2018-06-06 14:41:19
260
MySQL数据库驱动
2009-02-26
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人