context

tomcat如何配置context的docBase

拜拜、爱过 提交于 2020-01-12 05:04:01
docbase是web应用和本地路径,path是tomcat访问这个应用的URL路径。 Tomcat的项目部署方式有以下三种: 1.直接把项目复制到Tomcat安装目录的webapps目录中,这是最简单的一种Tomcat项目部署的方法,也是初学者最常用的方法。 2.在tomcat安装目录中有一个conf文件夹,打开此文件夹,其中包含配置文件server.xml,打开配置文件,并在<host>和</host>之间插入如下语句。 <Context path="/hello" docBase="F:\eclipse3.2\workspace\hello\WebRoot" debug="0" privileged="true"> </Context> 其中,docBase为设置项目的路径。 3.在conf目录中,在Catalina\localhost(此处需要注意目录的大小写)目录下新建一个 XML文件 ,任意命名,只要和当前文件中的文件名不重复即可,代码如下。 <Context path="/hello" docBase="D:\eclipse3.2\workspace\hello\WebRoot" debug="0" privileged="true"> </Context> 第三种方法相对来说比较灵活,并且可以设置别名。 来源: https://www.cnblogs.com

自己关于SSM框架的搭建

依然范特西╮ 提交于 2020-01-12 05:03:04
第一步   导入相应的包    spring springmvc 需要的包   spring-webmvc   spring-aop   spring-beans   apring-context   spring-core   spring-web   spring-expression   commons-logging   spring-jdbc JDBC需要的包   spring-jdbc   spring-tx   spring-aspects面向切面   spring-aspects   aspectjweaver   MyBats的包   mybatis      MyBatis整合Spring的适配包   mybatis-spring   c3p0 数据库连接池、驱动   mysql-connection   c3p0   其他   jstl servlet-api,junit   jstl   javax.servlet-api   junit   这些jar包,就请自己找一下。如果是maven请在https://mvnrepository.com/这里找包。   请将这些包,放在WebRoot/WEN-INF/lib 下。   下面来配置web.xml文件 1、启动Spring的容器 <context-param> <param-name

Android SQLITE 操作工具类

一笑奈何 提交于 2020-01-12 04:18:08
首先创建一个类 DatabaseHelper 继承SQLiteOpenHelper帮助类,定义数据库版本,数据库名称,创建表名。 private static final int DATABASE_VERSION = 1; //数据库版本号 private static final String DATABASE_NAME = "Test"; //数据库名称 private static final String HR_B_DEPT = "HR_B_DEPT";//部门 初始化 public DatabaseHelper(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } 创建表 @Override public void onCreate(SQLiteDatabase db) { String sqldept = "create table HR_B_DEPT(INNERID String PRIMARY KEY ,DEPTCODE text,DEPTNAME text,PARENTID text)"; db.execSQL(sqldept); } 创建一个类 UseDatabase, public class UseDatabase { Context context;

基于docker使用rancher集群之3---rancher/server容器报错

≯℡__Kan透↙ 提交于 2020-01-12 04:11:48
Error response from daemon: devmapper: Error mounting ‘/dev/mapper/docker-253:1-483003-e82254974a31cc7257eb5fff4102045589412748c0b61aeede0530738b5f046a’ on ‘/var/lib/docker/devicemapper/mnt/e82254974a31cc7257eb5fff4102045589412748c0b61aeede0530738b5f046a’. fstype=xfs options=nouuid,context=“system_u:object_r:svirt_sandbox_file_t:s0:c496,c860”: invalid argument <4>[ 2011.472341] XFS (dm-3): unknown mount option [context]. <4>[ 2011.609427] XFS (dm-3): unknown mount option [context]. <4>[ 2011.761361] XFS (dm-3): unknown mount option [context]. <4>[ 2074.901610] XFS (dm-3): unknown mount option

Glide4.9版本自定义下载类型

♀尐吖头ヾ 提交于 2020-01-11 20:46:09
这是个工具类,主要看loadCornersImgByLocal方法中的逻辑 示例代码如下: class GlideUtil { companion object{ /** 加载网络图片 */ fun loadNormalImgByNet(context: Context,netUrl: String,imageView: ImageView){ Glide.with(context).load(netUrl).apply(normalOption()).into(imageView) } /** 加载网络图片 */ fun loadCircleImgByNet(context: Context,netUrl: String,imageView: ImageView){ Glide.with(context).load(netUrl).apply(circleOption()).into(imageView) } /** 加载本地图片 */ fun loadCircleImgByLocal(context: Context, localUrl: String, imageView: ImageView){ Glide.with(context).load(Uri.fromFile(File(localUrl))).apply(circleOption()).into

在GLSurfaceView上添加Layout控件(android)

心已入冬 提交于 2020-01-11 10:22:23
查找了很久,才找出在GLSurfaceView上添加控件的方法。废话不说,本例实现了一个Native opengl es 程序,绘制了一个旋转三角形;当然主题是在GLSurfaceView上添加Layout控件。主要添加了SlidingDrawer和ImageButton。 源码: http://files.cnblogs.com/maadiah/GLSurfaceView_Overlay.zip 你可以自己修改、把玩。 底部四个是ImageButton,右边是弹出的SlidingDrawer(很不好意思,手头没有像样的图片编辑器,简单点,用内置的icon.png)。 主要注意这几点: 1.GLSurfaceView要开启xml导入插件功能,所以用GLSurfaceView(Context context, AttributeSet attrs)构造函数。(本例是自己实现的 GLSurfaceView )   我是这样获得 AttributeSet参数的: 1 Resources res = this.getResources();2 XmlPullParser parser = res.getXml(R.layout.glsurface_overlay);3 AttributeSet attributes = Xml.asAttributeSet(parser); 2

Spring集成jedis简单实例

浪尽此生 提交于 2020-01-11 10:09:34
jedis是redis的java客户端,spring将redis连接池作为一个bean配置。 redis连接池分为两种,一种是“redis.clients.jedis.ShardedJedisPool”,这是基于hash算法的一种分布式集群redis客户端连接池。 另一种是“redis.clients.jedis.JedisPool”,这是单机环境适用的redis连接池。 maven导入相关包: <!-- redis依赖包 --> <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> <version>2.9.0</version> </dependency> ShardedJedisPool 是redis集群客户端的对象池,可以通过他来操作ShardedJedis,下面是ShardedJedisPool的xml配置,spring-jedis.xml: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context=

android之对不同的页面管理

本小妞迷上赌 提交于 2020-01-11 08:25:18
一、界面状态有哪些 在Android中,不管是activity或者fragment,在加载视图的时候都有可能会出现多种不同的状态页面View。比较多的有下面几种: 1、内容界面,也就是正常有数据页面 2、加载数据中,加载loading 3、加载数据错误,请求数据异常 4、加载后没有数据,请求数据为空 5、没有网络,网络异常 场景: a、加载网络数据时,需要用户等待的场景,显示一个加载的Loading动画可以让用户知道App正在加载数据,而不是程序卡死,给用这样可以给户较好的使用体验。 b、当加载的数据为空时显示一个数据为空的视图、在数据加载失败时显示加载失败对应的UI并支持点击重试会比白屏的用户体验更好一些。 c、加载中、加载失败、空数据等不同状态页面风格,一般来说在App内的所有页面中需要保持一致,也就是需要做到全局统一。 二、采用include方式管理 直接把这些界面include到main界面中,然后动态去切换界面,具体一点的做法如下所示。 在布局中,会存放多个状态的布局。然后在页面中根据逻辑将对应的布局给显示或者隐藏,但存在诸多问题。 存在的问题分析 1、后来发现这样处理不容易复用到其他项目中,代码复用性很低 2、在activity中处理这些状态的显示和隐藏比较乱 3、调用setContentView方法时,是将所有的布局给加载绘制出来。其实没有必要 4

Spring配置数据源(数据库连接池)

好久不见. 提交于 2020-01-11 04:55:45
Spring配置数据源(数据库连接池) 主要针对c3p0和durid连接池进行配置 数据源(连接池)的作用 数据源(连接池)是提高程序性能而出现的,事先实例化数据源,初始化部分连接资源,使用连接资源时从数据源中获取,使用完毕后将连接资源归还给数据源。 其基本的步骤如下 : 导入数据源的坐标和数据库驱动坐标 创建数据源对象 设置数据源的基本连接数据 使用数据源获取连接资源和归还连接资源 配置c3p0连接池 <bean id="c3p0DataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"> <property name="driverClass" value="com.mysql.jdbc.Driver"/> <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/数据库名"/> <property name="user" value="root"/> <property name="password" value="root"/> </bean> 配置druid连接池 <bean id="druidDataSource" class="com.alibaba.druid.pool.DruidDataSource"> <property name=

Android TV ScrollView选中子控件居中并且平滑滚动

杀马特。学长 韩版系。学妹 提交于 2020-01-11 04:28:43
Android TV ScrollView选中子控件居中并且平滑滚动 第一次写,不会上传视频,直接上代码了 NestedScrollView package com.gfsoftware.launcher.view; import android.content.Context; import android.graphics.Rect; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.widget.NestedScrollView; import android.util.AttributeSet; import android.util.Log; import android.view.FocusFinder; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.View; import android.widget.FrameLayout; import com.gfsoftware.launcher.listener.ScrollViewListener; import com