随笔分类 - Spring boot
摘要:第一步:打包方式改为war pom文件: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <!-- 移除嵌入式tomcat插件 -->
阅读全文
摘要:@ControllerAdvice是Spring提供的注释,使您可以编写可应用于各种控制器的全局代码-从所有控制器到选定的包,甚至是特定的注释。在这个简短的教程中,我们将专注于处理异常使用@ControllerAdvice和@ExceptionHandler(@InitBinder和@ModalAt
阅读全文
摘要:阿里OSS文档 Bucket存储空间Object对象或者文件EndpointOSS 访问域名 更多请看 配置文件 alibaba: cloud: access-key: LTAI4GAx***cmUvBy3DHmeJh secret-key: UHLJorhm***p9xObtSr7bprErS1t
阅读全文
摘要:去官网下载http://www.zhuozhengsoft.com/dowm/ 拷贝集成文件/lib下的jar包到D盘根目录 然后执行如下语句 mvn install:install-file -DgroupId=com.zhuozhengsoft -DartifactId=pageoffice -
阅读全文
摘要:renren_fast(用于人人开源后台) guli_pms 商品模块 guli_oms --订单模块 guli_wms 仓储模块 guli_ums --用户模块 guli_sms 优惠券模块 数据库文件在 https://gitee.com/zongyaohuang/GuLi-Spring-Clo
阅读全文
摘要:一、选择gitee作为代码托管仓库。 二、设置 用户信息设置: $ git config --global user.name "用户名" $ git config --global user.email "邮箱" SSH配置: 打开git bash执行生成公钥和私钥的命令:ssh-keygen -
阅读全文
摘要:直接上代码 pom <dependency> <groupId>cn.afterturn</groupId> <artifactId>easypoi-base</artifactId> <version>3.0.3</version> </dependency> <dependency> <grou
阅读全文
摘要:直接上代码 @Component public class CustomAuthenticationFailureHandler implements AuthenticationFailureHandler { @Autowired private ObjectMapper objectMappe
阅读全文
摘要:启动类添加注解: @EnableScheduling 定时任务类: 先获取所有的key,再将key转为int类型得到id,通过key获取得到redis中的值。 然后调用更新方法,为了避免重复更新,删除redis中的key-value。 0/10 * * * * ?表示每10秒执行一次 package
阅读全文
摘要:mapper: @Mapper public interface StudentMapper { @Select("select * from student where id=#{id}") Student getById(Integer id); @Update("UPDATE student
阅读全文
摘要:在拦截资源配置类下加如下代码: //iframe http.headers().frameOptions().disable();
阅读全文
摘要:ajax上传图片的时候,苦于刷新与ajax的file处理问题,然后几经周折,发现个神器,达到了自己想要的结果 丢下链接,用起来很简单 https://github.com/LPology/Simple-Ajax-Uploader
阅读全文
摘要:改为如下: 1.(官方推荐)实现WebMvcConfigurer @Configuration public class WebMvcConfg implements WebMvcConfigurer { } 2.继承WebMvcConfigurationSupport @Configuration
阅读全文
摘要:转https://blog.csdn.net/sanpo/article/details/90474919
阅读全文
摘要:1 添加依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> 2 在与启动类同包下创建配置类 @C
阅读全文
摘要:application.yml server: port: 31001 spring: application: name: xc-service-manage-cms data: mongodb: uri: mongodb://root:123@127.0.0.1:27017/xc_cms app
阅读全文
摘要:每次执行完出现以下提示: log4j:WARN No appenders could be found for logger (org.apache.ibatis.logging.LogFactory). log4j:WARN Please initialize the log4j system p
阅读全文
摘要:pom.xml <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency>
阅读全文
摘要:# tomcat access log config server: tomcat: accesslog: enabled: true #是否开启日志 directory: /tmp/accesslogs/mobile-site #日志存储目录 pattern: '%t %a %A %m %U%q
阅读全文
摘要:使用Ajax来发送一些数据给后台一个Controller,而该Controller返回的是一个页面,但是一直无法返回页面,而除了页面Controller里的其他代码都执行了,但是就是页面无法跳转。输出的数据都存在,也都执行了,就最后的return返回页面无法跳转,也没有报错。 解决方法: 如下代码:
阅读全文

浙公网安备 33010602011771号