Skip to content

Commit 80825c6

Browse files
committed
t
1 parent 5f5a1d1 commit 80825c6

File tree

7 files changed

+80
-144
lines changed

7 files changed

+80
-144
lines changed

.classpath

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,20 @@
2828
<attribute name="maven.pomderived" value="true"/>
2929
</attributes>
3030
</classpathentry>
31-
<classpathentry kind="src" path=".apt_generated">
31+
<classpathentry kind="src" path="target/generated-sources/annotations">
3232
<attributes>
3333
<attribute name="optional" value="true"/>
34+
<attribute name="maven.pomderived" value="true"/>
35+
<attribute name="ignore_optional_problems" value="true"/>
36+
<attribute name="m2e-apt" value="true"/>
3437
</attributes>
3538
</classpathentry>
36-
<classpathentry kind="src" output="target/test-classes" path=".apt_generated_tests">
39+
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
3740
<attributes>
3841
<attribute name="optional" value="true"/>
42+
<attribute name="maven.pomderived" value="true"/>
43+
<attribute name="ignore_optional_problems" value="true"/>
44+
<attribute name="m2e-apt" value="true"/>
3945
<attribute name="test" value="true"/>
4046
</attributes>
4147
</classpathentry>

.factorypath

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -60,45 +60,24 @@
6060
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/velocity/velocity-engine-core/2.0/velocity-engine-core-2.0.jar" enabled="true" runInBatchMode="false"/>
6161
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-lang3/3.7/commons-lang3-3.7.jar" enabled="true" runInBatchMode="false"/>
6262
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar" enabled="true" runInBatchMode="false"/>
63-
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-test/2.0.1.RELEASE/spring-boot-starter-test-2.0.1.RELEASE.jar" enabled="true" runInBatchMode="false"/>
64-
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-test/2.0.1.RELEASE/spring-boot-test-2.0.1.RELEASE.jar" enabled="true" runInBatchMode="false"/>
65-
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-test-autoconfigure/2.0.1.RELEASE/spring-boot-test-autoconfigure-2.0.1.RELEASE.jar" enabled="true" runInBatchMode="false"/>
66-
<factorypathentry kind="VARJAR" id="M2_REPO/com/jayway/jsonpath/json-path/2.4.0/json-path-2.4.0.jar" enabled="true" runInBatchMode="false"/>
67-
<factorypathentry kind="VARJAR" id="M2_REPO/net/minidev/json-smart/2.3/json-smart-2.3.jar" enabled="true" runInBatchMode="false"/>
68-
<factorypathentry kind="VARJAR" id="M2_REPO/net/minidev/accessors-smart/1.2/accessors-smart-1.2.jar" enabled="true" runInBatchMode="false"/>
69-
<factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm/5.0.4/asm-5.0.4.jar" enabled="true" runInBatchMode="false"/>
70-
<factorypathentry kind="VARJAR" id="M2_REPO/org/assertj/assertj-core/3.9.1/assertj-core-3.9.1.jar" enabled="true" runInBatchMode="false"/>
71-
<factorypathentry kind="VARJAR" id="M2_REPO/org/mockito/mockito-core/2.15.0/mockito-core-2.15.0.jar" enabled="true" runInBatchMode="false"/>
72-
<factorypathentry kind="VARJAR" id="M2_REPO/net/bytebuddy/byte-buddy/1.7.11/byte-buddy-1.7.11.jar" enabled="true" runInBatchMode="false"/>
73-
<factorypathentry kind="VARJAR" id="M2_REPO/net/bytebuddy/byte-buddy-agent/1.7.11/byte-buddy-agent-1.7.11.jar" enabled="true" runInBatchMode="false"/>
74-
<factorypathentry kind="VARJAR" id="M2_REPO/org/objenesis/objenesis/2.6/objenesis-2.6.jar" enabled="true" runInBatchMode="false"/>
75-
<factorypathentry kind="VARJAR" id="M2_REPO/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar" enabled="true" runInBatchMode="false"/>
76-
<factorypathentry kind="VARJAR" id="M2_REPO/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3.jar" enabled="true" runInBatchMode="false"/>
77-
<factorypathentry kind="VARJAR" id="M2_REPO/org/skyscreamer/jsonassert/1.5.0/jsonassert-1.5.0.jar" enabled="true" runInBatchMode="false"/>
78-
<factorypathentry kind="VARJAR" id="M2_REPO/com/vaadin/external/google/android-json/0.0.20131108.vaadin1/android-json-0.0.20131108.vaadin1.jar" enabled="true" runInBatchMode="false"/>
7963
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-core/5.0.5.RELEASE/spring-core-5.0.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
8064
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-jcl/5.0.5.RELEASE/spring-jcl-5.0.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
81-
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-test/5.0.5.RELEASE/spring-test-5.0.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
82-
<factorypathentry kind="VARJAR" id="M2_REPO/org/xmlunit/xmlunit-core/2.5.1/xmlunit-core-2.5.1.jar" enabled="true" runInBatchMode="false"/>
8365
<factorypathentry kind="VARJAR" id="M2_REPO/org/freemarker/freemarker/2.3.23/freemarker-2.3.23.jar" enabled="true" runInBatchMode="false"/>
8466
<factorypathentry kind="VARJAR" id="M2_REPO/org/projectlombok/lombok/1.18.4/lombok-1.18.4.jar" enabled="true" runInBatchMode="false"/>
8567
<factorypathentry kind="VARJAR" id="M2_REPO/net/sf/ehcache/ehcache/2.10.4/ehcache-2.10.4.jar" enabled="true" runInBatchMode="false"/>
8668
<factorypathentry kind="VARJAR" id="M2_REPO/com/alibaba/druid/1.0.29/druid-1.0.29.jar" enabled="true" runInBatchMode="false"/>
69+
<factorypathentry kind="EXTJAR" id="/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/../lib/jconsole.jar" enabled="true" runInBatchMode="false"/>
70+
<factorypathentry kind="EXTJAR" id="/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/../lib/tools.jar" enabled="true" runInBatchMode="false"/>
8771
<factorypathentry kind="VARJAR" id="M2_REPO/mysql/mysql-connector-java/5.1.46/mysql-connector-java-5.1.46.jar" enabled="true" runInBatchMode="false"/>
8872
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/ulisesbocchio/jasypt-spring-boot-starter/1.14/jasypt-spring-boot-starter-1.14.jar" enabled="true" runInBatchMode="false"/>
8973
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/ulisesbocchio/jasypt-spring-boot/1.14/jasypt-spring-boot-1.14.jar" enabled="true" runInBatchMode="false"/>
9074
<factorypathentry kind="VARJAR" id="M2_REPO/org/jasypt/jasypt/1.9.2/jasypt-1.9.2.jar" enabled="true" runInBatchMode="false"/>
91-
<factorypathentry kind="VARJAR" id="M2_REPO/javax/servlet/javax.servlet-api/3.0.1/javax.servlet-api-3.0.1.jar" enabled="true" runInBatchMode="false"/>
9275
<factorypathentry kind="VARJAR" id="M2_REPO/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar" enabled="true" runInBatchMode="false"/>
9376
<factorypathentry kind="VARJAR" id="M2_REPO/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar" enabled="true" runInBatchMode="false"/>
9477
<factorypathentry kind="VARJAR" id="M2_REPO/ch/qos/logback/logback-access/1.2.3/logback-access-1.2.3.jar" enabled="true" runInBatchMode="false"/>
9578
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/jcl-over-slf4j/1.7.25/jcl-over-slf4j-1.7.25.jar" enabled="true" runInBatchMode="false"/>
9679
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25.jar" enabled="true" runInBatchMode="false"/>
9780
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/log4j-over-slf4j/1.7.25/log4j-over-slf4j-1.7.25.jar" enabled="true" runInBatchMode="false"/>
98-
<factorypathentry kind="VARJAR" id="M2_REPO/junit/junit/4.12/junit-4.12.jar" enabled="true" runInBatchMode="false"/>
99-
<factorypathentry kind="VARJAR" id="M2_REPO/org/testng/testng/6.14.3/testng-6.14.3.jar" enabled="true" runInBatchMode="false"/>
100-
<factorypathentry kind="VARJAR" id="M2_REPO/com/beust/jcommander/1.72/jcommander-1.72.jar" enabled="true" runInBatchMode="false"/>
101-
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache-extras/beanshell/bsh/2.0b6/bsh-2.0b6.jar" enabled="true" runInBatchMode="false"/>
10281
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/protobuf/protobuf-java/3.6.1/protobuf-java-3.6.1.jar" enabled="true" runInBatchMode="false"/>
10382
<factorypathentry kind="VARJAR" id="M2_REPO/com/alibaba/fastjson/1.2.54/fastjson-1.2.54.jar" enabled="true" runInBatchMode="false"/>
10483
<factorypathentry kind="VARJAR" id="M2_REPO/com/jfinal/jfinal/3.5/jfinal-3.5.jar" enabled="true" runInBatchMode="false"/>
@@ -110,9 +89,11 @@
11089
<factorypathentry kind="VARJAR" id="M2_REPO/org/t-io/tio-core/3.2.1.v20181024-RELEASE/tio-core-3.2.1.v20181024-RELEASE.jar" enabled="true" runInBatchMode="false"/>
11190
<factorypathentry kind="VARJAR" id="M2_REPO/org/t-io/tio-utils/3.2.1.v20181024-RELEASE/tio-utils-3.2.1.v20181024-RELEASE.jar" enabled="true" runInBatchMode="false"/>
11291
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/ben-manes/caffeine/caffeine/2.6.2/caffeine-2.6.2.jar" enabled="true" runInBatchMode="false"/>
113-
<factorypathentry kind="VARJAR" id="M2_REPO/commons-codec/commons-codec/1.11/commons-codec-1.11.jar" enabled="true" runInBatchMode="false"/>
11492
<factorypathentry kind="VARJAR" id="M2_REPO/org/t-io/tio-http-server/3.2.1.v20181024-RELEASE/tio-http-server-3.2.1.v20181024-RELEASE.jar" enabled="true" runInBatchMode="false"/>
11593
<factorypathentry kind="VARJAR" id="M2_REPO/com/esotericsoftware/reflectasm/1.11.7/reflectasm-1.11.7.jar" enabled="true" runInBatchMode="false"/>
94+
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpclient/4.4.1/httpclient-4.4.1.jar" enabled="true" runInBatchMode="false"/>
95+
<factorypathentry kind="VARJAR" id="M2_REPO/commons-codec/commons-codec/1.11/commons-codec-1.11.jar" enabled="true" runInBatchMode="false"/>
96+
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpcore/4.4.1/httpcore-4.4.1.jar" enabled="true" runInBatchMode="false"/>
11697
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-annotations/2.9.0/jackson-annotations-2.9.0.jar" enabled="true" runInBatchMode="false"/>
117-
<factorypathentry kind="PLUGIN" id="org.eclipse.jst.ws.annotations.core" enabled="true" runInBatchMode="false"/>
98+
<factorypathentry kind="VARJAR" id="M2_REPO/org/jetbrains/annotations/17.0.0/annotations-17.0.0.jar" enabled="true" runInBatchMode="false"/>
11899
</factorypath>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
eclipse.preferences.version=1
22
org.eclipse.jdt.apt.aptEnabled=true
3+
org.eclipse.jdt.apt.genSrcDir=target/generated-sources/annotations
4+
org.eclipse.jdt.apt.genTestSrcDir=target/generated-test-sources/test-annotations

pom.xml

Lines changed: 56 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -235,19 +235,41 @@
235235
</repositories>
236236

237237
<build>
238-
<resources>
239-
<resource>
240-
<directory>src/main/resources</directory>
241-
<filtering>false</filtering>
242-
</resource>
243-
</resources>
238+
<plugins>
239+
<plugin>
240+
<groupId>org.apache.maven.plugins</groupId>
241+
<artifactId>maven-dependency-plugin</artifactId>
242+
<executions>
243+
<execution>
244+
<id>copy-dependencies</id>
245+
<phase>package</phase>
246+
<goals>
247+
<goal>copy-dependencies</goal>
248+
</goals>
249+
<configuration>
250+
<outputDirectory>target/lib</outputDirectory>
251+
<excludeTransitive>false</excludeTransitive>
252+
<stripVersion>false</stripVersion>
253+
<includeScope>runtime</includeScope>
254+
</configuration>
255+
</execution>
256+
</executions>
257+
</plugin>
258+
259+
<plugin>
260+
<groupId>org.apache.maven.plugins</groupId>
261+
<artifactId>maven-jar-plugin</artifactId>
262+
<configuration>
263+
<excludes>
264+
<exclude>**/*.properties</exclude>
265+
<exclude>**/*.xml</exclude>
266+
<exclude>**/*.yml</exclude>
267+
<exclude>static/**</exclude>
268+
<exclude>templates/**</exclude>
269+
</excludes>
270+
</configuration>
271+
</plugin>
244272

245-
<plugins>
246-
<!-- <plugin>
247-
<groupId>org.springframework.boot</groupId>
248-
<artifactId>spring-boot-maven-plugin</artifactId>
249-
</plugin> -->
250-
251273
<plugin>
252274
<groupId>org.springframework.boot</groupId>
253275
<artifactId>spring-boot-maven-plugin</artifactId>
@@ -272,58 +294,8 @@
272294
</execution>
273295
</executions>
274296
</plugin>
275-
276-
<plugin>
277-
<groupId>org.apache.maven.plugins</groupId>
278-
<artifactId>maven-dependency-plugin</artifactId>
279-
<version>2.10</version>
280-
<executions>
281-
<execution>
282-
<id>copy-dependencies</id>
283-
<phase>package</phase>
284-
<goals>
285-
<goal>copy-dependencies</goal>
286-
</goals>
287-
<configuration>
288-
<outputDirectory>target/lib</outputDirectory>
289-
<excludeTransitive>false</excludeTransitive>
290-
<stripVersion>false</stripVersion>
291-
<includeScope>runtime</includeScope>
292-
</configuration>
293-
</execution>
294-
</executions>
295-
</plugin>
296-
<plugin>
297-
<groupId>org.apache.maven.plugins</groupId>
298-
<artifactId>maven-deploy-plugin</artifactId>
299-
<configuration>
300-
<skip>true</skip>
301-
</configuration>
302-
</plugin>
303297

304-
<plugin>
305-
<groupId>org.apache.maven.plugins</groupId>
306-
<artifactId>maven-jar-plugin</artifactId>
307-
<configuration>
308-
<archive>
309-
<manifest>
310-
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
311-
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
312-
</manifest>
313-
<addMavenDescriptor>false</addMavenDescriptor><!-- 生成的jar中,不要包含pom.xml和pom.properties这两个文件 -->
314-
</archive>
315-
<finalName>${project.artifactId}</finalName>
316-
<excludes>
317-
<exclude>config/**/*</exclude>
318-
<exclude>*.properties</exclude>
319-
<exclude>*.xml</exclude>
320-
<exclude>static/**</exclude>
321-
<exclude>templates/**</exclude>
322-
</excludes>
323-
</configuration>
324-
</plugin>
325-
326-
<plugin>
298+
<plugin>
327299
<groupId>org.apache.maven.plugins</groupId>
328300
<artifactId>maven-antrun-plugin</artifactId>
329301
<executions>
@@ -335,64 +307,48 @@
335307
<configuration>
336308
<target>
337309
<property name="dist">target/distribution</property>
338-
<property name="res">target/distribution/resources</property>
339-
<property name="config">target/distribution/config</property>
340310
<property name="dist-tmp">target/distribution/tmp</property>
341311
<property name="app-name">${project.artifactId}-${project.version}</property>
342-
<property name="real-app-name">${project.artifactId}</property>
343312
<mkdir dir="${dist-tmp}" />
344-
<mkdir dir="${res}" />
345-
<mkdir dir="${config}" />
346313
<copy file="target/${app-name}.jar" tofile="${dist-tmp}/${app-name}.jar" />
347314
<unzip src="${dist-tmp}/${app-name}.jar" dest="${dist-tmp}" />
348315
<delete file="${dist-tmp}/${app-name}.jar" />
349-
<move file="target/${app-name}-classes.jar" tofile="${dist}/${real-app-name}.jar"/>
316+
317+
<zip destfile="${dist}/${app-name}-pages.jar">
318+
<zipfileset dir="${dist-tmp}/META-INF" prefix="META-INF" />
319+
<!-- <zipfileset dir="target/classes/static" prefix="static" /> -->
320+
<!-- <zipfileset dir="target/classes/templates" prefix="templates" /> -->
321+
</zip>
322+
323+
<move file="target/${app-name}-classes.jar" todir="${dist}" />
350324
<move todir="${dist}/3rd-lib">
351325
<fileset dir="target/lib" />
352326
</move>
353327

354328
<delete dir="${dist-tmp}" />
355329

356-
<copy todir="${res}">
330+
<copy todir="${dist}/config">
357331
<fileset dir="target/classes">
358-
<include name="**/static/**" />
359-
<include name="**/templates/**" />
332+
<include name="**/*.properties" />
333+
<include name="**/*.xml" />
334+
<include name="**/*.yml" />
360335
</fileset>
361336
</copy>
362-
<copy todir="${config}">
337+
338+
<copy todir="${dist}">
363339
<fileset dir="target/classes">
364-
<include name="**/*.properties" />
365-
<include name="**/*.xml" />
340+
<include name="config/**" />
341+
</fileset>
342+
<fileset dir="">
343+
<include name="*.sh" />
366344
</fileset>
367345
</copy>
346+
368347
</target>
369348
</configuration>
370349
</execution>
371350
</executions>
372351
</plugin>
373-
374-
<!-- The configuration of maven-assembly-plugin -->
375-
<plugin>
376-
<groupId>org.apache.maven.plugins</groupId>
377-
<artifactId>maven-assembly-plugin</artifactId>
378-
<executions>
379-
<execution>
380-
<id>make-assembly</id> <!--名字任意 -->
381-
<phase>package</phase> <!-- 绑定到package生命周期阶段上 -->
382-
<goals>
383-
<goal>single</goal>
384-
</goals>
385-
<configuration>
386-
<appendAssemblyId>false</appendAssemblyId>
387-
<descriptors>
388-
<descriptor>script/pkg.xml</descriptor>
389-
</descriptors>
390-
<outputDirectory>${project.build.directory}/</outputDirectory>
391-
<finalName>${project.artifactId}</finalName>
392-
</configuration>
393-
</execution>
394-
</executions>
395-
</plugin>
396-
</plugins>
397-
</build>
352+
</plugins>
353+
</build>
398354
</project>

src/main/java/com/zhangwuji/im/api/controller/ApiController.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -456,9 +456,12 @@ public ApiResult getNearByUser(HttpServletRequest req, HttpServletResponse rsp)
456456
List<GeoBean> pageGeoList = new LinkedList<>();
457457

458458
//redisHelper.cacheGeo("hunan22",113.37322,23.126153,"1",13600*10);
459-
redisHelper.cacheGeo("hunan22",113.37322,23.126153,"2",13600*10);
460-
redisHelper.cacheGeo("hunan22",113.37322,23.126153,"3",13600*10);
461-
redisHelper.cacheGeo("hunan22",113.37322,23.126153,"4",13600*10);
459+
redisHelper.cacheGeo("hunan22",113.37322,23.126153,"2",13600*1000);
460+
redisHelper.cacheGeo("hunan22",113.37322,23.126153,"3",13600*1000);
461+
redisHelper.cacheGeo("hunan22",113.37322,23.126153,"4",13600*1000);
462+
463+
redisHelper.cacheGeo("hunan22",lng,lat,myinfo.getId().toString(),13600*10000);
464+
462465
String geojson="";
463466

464467

@@ -471,7 +474,7 @@ public ApiResult getNearByUser(HttpServletRequest req, HttpServletResponse rsp)
471474
}
472475
else
473476
{
474-
GeoResults<RedisGeoCommands.GeoLocation<Object>> geoResults=redisHelper.radiusGeo("hunan22",lng,lat,1000, Sort.Direction.ASC,100);
477+
GeoResults<RedisGeoCommands.GeoLocation<Object>> geoResults=redisHelper.radiusGeo("hunan22",lng,lat,10000000, Sort.Direction.ASC,100);
475478
List<GeoResult<RedisGeoCommands.GeoLocation<Object>>> geoResults1= geoResults.getContent();
476479
for (GeoResult<RedisGeoCommands.GeoLocation<Object>> item:geoResults){
477480
GeoBean geoBean=new GeoBean();

0 commit comments

Comments
 (0)