eclipse搭建springboot
Gr_lbxx
这个作者很懒,什么都没留下…
展开
-
eclipse中搭建springboot学习(6)--连接oracle
在pom.xml中添加依赖的包,依赖ojdbc报错时,请看之前的解决报错的博客。<!-- Mybatis --> <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-sp...原创 2018-10-18 16:34:38 · 878 阅读 · 0 评论 -
eclipse中搭建springboot学习(14)---国际化
首先编写国际化文件,默认情况下,国际化资源文件的基础名为messages,且存放在classpath根路径下,即messages.properties、messages_zh_CN.properties、messages_en_US.properties等等,这样就无需在配置文件中设置spring.messages.basename=...了,但是如果基础名不为messages或者不在classp...原创 2018-11-22 13:48:12 · 904 阅读 · 0 评论 -
eclipse中搭建springboot学习(13)---定时任务
启动类package com.example;import org.springframework.boot.SpringApplication;import org.springframework.boot.autoconfigure.SpringBootApplication;import org.springframework.boot.web.servlet.ServletC...原创 2018-11-01 09:11:44 · 372 阅读 · 0 评论 -
eclipse中搭建springboot学习(12)---多数据源
pom.xml添加依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId> spring-boot-configuration-processor ...原创 2018-10-30 10:34:44 · 336 阅读 · 0 评论 -
eclipse中搭建springboot学习(11)---JPA使用4(分页查询)
StudentScoreService添加方法/** * 分页查询 无查询条件 * * @param page * @param size * @return */ public Page<StudentDTO> findStudent(Integer page, Integer size) { ...原创 2018-10-26 13:11:43 · 345 阅读 · 0 评论 -
eclipse中搭建springboot学习(10)---JPA使用4(多张表 ManyToOne)
新增SchoolDTOpackage com.example.demo1025.dto;import java.io.Serializable;import java.util.List;import javax.persistence.CascadeType;import javax.persistence.Entity;import javax.persistence.Ge...原创 2018-10-25 14:14:51 · 245 阅读 · 0 评论 -
eclipse中搭建springboot学习(9)---JPA使用3(多张表 OneToOne)
StudentDTOpackage com.example.demo1025.dto;import java.io.Serializable;import javax.persistence.CascadeType;import javax.persistence.Column;import javax.persistence.Entity;import javax.persi...原创 2018-10-25 10:48:16 · 254 阅读 · 0 评论 -
eclipse中搭建springboot学习(8)---JPA使用2(自定义sql)
PersonRepositorypackage com.example.demo1019.dao;import javax.transaction.Transactional;import org.springframework.data.jpa.repository.JpaRepository;import org.springframework.data.jpa.reposit...原创 2018-10-19 15:26:17 · 352 阅读 · 0 评论 -
eclipse中搭建springboot学习(1)---Eclipse安装STS插件
选择help-eclipse marketplace选择安装,安装完毕提示重启即可重启后新建项目时有Spring 、Spring boot即安装成功原创 2018-10-17 08:51:55 · 238 阅读 · 0 评论 -
eclipse中搭建springboot学习(2)---第一个helloword项目
打开eclipse,new-Spring Starter Project-next设置项目名称,点击next选择web,点击next点击finish即可写一个测试的controllerpackage com.example.demo;import org.springframework.stereotype.Controller;import org.sp...原创 2018-10-17 10:48:06 · 399 阅读 · 0 评论 -
eclipse中搭建springboot学习(3)---springboot配置热部署
在pom.xml添加热部署的依赖即可 <?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="原创 2018-10-17 09:33:59 · 487 阅读 · 0 评论 -
eclipse中搭建springboot学习(4)---过滤器
在helloController添加登录的方法,过滤器不过滤登录路径,当直接访问hello路径时,由于没有登录会跳转回登陆页面。package com.example.demo;import org.springframework.stereotype.Controller;import org.springframework.web.bind.annotation.RequestMa...原创 2018-10-17 13:10:53 · 402 阅读 · 0 评论 -
eclipse中搭建springboot学习(5)---拦截器
新建FirstInterceptor第一个拦截器package com.example.demo1018.interceptor;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import org.springframework.web.servl...原创 2018-10-18 11:29:00 · 582 阅读 · 0 评论 -
eclipse中搭建springboot学习(7)---JPA使用1
在pom.xml中引入jar包<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http原创 2018-10-19 14:00:52 · 561 阅读 · 0 评论 -
eclipse中搭建springboot学习(14)---监控与管理
pom.xml中添加依赖 <!--监控依赖 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator&l...原创 2018-11-27 15:04:10 · 184 阅读 · 0 评论