
spring
不卷毛
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
springboot @Value 和 @ConfigurationProperties
此篇转载,下附原帖地址 https://segmentfault.com/a/1190000018536906 目录 如何使用 区别 松散语法 SpEL JSR303 数据校验 复杂类型封装 怎么选用? @Value()只能给普通变量注入值,不能直接给静态变量赋值 如何使用 定义两个对象,一个学生对象,对应着一个老师对象,代码如下: @ConfigurationProperties 学生类 @Component @ConfigurationProperties(prefix =转载 2021-04-27 09:49:48 · 690 阅读 · 0 评论 -
aop顺序
aspect a @Order(1) aspect b @Order(2) 顺序: a around前置 a before b around前置 b before a proceed() b around后置 b after a around后置 a after原创 2021-03-04 15:09:43 · 175 阅读 · 1 评论 -
工具类静态方法注入service
注意在spring配置文件中配置扫描该类 @Component public class ChangeBook { @Autowired TagService tagService; @Autowired ClassifyService classifyService; private static ChangeBook changeBook; @PostConstruct public void init() { change.原创 2020-08-28 11:30:04 · 311 阅读 · 0 评论 -
junit4和junit5 ssm测试
junit5 package com.nxj.service.impl; import com.nxj.entity.Classify; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test..原创 2020-08-27 14:22:32 · 334 阅读 · 0 评论 -
MyBatis sql总结
博主最近入职啦,在试用期做了一个练手项目,工作重点集中在MyBatis查询上,做一些报表展示。 在过程中接触到一些mybatis 动态sql,还有一些小坑,专门总结一下。 choose, when, otherwise <select id="find" resultType="java.lang.Long"> select id from tablename group by id having <choose> .原创 2020-08-27 10:20:50 · 122 阅读 · 0 评论 -
ssm从入门到放弃之框架搭建
所需要的包,包含了jackson(实现前后端分离) 提示:最好还是用maven管理,不然会很麻烦。本人在搭建完疯狂调bug的时候加入了maven,你猜我有多崩溃,,, idea工程目录如下,直接选maven,打勾,使用这个 因为我已经配置了tomcat,运行过,所以我也不知道项目结构会不会不一样,上面的java,resources目录右键选择mark as source root和resources root,一个标记成源码根目录,一个标记成资源根目录。 web-inf下的jsp和res原创 2020-08-20 15:17:49 · 162 阅读 · 0 评论 -
Springboot之application.properties的使用
SpringBoot可以识别两种格式的配置文件,分别是yml文件与properties文件。 application.properties和application.yml,都可以被SpringBoot自动识别并加载。 自定义的配置文件,就最好还是使用properties格式的文件,因为SpringBoot中暂时还并未提供手动加载yml格式文件的功能(这里指注解方式@PropertySource("classpath:xxx.properties"))。 未完。。。 参考链接: https://bl原创 2020-08-10 09:17:40 · 203 阅读 · 0 评论