mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-08 13:12:10 +00:00
DATAES-211 -clean up
This commit is contained in:
parent
8963123ffe
commit
924467ec94
@ -31,7 +31,7 @@ public class Utils {
|
|||||||
return (NodeClient) nodeBuilder().settings(Settings.builder()
|
return (NodeClient) nodeBuilder().settings(Settings.builder()
|
||||||
.put("http.enabled", "false")
|
.put("http.enabled", "false")
|
||||||
.put("path.data", "target/elasticsearchTestData")
|
.put("path.data", "target/elasticsearchTestData")
|
||||||
.put("path.home", "test-home-dir"))
|
.put("path.home", "target/test-home-dir"))
|
||||||
.clusterName(UUID.randomUUID().toString()).local(true).node()
|
.clusterName(UUID.randomUUID().toString()).local(true).node()
|
||||||
.client();
|
.client();
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ import org.springframework.data.elasticsearch.annotations.Field;
|
|||||||
@Document(indexName = "test-log-index", type = "test-log-type", shards = 1, replicas = 0, refreshInterval = "-1")
|
@Document(indexName = "test-log-index", type = "test-log-type", shards = 1, replicas = 0, refreshInterval = "-1")
|
||||||
public class LogEntity {
|
public class LogEntity {
|
||||||
|
|
||||||
private static final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
private static final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
private String id;
|
private String id;
|
||||||
@ -47,7 +47,7 @@ public class LogEntity {
|
|||||||
@Field(type = Ip)
|
@Field(type = Ip)
|
||||||
private String ip;
|
private String ip;
|
||||||
|
|
||||||
@Field(type = Date, format = DateFormat.basic_date_time)
|
@Field(type = Date)
|
||||||
private Date date;
|
private Date date;
|
||||||
|
|
||||||
private LogEntity() {
|
private LogEntity() {
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||||
|
|
||||||
<elasticsearch:node-client id="client" local="true" cluster-name="#{T(java.util.UUID).randomUUID().toString()}"
|
<elasticsearch:node-client id="client" local="true" cluster-name="#{T(java.util.UUID).randomUUID().toString()}"
|
||||||
http-enabled="false" path-data="target/elasticsearchTestData" path-home="test-home-dir"
|
http-enabled="false" path-data="target/elasticsearchTestData" path-home="target/test-home-dir"
|
||||||
path-configuration="node-client-configuration.yml"/>
|
path-configuration="node-client-configuration.yml"/>
|
||||||
|
|
||||||
<!--<elasticsearch:transport-client id="client" cluster-name="elasticsearch" cluster-nodes="127.0.0.1:9300" />-->
|
<!--<elasticsearch:transport-client id="client" cluster-name="elasticsearch" cluster-nodes="127.0.0.1:9300" />-->
|
||||||
|
@ -6,7 +6,8 @@
|
|||||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||||
|
|
||||||
<elasticsearch:node-client id="client" local="true"
|
<elasticsearch:node-client id="client" local="true"
|
||||||
cluster-name="#{T(java.util.UUID).randomUUID().toString()}" http-enabled="false" path-data="target/elasticsearchTestData"/>
|
cluster-name="#{T(java.util.UUID).randomUUID().toString()}" http-enabled="false"
|
||||||
|
path-data="target/elasticsearchTestData" path-home="target/test-home-dir"/>
|
||||||
|
|
||||||
<bean name="elasticsearchTemplate"
|
<bean name="elasticsearchTemplate"
|
||||||
class="org.springframework.data.elasticsearch.core.ElasticsearchTemplate">
|
class="org.springframework.data.elasticsearch.core.ElasticsearchTemplate">
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -1,80 +0,0 @@
|
|||||||
# Elasticsearch plugin descriptor file
|
|
||||||
# This file must exist as 'plugin-descriptor.properties' at
|
|
||||||
# the root directory of all plugins.
|
|
||||||
#
|
|
||||||
# A plugin can be 'site', 'jvm', or both.
|
|
||||||
#
|
|
||||||
### example site plugin for "foo":
|
|
||||||
#
|
|
||||||
# foo.zip <-- zip file for the plugin, with this structure:
|
|
||||||
# _site/ <-- the contents that will be served
|
|
||||||
# plugin-descriptor.properties <-- example contents below:
|
|
||||||
#
|
|
||||||
# site=true
|
|
||||||
# description=My cool plugin
|
|
||||||
# version=1.0
|
|
||||||
#
|
|
||||||
### example jvm plugin for "foo"
|
|
||||||
#
|
|
||||||
# foo.zip <-- zip file for the plugin, with this structure:
|
|
||||||
# <arbitrary name1>.jar <-- classes, resources, dependencies
|
|
||||||
# <arbitrary nameN>.jar <-- any number of jars
|
|
||||||
# plugin-descriptor.properties <-- example contents below:
|
|
||||||
#
|
|
||||||
# jvm=true
|
|
||||||
# classname=foo.bar.BazPlugin
|
|
||||||
# description=My cool plugin
|
|
||||||
# version=2.0.0-rc1
|
|
||||||
# elasticsearch.version=2.0
|
|
||||||
# java.version=1.7
|
|
||||||
#
|
|
||||||
### mandatory elements for all plugins:
|
|
||||||
#
|
|
||||||
# 'description': simple summary of the plugin
|
|
||||||
description=Groovy scripting integration for Elasticsearch
|
|
||||||
#
|
|
||||||
# 'version': plugin's version
|
|
||||||
version=2.2.0
|
|
||||||
#
|
|
||||||
# 'name': the plugin name
|
|
||||||
name=lang-groovy
|
|
||||||
|
|
||||||
### mandatory elements for site plugins:
|
|
||||||
#
|
|
||||||
# 'site': set to true to indicate contents of the _site/
|
|
||||||
# directory in the root of the plugin should be served.
|
|
||||||
site=false
|
|
||||||
#
|
|
||||||
### mandatory elements for jvm plugins :
|
|
||||||
#
|
|
||||||
# 'jvm': true if the 'classname' class should be loaded
|
|
||||||
# from jar files in the root directory of the plugin.
|
|
||||||
# Note that only jar files in the root directory are
|
|
||||||
# added to the classpath for the plugin! If you need
|
|
||||||
# other resources, package them into a resources jar.
|
|
||||||
jvm=true
|
|
||||||
#
|
|
||||||
# 'classname': the name of the class to load, fully-qualified.
|
|
||||||
classname=org.elasticsearch.script.groovy.GroovyPlugin
|
|
||||||
#
|
|
||||||
# 'java.version' version of java the code is built against
|
|
||||||
# use the system property java.specification.version
|
|
||||||
# version string must be a sequence of nonnegative decimal integers
|
|
||||||
# separated by "."'s and may have leading zeros
|
|
||||||
java.version=1.7
|
|
||||||
#
|
|
||||||
# 'elasticsearch.version' version of elasticsearch compiled against
|
|
||||||
# You will have to release a new version of the plugin for each new
|
|
||||||
# elasticsearch release. This version is checked when the plugin
|
|
||||||
# is loaded so Elasticsearch will refuse to start in the presence of
|
|
||||||
# plugins with the incorrect elasticsearch.version.
|
|
||||||
elasticsearch.version=2.2.0
|
|
||||||
#
|
|
||||||
### deprecated elements for jvm plugins :
|
|
||||||
#
|
|
||||||
# 'isolated': true if the plugin should have its own classloader.
|
|
||||||
# passing false is deprecated, and only intended to support plugins
|
|
||||||
# that have hard dependencies against each other. If this is
|
|
||||||
# not specified, then the plugin is isolated by default.
|
|
||||||
isolated=true
|
|
||||||
#
|
|
@ -1,57 +0,0 @@
|
|||||||
/*
|
|
||||||
* Licensed to Elasticsearch under one or more contributor
|
|
||||||
* license agreements. See the NOTICE file distributed with
|
|
||||||
* this work for additional information regarding copyright
|
|
||||||
* ownership. Elasticsearch licenses this file to you under
|
|
||||||
* the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
* not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
grant {
|
|
||||||
// needed to generate runtime classes
|
|
||||||
permission java.lang.RuntimePermission "createClassLoader";
|
|
||||||
// needed by IndyInterface
|
|
||||||
permission java.lang.RuntimePermission "getClassLoader";
|
|
||||||
// needed by groovy engine
|
|
||||||
permission java.lang.RuntimePermission "accessClassInPackage.sun.reflect";
|
|
||||||
permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
|
|
||||||
// needed by GroovyScriptEngineService to close its classloader (why?)
|
|
||||||
permission java.lang.RuntimePermission "closeClassLoader";
|
|
||||||
// Allow executing groovy scripts with codesource of /untrusted
|
|
||||||
permission groovy.security.GroovyCodeSourcePermission "/untrusted";
|
|
||||||
|
|
||||||
// Standard set of classes
|
|
||||||
permission org.elasticsearch.script.ClassPermission "<<STANDARD>>";
|
|
||||||
// groovy runtime (TODO: clean these up if possible)
|
|
||||||
permission org.elasticsearch.script.ClassPermission "groovy.grape.GrabAnnotationTransformation";
|
|
||||||
permission org.elasticsearch.script.ClassPermission "groovy.json.JsonOutput";
|
|
||||||
permission org.elasticsearch.script.ClassPermission "groovy.lang.Binding";
|
|
||||||
permission org.elasticsearch.script.ClassPermission "groovy.lang.GroovyObject";
|
|
||||||
permission org.elasticsearch.script.ClassPermission "groovy.lang.GString";
|
|
||||||
permission org.elasticsearch.script.ClassPermission "groovy.lang.Script";
|
|
||||||
permission org.elasticsearch.script.ClassPermission "groovy.util.GroovyCollections";
|
|
||||||
permission org.elasticsearch.script.ClassPermission "org.codehaus.groovy.ast.builder.AstBuilderTransformation";
|
|
||||||
permission org.elasticsearch.script.ClassPermission "org.codehaus.groovy.reflection.ClassInfo";
|
|
||||||
permission org.elasticsearch.script.ClassPermission "org.codehaus.groovy.runtime.GStringImpl";
|
|
||||||
permission org.elasticsearch.script.ClassPermission "org.codehaus.groovy.runtime.powerassert.ValueRecorder";
|
|
||||||
permission org.elasticsearch.script.ClassPermission "org.codehaus.groovy.runtime.powerassert.AssertionRenderer";
|
|
||||||
permission org.elasticsearch.script.ClassPermission "org.codehaus.groovy.runtime.ScriptBytecodeAdapter";
|
|
||||||
permission org.elasticsearch.script.ClassPermission "org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation";
|
|
||||||
permission org.elasticsearch.script.ClassPermission "org.codehaus.groovy.vmplugin.v7.IndyInterface";
|
|
||||||
permission org.elasticsearch.script.ClassPermission "sun.reflect.ConstructorAccessorImpl";
|
|
||||||
|
|
||||||
permission org.elasticsearch.script.ClassPermission "groovy.lang.Closure";
|
|
||||||
permission org.elasticsearch.script.ClassPermission "org.codehaus.groovy.runtime.GeneratedClosure";
|
|
||||||
permission org.elasticsearch.script.ClassPermission "groovy.lang.MetaClass";
|
|
||||||
permission org.elasticsearch.script.ClassPermission "groovy.lang.Range";
|
|
||||||
};
|
|
Loading…
x
Reference in New Issue
Block a user