摘要:
配置可在code style更改 Include subdirectories 包含子目录 Optimize imports 使导入最优化 Rearrange entries 重新整理条目(函数,方法顺序重新排列) Only VCS changed text 只格式未提交代码 Cleanup cod 阅读全文
posted @ 2021-03-04 12:08
剑陈
阅读(1313)
评论(0)
推荐(0)
摘要:
mac升级之后,data文件夹不让用,需要更改日志文件输出路径,更改logback.xml文件里的value路径 <property name="log.dir" value="/opt/data/wk-api/logs" /> 阅读全文
posted @ 2021-03-04 12:05
剑陈
阅读(8382)
评论(1)
推荐(0)
摘要:
#快捷键设置 进入Preferences → Keymap,可直接搜索快捷键名称搜索: 在弹出窗口中直接按下快捷键,点击OK保存。 也可以搜索已设置的快捷键,如图: #常用快捷键 下列快捷键是以Mac OS系统为例,Windows系统默认快捷键有所不同,请自行熟悉。 Command+N:快速生成代码 阅读全文
posted @ 2021-03-04 11:56
剑陈
阅读(218)
评论(0)
推荐(0)
摘要:
#配置JDK 在“Preferences“窗口选择Build,Execution,Deployment->Compiler->Java Compiler #配置Git Version Control->Git #配置Maven 进入Build,Execution,Deployment → Build 阅读全文
posted @ 2021-03-04 11:38
剑陈
阅读(308)
评论(0)
推荐(0)
摘要:
pom.xml加入如下配置 <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> <plug 阅读全文
posted @ 2021-03-04 11:21
剑陈
阅读(102)
评论(0)
推荐(0)
摘要:
Spring Boot 项目的入口是创建项目时的Application类,也就main函数所在的类。 该类上有一个注解@SpringBootApplication,该注解是@SpringBootConfiguration、@EnableAutoConfiguration和@ComponentScan 阅读全文
posted @ 2021-03-04 11:17
剑陈
阅读(153)
评论(0)
推荐(0)
摘要:
使用该方法根据主键ID获取对象时 public News find(Long id){ return newsRepository.getOne(id); } 服务器端会报错 { "timestamp": "2019-07-30T06:29:40.915+0000", "status": 500, 阅读全文
posted @ 2021-03-04 11:14
剑陈
阅读(1884)
评论(0)
推荐(0)
摘要:
该注解是Spring依赖注入的关键,例如上例StudentController中注入StudentService @Autowired private StudentService studentService; 起作用类似于 private StudentService studentServic 阅读全文
posted @ 2021-03-04 11:05
剑陈
阅读(2472)
评论(0)
推荐(1)
摘要:
持久层是介于业务逻辑层和数据库之间的,访问数据库并为业务处理提供或保存数据,具体需要哪些方法是根据业务逻辑层的需要而定。 这里我们使用框架Spring Data Jpa,通过pom.xml引入其依赖: <dependency> <groupId>org.springframework.boot</g 阅读全文
posted @ 2021-03-04 11:00
剑陈
阅读(725)
评论(1)
推荐(1)
摘要:
一般,一个接口会调用业务逻辑层的一个方法,来实现该接口的具体业务逻辑和功能。 业务逻辑层需要编写接口 public interface StudentService { public List<Student> findByClass(Integer classId) throws Exceptio 阅读全文
posted @ 2021-03-04 10:55
剑陈
阅读(3546)
评论(0)
推荐(0)

浙公网安备 33010602011771号