小编Ale*_*NIS的帖子

Spring Boot App不会部署在Glassfish 4.1上

我有一个香草弹簧启动应用程序,由以下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>xxx.alexius</groupId>
    <artifactId>myapp</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>war</packaging>

    <name>my app</name>
<description>Core Application Platform</description>
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.2.2.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <java.version>1.7</java.version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-mongodb</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-mobile</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-security</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-social-facebook</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-social-twitter</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-thymeleaf</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <version>9.4-1201-jdbc41</version>
        <scope>runtime</scope>
    </dependency>
    <dependency> …
Run Code Online (Sandbox Code Playgroud)

java spring glassfish spring-boot

9
推荐指数
1
解决办法
1万
查看次数

通过powershell在Windows 10中添加国际英文键盘

一个已知的问题是,在 Windows 10 中,当您决定添加多种语言时,您最终会得到多个无法摆脱的键盘。为了只有希腊语和英语键盘,我使用的一个众所周知的解决方案是创建一个在启动时运行的 powershell 脚本,其中包含以下内容。

$1 = Get-WinUserLanguageList
$1.RemoveAll( { $args[0].LanguageTag -clike '*' } )
$1.Add("el")
$1.Add("en-US")
Set-WinUserLanguageList $1 -Force
Run Code Online (Sandbox Code Playgroud)

我遇到的一个小问题是,我想使用英语国际标准键盘,而不是纯英语,这样我就可以添加法语口音。该键盘安装在托盘上时的标签为 EN-INTL。

我知道我需要修改的行是,$1.Add("en-US")但我不知道要使用哪个属性。

有人有这个信息可以分享吗?

亲切的问候,阿莱克修斯

windows powershell keyboard-layout windows-10

7
推荐指数
1
解决办法
4197
查看次数

@cachable问题 - 方法不缓存

我有一个使用@Cachable的方法

@Cacheable(value="airport", key="#filter")
public static String getAirport(String filter, SessionFactory sessionFactory){
    String airportsDisplay = "";
    Session session = sessionFactory.openSession();
    airportsDisplay = (String) session.createQuery("select iata from Airports a where a.displaystr = :accfilter").setString("accfilter", filter.toUpperCase()).uniqueResult();
    session.close();
    return airportsDisplay;
}
Run Code Online (Sandbox Code Playgroud)

它所做的就是使用给定过滤器的数据库查询并返回机场名称.

xml configuratin是

<cache name="airport"
   maxElementsInMemory="100"
   eternal="false"
   timeToIdleSeconds="1200"
   timeToLiveSeconds="1200"
   overflowToDisk="true"
   maxElementsOnDisk="10000000"
   diskPersistent="true"
   diskExpiryThreadIntervalSeconds="1200"
   memoryStoreEvictionPolicy="LRU"/>
Run Code Online (Sandbox Code Playgroud)

问题是它不会缓存结果!

在部署时,airport.data会正常创建,但无论我从我的网络应用程序调用该方法多少次,它总是空的.

安妮的建议?

spring spring-mvc ehcache

0
推荐指数
1
解决办法
156
查看次数

MariaDB 中的视图定义不是使用 mysqldump 创建的

我在 MariaDB 10.1.25 中有一个数据库,其中有许多表和 20 个视图。当我尝试使用 mysqldump 备份数据库时,它对于表工作正常,但在视图定义中,它无法像表那样创建创建语句。生成的代码是这样的:

--
-- Temporary table structure for view `qry_clientes`
--

DROP TABLE IF EXISTS `qry_clientes`;
/*!50001 DROP VIEW IF EXISTS `qry_clientes`*/;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `qry_clientes` (
  `Id` tinyint NOT NULL,
  `Cliente` tinyint NOT NULL,
  `Direccion` tinyint NOT NULL,
  `Ciudad` tinyint NOT NULL,
  `Fono` tinyint NOT NULL,
  `Fax` tinyint NOT NULL,
  `Email` tinyint NOT NULL,
  `Ruc` tinyint NOT NULL,
  `tipo` tinyint NOT NULL
) ENGINE=MyISAM */; …
Run Code Online (Sandbox Code Playgroud)

mysql backup mariadb

0
推荐指数
1
解决办法
1092
查看次数