标签:语言 理解 分布 oca ppi tap 业务开发 from 简介
①开发简单,集中式管理②基本不会重复开发③功能都在本地,没有分布式的管理和调用消耗
1、效率低:开发都在同一个项目改代码,相互等待,冲突不断 2、维护难:代码功功能耦合在一起,新人不知道何从下手 3、不灵活:构建时间长,任何小修改都要重构整个项目,耗时 4、稳定性差:一个微小的问题,都可能导致整个应用挂掉 5、扩展性不够:无法满足高并发下的业务需求
优点
①JDK1.8②maven3.x③spring tools suite4.4④springboot2.x版本⑤spring
<?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://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.0.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.spring</groupId> <artifactId>springboot_helloworld</artifactId> <version>0.0.1-SNAPSHOT</version> <name>springboot_helloworld</name> <description>Demo project for Spring Boot</description> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <java.version>1.8</java.version> </properties> <dependencies> <!--添加对spring web 的依赖--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <!--添加对spring 测试的依赖--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> <exclusions> <exclusion> <groupId>org.junit.vintage</groupId> <artifactId>junit-vintage-engine</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scope>test</scope> </dependency> <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>7.0.0-beta4</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <!--manven插件的配置--> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project>
package com.spring.controller; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; /** * Created by Administrator on 2019-10-21. */ @Controller @RequestMapping("user") public class UserController { //测试 @RequestMapping("hello") @ResponseBody public String hellowUser(){ return "hello world!"; } }
2,@SpringBootConfiguration 标记在某个类上表示是一个springboot的配置类和@Configuration 一样
标签:语言 理解 分布 oca ppi tap 业务开发 from 简介
原文地址:https://www.cnblogs.com/jacksonxiao/p/11713988.html