如何绕过加密狗软件

第一步:新建一个maven项目
新建项目,选择maven
image.png
填写GroupId和ArtifactId
image.png
下一步默认即可,直接点击finish
image.png
创建完成后项目结构如下
image.png
第二步: 配置pom.xml
在pom.xml中添加如下代码:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.9.RELEASE</version>
</parent>
<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
</dependencies>

parent指定项目的父项目是spring-boot的版本管理中心,因为有了这个,spring-boot项目中导入其他spring的jar包时,就不再需要指定版本号。
spring-boot-starter-web 是启动器,帮我们导入了web模块正常运行所需要的所有依赖的组件。
第三步:添加主程序类
新建DemoMainApplication.class:
image.png 内容如下:

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class DemoMainApplication {
public static void main(String[] args) {
SpringApplication.run(DemoMainApplication.class,args);
}
}
第四步:添加controller
在DemoMainApplication.class的所在目录创建controller文件夹并创建DemoController.class image.png 内容如下:

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DemoController {
@RequestMapping("/hello")
public String Hello(){
return “Hello World!”;
}
}
第五步:启动
image.png 日志出现如下日志说明启动成功: image.png 浏览器中访问第一步:新建一个maven项目
新建项目,选择maven
image.png
填写GroupId和ArtifactId
image.png
下一步默认即可,直接点击finish
image.png
创建完成后项目结构如下
image.png
第二步: 配置pom.xml
在pom.xml中添加如下代码:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.9.RELEASE</version>
</parent>
<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
</dependencies>

parent指定项目的父项目是spring-boot的版本管理中心,因为有了这个,spring-boot项目中导入其他spring的jar包时,就不再需要指定版本号。
spring-boot-starter-web 是启动器,帮我们导入了web模块正常运行所需要的所有依赖的组件。
第三步:添加主程序类
新建DemoMainApplication.class:
image.png 内容如下:

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class DemoMainApplication {
public static void main(String[] args) {
SpringApplication.run(DemoMainApplication.class,args);
}
}
第四步:添加controller
在DemoMainApplication.class的所在目录创建controller文件夹并创建DemoController.class image.png 内容如下:

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DemoController {
@RequestMapping("/hello")
public String Hello(){
return “Hello World!”;
}
}
第五步:启动
image.png 日志出现如下日志说明启动成功: image.png 浏览器中访问

扫描二维码关注公众号,回复: 9346750 查看本文章
发布了76 篇原创文章 · 获赞 0 · 访问量 6736

猜你喜欢

转载自blog.csdn.net/chunzhenwang/article/details/104435224