Java 标签

开源博客Solo零基础搭建,以及Apache、Tomcat下多应用部署 有更新!

  |   1 评论   |   337 浏览

终于下定决心搭建一个博客,记录下日常的生活了。经过对比,还是觉得solo这个框架相对来说比较简单,同时也是对Java比较熟吧,在此感谢B3log的无私奉献。先来张张小妞的生活照吧。
1378805150jpg

搭建过程整体比较顺利,官方已经有比较详细的教程了,我主要修改采用了MariaDB。同时验证了以下参数的意义:

  1. 如果单个项目使用一个数据库的话,可以考虑去掉local.properties中的jdbc.tablePrefix,数据库表就不需要增加prefix了;
  2. 第二参数就是solo.properties中的uploadDir,如果配置相对路径,将是Tomcat(如果你使用Tomcat的话)的根目录。

另外,最主要的问题是解决同一域名访问Apache及Tomcat下多个应用的问题。

在Java中调用Python 有更新!

  |   0 评论   |   167 浏览

在微服务架构大行其道的今天,对于将程序进行嵌套调用的做法其实并不可取,甚至显得有些愚蠢。但有时候确实要面对这个问题,恰好我在项目中就遇到了这个问题,需要在Java程序中调用Python程序。关于在Java中调用Python程序的实现,根据不同的用途可以使用多种不同的方法,在这里就将在Java中调用Python程序的方式做一个总结。

方法一、直接通过Runtime进行调用,方法二、通过Jython调用。

How to Run Java Program Automatically on Tomcat Startup 有更新!

  |   0 评论   |   583 浏览

Recently I wanted to start my standalone Java Application on Tomcat Startup. Also found so many other related questions on net. i.e.

  • I need to run an application that can run automatically that when the tomcat starts..? any suggestions…?
  • how can I start my application by default on tomcat server start/restart?
  • Is it possible to edit tomcat startup services?
  • How to Start a service automatically when the tomcat starts
    ApacheTomcatCrunchifyTipsjpg

3 ways to start Appium Server from Java

  |   0 评论   |   116 浏览

When you start learning Appium or start writing your first test script with it, your initial approach (especially from a beginner’s point of view) would be to start and stop the Appium server manually. Initially, a lot of people start working with the GUI based Appium versions.

GUI versions of Appium are easy to use, and users can easily start and stop the Appium server manually using the controls provided in the tool. After some time, many people would download and install the latest versions of Appium, which most of the times would be a non-GUI version. And its still relatively easy to start and stop the non-GUI version of Appium manually.

Pros and cons of end to end testing tools

  |   0 评论   |   399 浏览

My background in test automation is based on using Selenium WebDriver and Java. Since JavaScript has been widely used for testing web applications, I have decided to investigate tools currently available on the market. I will use these tools to make different scripts and hence find their advantages and disadvantages.

I have investigated the following tools and syntax for automation:

  1. Selenium Webdriver + Java
  2. Selenium WebDriver + Cucumber + Java
  3. Selenium WebDriver + Jasmine syntax for JavaScript applications
  4. Selenium WebDriver + Mocha syntax for JavaScript applications
  5. Cypress
  6. Selenium WebDriver + Protractor
  7. Selenium WebDriver + NightWatch
  8. Selenium WebDriver + WebDriverIO

Redis高可用集群、哨兵模式(Redis-Sentinel)搭建配置详解 有更新!

  |   0 评论   |   121 浏览

由于本地环境的使用,所以搭建一个本地的Redis集群,本篇讲解Redis主从复制集群的搭建,使用的平台是Windows。为了使得集群在一部分节点下线或者无法与集群的大多数节点进行通讯的情况下, 仍然可以正常运作, Redis 集群对节点使用了主从复制功能: 集群中的每个节点都有 1 个至 N 个复制品(replica), 其中一个复制品为主节点(master), 而其余的 N-1 个复制品为从节点(slave)。
wKiom1N3nPbS5JMAAHj5MGbf50000jpg