idea--2.服务器部署tomcat和创建测试类

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/gdsgdh308227363/article/details/79722422

1       服务器配置tomcat

 

1.1  第一步 添加服务器

 

 

 

 

1.2  第二步

 

 

1.3  第三步 热部署

在idea tomcat 中server的配置里,

有个on framedeactivation,选择updateclasses and resources。

  这是由于服务器添加的Artifact类型问题,一般一个module对应两种类型的Artifact,一种是war,一种是warexplored。
  war就是已war包形式发布,当前项目是这种形式,在这种形式下on frame deactivation配置没有update classes 

and resources选项。war explored是发布文件目录,选择这  种形式,on frame deactivation中就出现update classes and resources选项了。

 

1.4  第四步 添加tomcat包


2       测试类

2.1  安装插件

 

 

2.2  使用方法

IntelliJ IDEA中用快捷键自动创建测试类的默认按键为:

ctrl+shift+t --> create new test



在你所需要测试的类或者接口名称上按该快捷键:

 

 

 

 

猜你喜欢

转载自blog.csdn.net/gdsgdh308227363/article/details/79722422