IEDA学习之Maven项目导入idea步骤详解
来源:互联网 发布:和彩云管家 网络异常 编辑:程序博客网 时间:2024/05/29 11:13
传送门:IEDA学习之配置maven环境变量
1、import project -->> maven
2、setting -->> 配置maven
3、服务 配置maven tomcat
4、直接启动 使用run
@SpringBootApplicationpublic class SpringBootWebApplication { public static void main(String[] args) { SpringApplication.run(SpringBootWebApplication.class, args); }}
5、配合tomcat 使用
(1)添加类
/** * 修改启动类,继承 SpringBootServletInitializer 并重写 configure 方法 * * @author linzhiyong * @email wflinzhiyong@163.com * @time 2017/7/7 * @desc */public class SpringBootStartApplication extends SpringBootServletInitializer { @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { // 注意这里要指向原先用main方法执行的Application启动类 return builder.sources(SpringBootWebApplication.class); }}
pom.xml配置
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <!-- 移除嵌入式tomcat插件 --> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> </exclusion> </exclusions></dependency>
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> <scope>provided</scope></dependency><dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> <scope>provided</scope></dependency>
<plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> <configuration> <path>/</path> <port>8080</port> <uriEncoding>UTF-8</uriEncoding> <url>http://localhost:8080/manager/html</url> <server>tomcat7</server> </configuration></plugin>
阅读全文
1 0
- IEDA学习之Maven项目导入idea步骤详解
- IntelliJ IDEA集成Maven导入项目步骤
- idea导入eclipse项目工程,步骤详解
- IEDA学习之配置maven环境变量
- IDEA教程之导入maven项目
- Idea的配置与maven项目导入步骤
- 关于idea maven web项目导入的步骤
- Idea导入maven项目
- IDEA导入maven项目
- idea导入Maven项目
- maven项目导入步骤。
- IntelliJ IDEA 导入maven项目
- idea导入maven web项目
- IntelliJ IDEA导入Maven项目
- idea 导入eclipse maven项目
- idea maven 项目导入配置
- IntelliJ IDEA 导入 maven项目
- Eclipse使用之导入Maven项目详解
- poj Counterfeit Dollar假币错解
- How many integers can you find HDU
- 如何快速学习掌握PLC
- Python学习笔记(一)三步走安装pip
- 【跟着stackoverflow学Pandas】Select rows from a DataFrame based on values in a column -pandas 筛选
- IEDA学习之Maven项目导入idea步骤详解
- 正则表达式
- static_cast、dynamic_cast、const_cast和reinterpret_cast总结
- 基于vue-cli的Webpack构建
- Spring cloud 学习(一)
- (五)Angular4 英雄征途HeroConquest-多组件开发
- [LintCode]Two Strings Are Anagrams(C++|Java|Python)
- ruby on rails 里pluck和select(map、collect)的区别
- 二维码用途分类