
Spring Boot
# Spring Boot
风铃峰顶
个人项目经历请搜索:
http://www.haoranhaoshi.top/
展开
-
SpringBoot中ConditionalOnClass注解的原理
https://www.cnblogs.com/hanabivvv/archive/2020/05/12/12876158.html转载 2021-01-28 22:01:39 · 571 阅读 · 0 评论 -
SpringBoot配置加载的优先级
相同内容,优先级高的会覆盖优先级低的。启动参数--spring.config.location=configFilePath/configFile > projectPath/config/configFile > projectPath/configFile > classpath/config/configFile > classpath/configFile相同路径下的configFile优先级:application-profile.propertie > ap转载 2020-11-23 09:41:42 · 403 阅读 · 0 评论 -
SpringMVC 控制器是单例模式
SpringMVC 控制器默认是单例模式,通过@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)可成为多例模式,或者写成@Scope("prototype")。单例模式下定义成员变量是线程不安全的。使用单例模式是为了性能(无需频繁初始化),同时也没有必要使用多例模式。https://www.cnblogs.com/areyouready/p/7780810.htmlhttps://www.it610.com/article/1280原创 2020-07-27 21:58:07 · 1936 阅读 · 0 评论 -
jqgrid 返回了数据但数据不显示
https://blog.youkuaiyun.com/z1729734271/article/details/53612414?depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-1&utm_source=distribute.pc_relevant.none-task-blog-BlogCom...原创 2020-04-05 13:22:29 · 826 阅读 · 0 评论 -
springboot 页面:been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the
been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource数据源和访问源是否同源的检验。如果static下的页面在文件资源管理器或IDE中启动就会产生,启动springboot Application后应用网址(本地网址、局域网网址、广域网...原创 2020-04-05 10:35:15 · 1868 阅读 · 0 评论 -
springboot static中的ajax得不到返回结果
运行springboot Application后:输入网址打开对应的static下的页面,ajax举例(推荐mui,如果是jQuery还得解决跨域): mui.post(serverAddress + 'faceMatch', { imgBase64String: imgBase64String }, function(userNameJSONObject...原创 2020-04-01 22:31:29 · 486 阅读 · 0 评论 -
springboot static下页面中文乱码
误以为:package com.program.face.config;import com.fasterxml.jackson.databind.ObjectMapper;import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configurat...原创 2020-04-01 21:38:11 · 1236 阅读 · 0 评论 -
Field ribbonLoadBalancerClient in ... required a a bean of type ... that could not be found.
Description:Field ribbonLoadBalancerClient in com.hao.learning.consumer.controller.ConsumerController required a bean of type 'org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient' tha...原创 2020-02-24 20:51:52 · 1214 阅读 · 0 评论 -
com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known serve
错误原因:defaultZone里没有加上自己的地址。server: port: 10086eureka: client: service-url: # EurekaServer的地址,有自己的地址,如果是集群,加上其它Server的地址 defaultZone: http://127.0.0.1:10086/eureka, http://127.0.0.1:1...原创 2020-02-24 20:24:52 · 395 阅读 · 0 评论 -
springboot总结
IDEA社区版在Run/Debug Configurations左侧导航栏中无法产生Spring Boot,也无法产生Run Dashboard,必须专业版。在Run/Debug Configurations左侧导航栏的Spring Boot复制Eureka应用后,需启动原来的Eureka应用,然后修改yml(server.port以及eureka.client.service-url.def...原创 2020-02-23 11:02:29 · 302 阅读 · 0 评论 -
java.lang.ClassNotFoundException: com.mysql.cj.jdbc.Driver
<dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> ...原创 2020-02-17 21:46:29 · 474 阅读 · 0 评论 -
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'order__ids' in 'field lis
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'form__ids' in 'field list'springboot + mybatis + tk.mybatis + mysql (mysql默认utf8_general_ci排序规则,大小写不敏感)表属性命名时,mysql和map...原创 2020-01-30 19:09:42 · 375 阅读 · 0 评论 -
springboot传参,GET和POST方式,以及传参Json字符串
@RequestMapping(value = "/jsonToExcel", method = RequestMethod.POST) public boolean jsonToExcel(HttpServletRequest request) { Map<String, String[]> parameterMap = request.getParamet...原创 2019-09-24 10:33:00 · 4812 阅读 · 0 评论 -
springboot返回文件及文件名乱码
public synchronized static ResponseEntity<FileSystemResource> exportFile(File file, String tempFolderName, String fileName) { if (file == null) { return null; } ...原创 2019-09-24 09:33:13 · 2922 阅读 · 3 评论 -
Spring Boot实战入门
一、Spring Boot简介(一至三转:https://www.cnblogs.com/zmfx/p/8903688.html)开发团队:Pivotal团队主要目的:简化新Spring应用的初始搭建以及开发过程。秉持理念:约定优于配置。(该框架使用了特定的方式来进行配置,从而使开发人员不再需要定义样板化的配置)二、Spring Boot的特点1、快速创建独立的Spring应用程序。...原创 2019-02-11 17:17:46 · 946 阅读 · 0 评论