![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
springBoot
pallcard
这个作者很懒,什么都没留下…
展开
-
springboot问题
1.@ConfigurationProperties(prefix = "girl")出现Configuration Annotation Proessor not found in classpath 解决办法: class 加上以下注解 @PropertySource("classpath:application.yml") ...原创 2018-12-29 09:41:34 · 124 阅读 · 0 评论 -
springBoot启动方式
1.通过IDEA启动 2.进入工程目录 mvn spring-boot 3.进入工程目录 mvn install 结束后会生成target目录 cd target java -jar girl-0.0.1-SNAPSHOT.jar 注:以生产环境启动项目 java -jar girl-0.0.1-SNAPSHOT.jar --spring.profiles....原创 2018-12-29 10:32:11 · 140 阅读 · 0 评论 -
SpringBoot001
创建工程 使用IDEA,按照提示创建即可。 修改Banner 在resources目录下创建banner.txt文件,改文件用于指定banner,文字生成banner的网址:http://patorjk.com/software/taag。 ${AnsiColor.BLUE} .____ ____ __. | | | |/ _| | | | < ...转载 2019-06-08 10:16:34 · 159 阅读 · 0 评论 -
SpringBoot002
1.POM文件 整个项目的pom文件中(pom.xml),可以看到该项目的parent,通过点击标签,可以进入parent中,这样可以看到项目的最终的parent。 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-...转载 2019-06-08 10:51:33 · 108 阅读 · 0 评论 -
SpringBoot003
url传参 1.get方式 // 访问:http://localhost:8080/test/get/xxx @GetMapping("/get/{name}") public String get(@PathVariable("name") String name2){ System.out.println("name: "+ name2); ...转载 2019-06-08 17:09:23 · 126 阅读 · 0 评论 -
SpringBoot004
Swagger框架 描述和测试API接口,自动生成API接口文档。 1.添加依赖 <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>2.9.2</ver...转载 2019-06-08 17:50:13 · 102 阅读 · 0 评论 -
SpringBoot005
1.配置文件基本使用 使用.yml配置文件,在resources目录下新建application.yml文件 server: port: 8081 #修改端口号 servlet: context-path: /lk #端口号后需额外添加字符 #以上等同于application.properties的以下写法 #server.port=8081 #server.servlet.co...转载 2019-06-09 00:11:38 · 134 阅读 · 0 评论