Java(六):Eureka项目搭建、数据请求

news/2024/11/8 9:07:05/

Eureka项目搭建、数据请求

    • Eureka简介
    • Eureka项目创建
      • 1、新建Maven项目
      • 2、只保留Maven项目的依赖文件
      • 3、创建子模块(Eureka服务模块)
      • 4、修改`pom.xml`
      • 5、创建并修改配置文件
      • 6、添加Eureka注解
      • 7、运行
      • 8、创建其他服务
      • 9、修改`pom.xml`
      • 10、创建并修改配置文件
      • 11、添加Eureka注解
      • 12、添加项目服务
      • 13、运行
      • 14、访问404解决
      • 15、项目目录结构
    • 搭建Eureka集群
      • 1、准备
      • 2. 创建 Eureka Server 模块
      • 3、运行
      • 4、创建 Eureka Client 模块并注册到Eureka服务中
      • 5、运行
      • 6、项目目录结构
    • 网络请求获取数据
      • 1、 创建项目
      • 2、 创建请求
      • 3、 运行
      • 4、 目录结构
    • 利用Eureka实现服务间数据请求
      • 1、 创建项目
      • 2、 添加依赖
      • 3、 `demo/eureka-server`
      • 4、 `demo/service-01`
      • 5、 `demo/service-02`
      • 6、 运行
      • 7、 目录结构

Eureka简介

Eureka采用的是Server/Client的模式进行设计。

Server扮演了服务注册中心的角色,为Client提供服务注册和发现的功能,维护着注册到自身的Client的相关信息,同时提供接口给Client获取到注册表中其他服务的信息。

Client将有关自己的服务的信息通过一定的方式登记到Server上,并在正常范围内维护自己信息的一致性,方便其他服务发现自己,同时可以通过Server获取到自己的依赖的其他服务信息,从而完成服务调用。

Eureka功能主要包括:服务注册服务续约服务剔除服务下线获取注册表信息远程调用等。

  • 以下是Eureka几个角色的解释:
    • Eureka服务端:负责服务注册、发现并管理每项服务的中心。
    • Eureka实例:服务(如订单系统)部署多个服务器,每个服务器上提供的服务都是实例。
    • Eureka服务:指提供特定服务功能的服务,例如:订单系统,同一服务可以提供多个实例;
    • Eureka客户端:主要向服务中心注册自己成为服务。但它既可以是服务提供者,也可以是消费者。它与Eureka实例感觉相似,但实际上意义不同。

Eureka项目创建

1、新建Maven项目

在这里插入图片描述

2、只保留Maven项目的依赖文件

pom.xml文件作为后续创建的子模块依赖的父依赖文件

在这里插入图片描述

3、创建子模块(Eureka服务模块)

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

4、修改pom.xml

demo/pom.xml

<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>com.example.demo</groupId><artifactId>demo</artifactId><version>1.0-SNAPSHOT</version><packaging>pom</packaging><modules><module>demo-eureka</module></modules><properties><java.version>1.8</java.version><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding><spring-boot.version>2.6.13</spring-boot.version><spring-cloud.version>2021.0.5</spring-cloud.version></properties><dependencies><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-netflix-eureka-server</artifactId></dependency></dependencies><dependencyManagement><dependencies><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-dependencies</artifactId><version>${spring-cloud.version}</version><type>pom</type><scope>import</scope></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-dependencies</artifactId><version>${spring-boot.version}</version><type>pom</type><scope>import</scope></dependency></dependencies></dependencyManagement><build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.8.1</version><configuration><source>1.8</source><target>1.8</target><encoding>UTF-8</encoding></configuration></plugin><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><version>${spring-boot.version}</version><executions><execution><id>repackage</id><goals><goal>repackage</goal></goals></execution></executions></plugin></plugins></build></project>

demo/demo-eureka/pom.xml

<?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"><parent><groupId>com.example.demo</groupId><artifactId>demo</artifactId><version>1.0-SNAPSHOT</version></parent><modelVersion>4.0.0</modelVersion><artifactId>demo-eureka</artifactId><version>0.0.1-SNAPSHOT</version><name>demo-eureka</name><description>demo-eureka</description></project>

5、创建并修改配置文件

demo/demo-eureka/src/main/resources/application.yml

server:port: 8000spring:application:name: demo-eurekaeureka:instance:hostname: 127.0.0.1client:register-with-eureka: false   # 是否将自己注册到 Eureka-Server 中,默认的为 truefetch-registry: false         # 是否需要拉取服务信息,默认未trueservice-url:defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/  # 注册中心地址

6、添加Eureka注解

demo/demo-eureka/src/main/java/com/example/demo/demoeureka/DemoEurekaApplication.java

package com.example.demo.demoeureka;import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;@EnableEurekaServer
@SpringBootApplication
public class DemoEurekaApplication {public static void main(String[] args) {SpringApplication.run(DemoEurekaApplication.class, args);}}

7、运行

在这里插入图片描述

8、创建其他服务

在这里插入图片描述

9、修改pom.xml

demo/pom.xml

<packaging>pom</packaging><modules><module>demo-eureka</module><module>demo-one</module><module>demo-two</module>
</modules>

demo/demo-one/pom.xml

<?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"><parent><groupId>com.example.demo</groupId><artifactId>demo</artifactId><version>1.0-SNAPSHOT</version></parent><modelVersion>4.0.0</modelVersion><artifactId>demo-one</artifactId><version>0.0.1-SNAPSHOT</version><name>demo-one</name><description>demo-one</description></project>

demo/demo-two/pom.xml

<?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"><parent><groupId>com.example.demo</groupId><artifactId>demo</artifactId><version>1.0-SNAPSHOT</version></parent><modelVersion>4.0.0</modelVersion><artifactId>demo-two</artifactId><version>0.0.1-SNAPSHOT</version><name>demo-two</name><description>demo-two</description></project>

10、创建并修改配置文件

把服务注册到Eureka中

demo/demo-one/src/main/resources/application.yml

server:port: 8001spring:application:name: demo-oneeureka:client:service-url:defaultZone: http://127.0.0.1:8000/eureka/

demo/demo-two/src/main/resources/application.yml

server:port: 8002spring:application:name: demo-twoeureka:client:service-url:defaultZone: http://127.0.0.1:8000/eureka/

11、添加Eureka注解

demo/demo-one/src/main/java/com/example/demo/demoone/DemoOneApplication.java

package com.example.demo.demoone;import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;@EnableEurekaClient
@SpringBootApplication
public class DemoOneApplication {public static void main(String[] args) {SpringApplication.run(DemoOneApplication.class, args);}}

demo/demo-two/src/main/java/com/example/demo/demotwo/DemoTwoApplication.java

package com.example.demo.demotwo;import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;@EnableEurekaClient
@SpringBootApplication
public class DemoTwoApplication {public static void main(String[] args) {SpringApplication.run(DemoTwoApplication.class, args);}}

12、添加项目服务

在这里插入图片描述

13、运行

在这里插入图片描述

14、访问404解决

在这里插入图片描述

开启监控服务配置demo/demo-one/src/main/resources/application.yml
开启监控服务配置demo/demo-two/src/main/resources/application.yml

management:endpoints:web:exposure:include: "*"

在这里插入图片描述

15、项目目录结构

在这里插入图片描述

搭建Eureka集群

应对服务挂了找不到服务的问题

1、准备

SwitchHosts:用于修改 IP 和 域名 的映射

https://github.com/oldj/SwitchHosts/releases

在这里插入图片描述

2. 创建 Eureka Server 模块

在这里插入图片描述

demo/pom.xml

<packaging>pom</packaging><modules><module>eureka-server-01</module><module>eureka-server-02</module><module>eureka-server-03</module><module>eureka-client-01</module>
</modules>

demo/eureka-server-01demo/eureka-server-02demo/eureka-server-03

  • 启动类
    • demo/eureka-server-01/src/main/java/com/example/demo/eurekaserver01/EurekaServer01Application.java
      package com.example.demo.eurekaserver01;import org.springframework.boot.SpringApplication;
      import org.springframework.boot.autoconfigure.SpringBootApplication;
      import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;@EnableEurekaServer
      @SpringBootApplication
      public class EurekaServer01Application {public static void main(String[] args) {SpringApplication.run(EurekaServer01Application.class, args);}
      }
      
    • demo/eu¬reka-server-02/src/main/java/com/example/demo/eurekaserver01/EurekaServer02Application.java
      package com.example.demo.eurekaserver02;import org.springframework.boot.SpringApplication;
      import org.springframework.boot.autoconfigure.SpringBootApplication;
      import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;@EnableEurekaServer
      @SpringBootApplication
      public class EurekaServer02Application {public static void main(String[] args) {SpringApplication.run(EurekaServer02Application.class, args);}
      }
      
    • demo/eureka-server-03/src/main/java/com/example/demo/eurekaserver01/EurekaServer03Application.java
      package com.example.demo.eurekaserver03;import org.springframework.boot.SpringApplication;
      import org.springframework.boot.autoconfigure.SpringBootApplication;
      import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;@EnableEurekaServer
      @SpringBootApplication
      public class EurekaServer03Application {public static void main(String[] args) {SpringApplication.run(EurekaServer03Application.class, args);}
      }
      
  • 配置项
    • demo/eureka-server-01/src/main/resources/application.yml
      server:
      port: 8001spring:
      application:
      name: eureka-server-01eureka:
      instance:
      hostname: www.eureka-server-01.com
      client:
      register-with-eureka: false   # 是否将自己注册到 Eureka-Server 中,默认的为 true
      fetch-registry: false         # 是否需要拉取服务信息,默认未true
      service-url:defaultZone: http://www.eureka-server-02.com:8002/eureka/,http://www.eureka-server-03.com:8003/eureka/ # 注册中心地址
      
    • demo/eureka-server-02/src/main/resources/application.yml
      server:port: 8002spring:application:name: eureka-server-02eureka:instance:hostname: www.eureka-server-02.comclient:register-with-eureka: false   # 是否将自己注册到 Eureka-Server 中,默认的为 truefetch-registry: false         # 是否需要拉取服务信息,默认未trueservice-url:defaultZone: http://www.eureka-server-01.com:8001/eureka/,http://www.eureka-server-03.com:8003/eureka/ # 注册中心地址
      
    • demo/eureka-server-03/src/main/resources/application.yml
      server:port: 8003spring:application:name: eureka-server-03eureka:instance:hostname: www.eureka-server-03.comclient:register-with-eureka: false   # 是否将自己注册到 Eureka-Server 中,默认的为 truefetch-registry: false         # 是否需要拉取服务信息,默认未trueservice-url:defaultZone: http://www.eureka-server-01.com:8001/eureka/,http://www.eureka-server-02.com:8002/eureka/ # 注册中心地址
      

3、运行

在这里插入图片描述

4、创建 Eureka Client 模块并注册到Eureka服务中

在这里插入图片描述

  • 启动类
    • demo/eureka-client-01/src/main/java/com/example/demo/eurekaclient01/EurekaClient01Application.java
      package com.example.demo.eurekaclient01;import org.springframework.boot.SpringApplication;
      import org.springframework.boot.autoconfigure.SpringBootApplication;
      import org.springframework.cloud.netflix.eureka.EnableEurekaClient;@EnableEurekaClient
      @SpringBootApplication
      public class EurekaClient01Application {public static void main(String[] args) {SpringApplication.run(EurekaClient01Application.class, args);}
      }
      
  • 配置项
    • demo/eureka-client-01/src/main/resources/application.yml
      server:port: 8081spring:application:name: eureka-client-01eureka:instance:hostname: www.eureka-client-01.cominstance-id: eureka-client-01client:service-url:defaultZone: http://www.eureka-server-01.com:8001/eureka/,http://www.eureka-server-02.com:8002/eureka/,http://www.eureka-server-03.com:8003/eureka/management:endpoints:web:exposure:include: "*"
      

5、运行

在这里插入图片描述

6、项目目录结构

在这里插入图片描述

网络请求获取数据

1、 创建项目

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

demo/pom.xml

<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>com.example.demo</groupId><artifactId>demo</artifactId><version>1.0-SNAPSHOT</version><packaging>pom</packaging><modules><module>service-01</module><module>service-02</module></modules><properties><java.version>1.8</java.version><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding><spring-boot.version>2.6.13</spring-boot.version></properties><dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency></dependencies><dependencyManagement><dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-dependencies</artifactId><version>${spring-boot.version}</version><type>pom</type><scope>import</scope></dependency></dependencies></dependencyManagement><build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.8.1</version><configuration><source>1.8</source><target>1.8</target><encoding>UTF-8</encoding></configuration></plugin><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><version>${spring-boot.version}</version><executions><execution><id>repackage</id><goals><goal>repackage</goal></goals></execution></executions></plugin></plugins></build></project>

demo/service-01/pom.xml

<?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"><parent><groupId>com.example.demo</groupId><artifactId>demo</artifactId><version>1.0-SNAPSHOT</version></parent><modelVersion>4.0.0</modelVersion><artifactId>service-01</artifactId><version>0.0.1-SNAPSHOT</version><name>service-01</name><description>service-01</description></project>

demo/service-02/pom.xml

<?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"><parent><groupId>com.example.demo</groupId><artifactId>demo</artifactId><version>1.0-SNAPSHOT</version></parent><modelVersion>4.0.0</modelVersion><artifactId>service-02</artifactId><version>0.0.1-SNAPSHOT</version><name>service-02</name><description>service-02</description></project>

demo/service-01/src/main/resources/application.yml

server:port: 8001

demo/service-02/src/main/resources/application.yml

server:port: 8002

2、 创建请求

demo/service-01/src/main/java/com/example/demo/service01/TestController.java

package com.example.demo.service01;import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;@RestController
@RequestMapping
public class TestController {private final RestTemplate restTemplate = new RestTemplate();@GetMapping("msg")public String msg() {return "service-01 服务中请求 service-02";}@GetMapping("say")public String say() {String html = restTemplate.getForObject("https://www.example.com/", String.class);String msg = restTemplate.getForObject("http://127.0.0.1:8002/msg", String.class);return String.format("%s<h1 style=\"text-align: center;\">%s</h1>", html, msg);}}

demo/service-01/src/main/java/com/example/demo/service01/TestController.java

package com.example.demo.service02;import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;@RestController
@RequestMapping
public class TestController {private final RestTemplate restTemplate = new RestTemplate();@GetMapping("msg")public String msg() {return "service-02 服务中请求 service-01";}@GetMapping("say")public String say() {String html = restTemplate.getForObject("https://www.example.com/", String.class);String msg = restTemplate.getForObject("http://127.0.0.1:8001/msg", String.class);return String.format("%s<h1 style=\"text-align: center;\">%s</h1>", html, msg);}}

3、 运行

在这里插入图片描述

4、 目录结构

在这里插入图片描述

利用Eureka实现服务间数据请求

在这里插入图片描述

1、 创建项目

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

demo/pom.xml

<packaging>pom</packaging><modules><module>eureka-server</module><module>service-01</module><module>service-02</module>
</modules>

2、 添加依赖

demo/pom.xml

<!-- 用于服务间请求的依赖 -->
<!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-openfeign -->
<dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>

3、 demo/eureka-server

demo/eureka-server/src/main/resources/application.yml

server:port: 8001spring:application:name: eureka-servereureka:instance:hostname: www.eureka-server.comclient:register-with-eureka: false   # 是否将自己注册到 Eureka-Server 中,默认的为 truefetch-registry: false         # 是否需要拉取服务信息,默认未trueservice-url:defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/ # 注册中心地址

demo/eureka-server/src/main/java/com/example/demo/eurekaserver/EurekaServerApplication.java

package com.example.demo.eurekaserver;import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;@EnableEurekaServer
@SpringBootApplication
public class EurekaServerApplication {public static void main(String[] args) {SpringApplication.run(EurekaServerApplication.class, args);}}

4、 demo/service-01

demo/service-01/src/main/resources/application.yml

server:port: 8081spring:application:name: service-01eureka:instance:hostname: www.eureka-server.cominstance-id: service-01client:service-url:defaultZone: http://www.eureka-server.com:8001/eureka/management:endpoints:web:exposure:include: "*"

demo/service-01/src/main/java/com/example/demo/service01/Service01Application.java

package com.example.demo.service01;import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
public class Service01Application {public static void main(String[] args) {SpringApplication.run(Service01Application.class, args);}}

demo/service-01/src/main/java/com/example/demo/service01/api/IService02.java

package com.example.demo.service01.api;import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;@FeignClient(value = "SERVICE-02")
public interface IService02 {@GetMapping("/getMsg")public String getMsg();
}

demo/service-01/src/main/java/com/example/demo/service01/Service01Controller.java

package com.example.demo.service01;import com.example.demo.service01.api.IService02;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;import javax.annotation.Resource;@RestController
@RequestMapping
public class Service01Controller {@Resourceprivate IService02 service02;@GetMapping("/say")public String say(){return service02.getMsg();}@GetMapping("getMsg")public String getMsg() {return "SERVICE-02 调用 SERVICE-01";}}

5、 demo/service-02

demo/service-02/src/main/resources/application.yml

server:port: 8082spring:application:name: service-02eureka:instance:hostname: www.eureka-server.cominstance-id: service-02client:service-url:defaultZone: http://www.eureka-server.com:8001/eureka/management:endpoints:web:exposure:include: "*"

demo/service-02/src/main/java/com/example/demo/service02/Service02Application.java

package com.example.demo.service02;import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
public class Service02Application {public static void main(String[] args) {SpringApplication.run(Service02Application.class, args);}}

demo/service-02/src/main/java/com/example/demo/service02/api/IService01.java

package com.example.demo.service02.api;import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;@FeignClient(value = "SERVICE-01")
public interface IService01 {@GetMapping("/getMsg")public String getMsg();
}

demo/service-02/src/main/java/com/example/demo/service02/Service02Controller.java

package com.example.demo.service02;import com.example.demo.service02.api.IService01;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;import javax.annotation.Resource;@RestController
@RequestMapping
public class Service02Controller {@Resourceprivate IService01 service01;@GetMapping("/say")public String say(){return service01.getMsg();}@GetMapping("getMsg")public String getMsg() {return "SERVICE-01 调用 SERVICE-02";}}

6、 运行

优先运行 EurekaServerApplication 启动类

在这里插入图片描述

7、 目录结构

在这里插入图片描述


http://www.ppmy.cn/news/699001.html

相关文章

界面组件DevExpress WPF v23.1新版亮点 - 启动和内存优化

DevExpress WPF拥有120个控件和库&#xff0c;将帮助您交付满足甚至超出企业需求的高性能业务应用程序。通过DevExpress WPF能创建有着强大互动功能的XAML基础应用程序&#xff0c;这些应用程序专注于当代客户的需求和构建未来新一代支持触摸的解决方案。 无论是Office办公软件…

android触摸 apk,超级触控(流畅触屏)apk

很多安卓用户&#xff0c;手机永久以后都会出现卡屏&#xff0c;运行不流畅等显现&#xff0c;但是又束手无策&#xff0c;为了针对这一系列问题&#xff0c;强大的制作团队打造一款可以让手机飞一会儿的神器&#xff0c;超级触控app&#xff01;这是一款可以让你体验手机重未有…

android apk是什么文件,apk是什么文件?apk文件肿么打开?

APK是Android Package的缩写&#xff0c;即Android安装包(apk)。APK文件盒Symbian Sis或Sisx的文件格式差不多。通过将APK文件直接传到Android模拟器或Android手机中&#xff0c;然后执行并安装。apk文件和sis一样&#xff0c;把android sdk编译的工程打包成一个安装程序文件&a…

APK是什么

APK是AndroidPackage的缩写&#xff0c;即Android安装包(apk)。APK是类似Symbian Sis或Sisx的文件格式。通过将APK文件直接传到Android模拟器或Android手机中执行即可安装。apk文件和sis一样&#xff0c;把android sdk编译的工程打包成一个安装程序文件&#xff0c;格式为apk。…

网络应用名词解释(APP APK SDK GPS JDK IDE)

APP &#xff08;Application&#xff09;应用程序 &#xff1a;读作[p]。不限于操作系统&#xff0c;指的是一种可执行程序。例如&#xff1a;QQ是一种应用程序&#xff0c;有 QQ ios版&#xff0c;QQ Android版。 APK &#xff08;Android Package&#xff09;安卓安装包&am…

2D游戏知识点三、Unity生成Android手机apk程序

File->Build Settings 选择Android->Player Settngs 修改下名称和图标 选择一下平台&#xff0c;如果在Unity Hub里选的就是Android就直接build就行了 然后就是漫长的等待 提示缺少SDK、NDK、JDK请客官老爷们移步到我的另一篇文章 Unity Hub2.4和2.5安装2021和2020和201…

移动安全-APK加壳

概述 现阶段。我们知道Android中的反编译工作越来越让人操作熟练&#xff0c;我们辛苦的开发出一个APK&#xff0c;结果被人反编译了&#xff0c;那心情真心不舒服。虽然我们混淆&#xff0c;做到native层&#xff0c;但是这都是治标不治本。反编译的技术在更新&#xff0c;那…

内置apk

本文目的是实现内置apk和第三方apk通过aidl通信&#xff0c;着重说下&#xff0c;如何内置apk及内置时有关aidl的一些注意事项。一、内置带源码的apk 1. 准备工作&#xff1a; 1.1 Android源码 1.2 先在Android Studio中&#xff0c;通过AIDL实现Service[服务端]、Client[客户端…