本文将分享仿网易新闻的滑动视图有没有android版本的?的详细内容,并且还将对仿网易新闻的滑动视图有没有android版本的软件进行详尽解释,此外,我们还将为大家带来关于.NETCore开发日志——
本文将分享仿网易新闻的滑动视图有没有 android 版本的?的详细内容,并且还将对仿网易新闻的滑动视图有没有 android 版本的软件进行详尽解释,此外,我们还将为大家带来关于.NET Core 开发日志 ——Linux 版本的 SQL Server、0.9.0.RELEASE 版本的 spring cloud alibaba nacos 实例、2020 版本的 goland 如何使用 golang1.20 版本、2022.1 版本的 IntelliJ IDEA 已经推送了的相关知识,希望对你有所帮助。
本文目录一览:- 仿网易新闻的滑动视图有没有 android 版本的?(仿网易新闻的滑动视图有没有 android 版本的软件)
- .NET Core 开发日志 ——Linux 版本的 SQL Server
- 0.9.0.RELEASE 版本的 spring cloud alibaba nacos 实例
- 2020 版本的 goland 如何使用 golang1.20 版本
- 2022.1 版本的 IntelliJ IDEA 已经推送了
仿网易新闻的滑动视图有没有 android 版本的?(仿网易新闻的滑动视图有没有 android 版本的软件)
仿网易新闻的滑动视图有没有 android 版本的?.NET Core 开发日志 ——Linux 版本的 SQL Server
SQL Server 2017 版本已经可以在 Linux 系统上安装,但我在尝试.NET Core 跨平台开发的时候使用的是 Mac 系统,所以这里记录了在 Mac 上安装 SQL Server 的过程。
最新的 SQL Server 没有专门为 Mac 系统准备安装包,但由于 Mac 系统上支持 Docker,所以可以用一种变通的方式 —— 在 Docker 内部安装 Linux 版本的 SQL Server。
系统要求
因为我的 Macbook Air 型号比较老,硬件条件很一般,所以首先确定下是否满足安装 SQL Server 的条件。官方给出的配置如下:
内存 | 2 GB |
文件系统 | XFS or EXT4 (other file systems, such as BTRFS, are unsupported) |
磁盘空间 | 6 GB |
处理器速度 | 2 GHz |
处理器核数 | 2 cores |
处理器类型 | x64-compatible only |
要求不高,看来没有什么问题。
Docker 应用程序
Mac 版本的 Docker 可以通过下列地址下载: Docker Community Edition for Mac 完成安装后还可以用 docker -v
命令验证结果。
Docker 镜像
有了 Docker 程序后,第一步先要做的事情是拉取 SQL Server 用于 linux 系统的镜像。
docker pull microsoft/mssql-server-linux:2017-latest
Docker 容器
接着通过已拉取的镜像启动容器
docker run -d --name macsqlserver -e ''ACCEPT_EULA=Y'' -e ''SA_PASSWORD=Passw1rd'' -e ''MSSQL_PID=Developer'' -p 1433:1433 microsoft/mssql-server-linux:2017-latest
在此命令中所用的参数都有实际用途: -d 以 daemon 模式运行容器,即所启动的应用程序在后台运行 --name 为容器赋予名称 -e ''ACCEPT_EULA=Y'' 在容器内部设定环境变量,用于确认接受终端用户许可协议 —— end-user license agreement (EULA) -e ''SA_PASSWORD=Passw1rd'' 在容器内部设定 sa 账号的密码 -e ''MSSQL_PID=Developer'' 也是一个环境变量,令 SQL Server 以开发者版本运行 -p 1433:1433 映射本地 1433 端口到容器内部 SQL Server 的 1433 端口
执行上述命令后,再执行 docker ps -a
,可以查看已启动容器的状态。如果状态是 Up 的话,说明容器正常运行。
SQL Server 客户端
由于 SQL Server Management Studio 没有被移植到其它系统上,所以要想在 Mac 系统以客户端的方式连接已安装的 SQL Server,需要通过第三方工具。sql-cli 便是其中一种用 nodejs 开发的客户端。
先是用 npm 方式安装 sql-cli。
npm install -g sql-cli
完成安装后用以下命令进入 (所输入的密码需匹配实际设定的):
mssql -u sa -p Passw1rd
若连接成功,再输入.databases
命令,就可以看到熟悉的 SQL Server 自带的四个数据库。
Visual Studio Code 插件
使用 VSC 开发的一大好处是其包含丰富的插件。比如安装完 mssql 这个插件后,便可以利用 VSC 的便利,进行 SQL 程序的开发。
举个简单的例子: ⌘N,新建一个文件 ⌘K M,将语言模式改为 SQL ⇧⌘P,打开命令框,输入 sql,选中 MS SQL: Connect
,再选择 Create Connection Profile
,然后输入一系列数据库连接配置。 如果最后在 VSC 的右下角看到的是类似下面的样子,说明已经成功连接数据库。
接着,在文件内输入 SQL 语句
use master
select * from spt_monitor
⇧⌘E,执行上述语句。可以在新的窗口中看到结果。
值得一提的是,在结果窗口内,还可以通过文件形式保存记录。
0.9.0.RELEASE 版本的 spring cloud alibaba nacos 实例
简而言之,nacos 与 eureka 的不同之处有三:后台老板、部署方式、功能。nacos 是阿里的,eureka 是奈飞的;nacos 有自己的安装包,需要独立部署,eureka 仅作为一个服务组件,引入 jar 包即可;nacos=eureka+config,它既是注册中心,也是配置中心。
如何使用 nacos?先下载安装包(下载地址 https://github.com/alibaba/nacos/releases),打开下载页 -> 点击目前最新版本 1.1.3 跳到下载页 -> 点击压缩包 -> 下载到本地(E 盘 download 目录)后解压 -> 通过命令行启动 nacos:
C:\Users\wulf>e:
E:\>cd download\nacos\bin
E:\download\nacos\bin>startup.cmd -m standalone
,--.
,--.''|
,--,: : | Nacos 1.1.3
,`--.''`| '' : ,---. Running in stand alone mode, All function modules
| : : | | '' ,''\ .--.--. Port: 8848
: | \ | : ,--.--. ,---. / / | / / '' Pid: 32916
| : '' ''; | / \ / \. ; ,. :| : /`./ Console: http://10.10.100.110:8848/nacos/index.html
'' '' ;. ;.--. .-. | / / '''' | |: :| : ;_
| | | \ | \__\/: . .. '' / '' | .; : \ \ `. https://nacos.io
'' : | ; .'' ," .--.; |'' ; :__| : | `----. \
| | ''`--'' / / ,. |'' | ''.''|\ \ / / /`--'' /
'' : | ; : .'' \ : : `----'' ''--''. /
; |.'' | , .-./\ \ / `--''---''
''---'' `--`---'' `----''
2019-08-21 10:44:30,073 INFO Bean ''org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration'' of type [org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration$$EnhancerBySpringCGLIB$$209b3f7a] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-08-21 10:44:30,213 INFO Bean ''objectPostProcessor'' of type [org.springframework.security.config.annotation.configuration.AutowireBeanFactoryObjectPostProcessor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-08-21 10:44:30,225 INFO Bean ''org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@6e9175d8'' of type [org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-08-21 10:44:30,234 INFO Bean ''org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration'' of type [org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration$$EnhancerBySpringCGLIB$$456fe22c] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-08-21 10:44:30,241 INFO Bean ''methodSecurityMetadataSource'' of type [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-08-21 10:44:32,145 INFO Tomcat initialized with port(s): 8848 (http)
2019-08-21 10:44:35,148 INFO Root WebApplicationContext: initialization completed in 8513 ms
2019-08-21 10:44:40,366 INFO Initializing ExecutorService ''applicationTaskExecutor''
2019-08-21 10:44:40,922 INFO Adding welcome page: class path resource [static/index.html]
2019-08-21 10:44:41,424 INFO Creating filter chain: Ant [pattern=''/''], []
2019-08-21 10:44:41,435 INFO Creating filter chain: Ant [pattern=''/**/*.css''], []
2019-08-21 10:44:41,435 INFO Creating filter chain: Ant [pattern=''/**/*.js''], []
2019-08-21 10:44:41,438 INFO Creating filter chain: Ant [pattern=''/**/*.html''], []
2019-08-21 10:44:41,442 INFO Creating filter chain: Ant [pattern=''/**/*.map''], []
2019-08-21 10:44:41,442 INFO Creating filter chain: Ant [pattern=''/**/*.svg''], []
2019-08-21 10:44:41,444 INFO Creating filter chain: Ant [pattern=''/**/*.png''], []
2019-08-21 10:44:41,444 INFO Creating filter chain: Ant [pattern=''/**/*.ico''], []
2019-08-21 10:44:41,444 INFO Creating filter chain: Ant [pattern=''/console-fe/public/**''], []
2019-08-21 10:44:41,446 INFO Creating filter chain: Ant [pattern=''/v1/auth/login''], []
2019-08-21 10:44:41,447 INFO Creating filter chain: Ant [pattern=''/v1/console/health/**''], []
2019-08-21 10:44:41,447 INFO Creating filter chain: Ant [pattern=''/v1/cs/**''], []
2019-08-21 10:44:41,447 INFO Creating filter chain: Ant [pattern=''/v1/ns/**''], []
2019-08-21 10:44:41,447 INFO Creating filter chain: Ant [pattern=''/v1/cmdb/**''], []
2019-08-21 10:44:41,450 INFO Creating filter chain: Ant [pattern=''/actuator/**''], []
2019-08-21 10:44:41,454 INFO Creating filter chain: Ant [pattern=''/v1/console/server/**''], []
2019-08-21 10:44:41,498 INFO Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@6c8bca63, org.springframework.security.web.context.SecurityContextPersistenceFilter@6d24ffa1, org.springframework.security.web.header.HeaderWriterFilter@74cadd41, org.springframework.security.web.authentication.logout.LogoutFilter@42a9e5d1, com.alibaba.nacos.console.filter.JwtAuthenticationTokenFilter@2364305a, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@773f7880, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@4c51bb7, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@470a696f, org.springframework.security.web.session.SessionManagementFilter@55e8ec2f, org.springframework.security.web.access.ExceptionTranslationFilter@62fad19, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@5536379e]
2019-08-21 10:44:41,566 INFO Exposing 2 endpoint(s) beneath base path ''/actuator''
2019-08-21 10:44:41,616 INFO Initializing ExecutorService ''taskScheduler''
2019-08-21 10:44:41,773 INFO Tomcat started on port(s): 8848 (http) with context path ''/nacos''
2019-08-21 10:44:41,778 INFO Nacos Log files: E:\download\nacos/logs/
2019-08-21 10:44:41,783 INFO Nacos Conf files: E:\download\nacos/conf/
2019-08-21 10:44:41,783 INFO Nacos Data files: E:\download\nacos/data/
2019-08-21 10:44:41,784 INFO Nacos started successfully in stand alone mode.
2019-08-21 10:44:44,665 INFO Initializing Servlet ''dispatcherServlet''
2019-08-21 10:44:44,686 INFO Completed initialization in 20 ms
我们通过 localhost:8848/nacos 可以访问到它,默认用户名密码都是 nacos:
我们创建个项目来注册到这个 nacos,三板斧再来:
1、pom 引入 spring boot、spring cloud、spring cloud alibaba 和 nacos 依赖:
<?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.wlf</groupId>
<artifactId>spring-cloud-alibaba-provider</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.7.RELEASE</version>
</parent>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Greenwich.SR2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
<version>0.9.0.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
2、application 配置 nacos 地址:
#端口
server.port=8282
#应用名
spring.application.name=lxytrans-provider
#注册中心
spring.cloud.nacos.discovery.server-addr=localhost:8848
3、启动类加注解 @EnableDiscoveryClient:
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@EnableDiscoveryClient
@SpringBootApplication
public class TransProviderApplication {
public static void main(String[] args) {
SpringApplication.run(TransProviderApplication.class, args);
}
@Slf4j
@RestController
static class TestController {
@GetMapping("/hello")
public String hello() {
return "hello";
}
@GetMapping("/hey")
public String hey() throws InterruptedException {
Thread.sleep(2000);
return "hey";
}
}
}
跑起来后我们看下 nacos 控制台实例:
以上是服务提供方注册到 nacos, 消费方的注册跟服务方没啥不同,这里就不再列出。nacos 更多介绍参见 https://nacos.io/zh-cn/docs/what-is-nacos.html。至于消费方如何通过 nacos 调用提供方服务,参见 0.9.0.RELEASE 版本的 spring cloud alibaba nacos+feign 实例。
2020 版本的 goland 如何使用 golang1.20 版本
2020 版本的 goland 如何使用 golang1.20 版本
问题:使用报错,如图所示
解决办法:
1 升级 goland 版本
2
重启 goland
2022.1 版本的 IntelliJ IDEA 已经推送了
发现新版本的 IntelliJ IDEA 已经推送了。
https://www.ossez.com/t/2022-1-intellij-idea/14005
我们今天的关于仿网易新闻的滑动视图有没有 android 版本的?和仿网易新闻的滑动视图有没有 android 版本的软件的分享已经告一段落,感谢您的关注,如果您想了解更多关于.NET Core 开发日志 ——Linux 版本的 SQL Server、0.9.0.RELEASE 版本的 spring cloud alibaba nacos 实例、2020 版本的 goland 如何使用 golang1.20 版本、2022.1 版本的 IntelliJ IDEA 已经推送了的相关信息,请在本站查询。
本文标签: