Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
shop
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
曲欣亮
shop
Commits
8d1cecdd
Commit
8d1cecdd
authored
Aug 27, 2019
by
张永
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
升个版本号
parent
5d113dea
Pipeline
#162
canceled with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
160 additions
and
160 deletions
+160
-160
DataSourceConfig.java
src/main/java/com/egolm/shop/config/DataSourceConfig.java
+42
-42
SolrGoodsController.java
...n/java/com/egolm/shop/controller/SolrGoodsController.java
+118
-118
No files found.
src/main/java/com/egolm/shop/config/DataSourceConfig.java
View file @
8d1cecdd
...
@@ -2,8 +2,8 @@ package com.egolm.shop.config;
...
@@ -2,8 +2,8 @@ package com.egolm.shop.config;
import
javax.sql.DataSource
;
import
javax.sql.DataSource
;
import
org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.boot.jdbc.DataSourceBuilder
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Primary
;
import
org.springframework.context.annotation.Primary
;
...
...
src/main/java/com/egolm/shop/controller/SolrGoodsController.java
View file @
8d1cecdd
...
@@ -22,7 +22,6 @@ import io.swagger.annotations.Api;
...
@@ -22,7 +22,6 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
redis.clients.jedis.JedisCommands
;
@Api
(
tags
={
"搜索引擎商品相关接口"
})
@Api
(
tags
={
"搜索引擎商品相关接口"
})
@Controller
@Controller
...
@@ -92,7 +91,7 @@ public class SolrGoodsController {
...
@@ -92,7 +91,7 @@ public class SolrGoodsController {
@PostMapping
(
"getLock"
)
@PostMapping
(
"getLock"
)
@ApiOperation
(
"设置搜索引擎更新索引定时任务分布式互斥锁"
)
@ApiOperation
(
"设置搜索引擎更新索引定时任务分布式互斥锁"
)
public
Rjx
getLock
()
{
public
Rjx
getLock
()
{
String
result
=
redisTemplate
.
execute
(
new
RedisCallback
<
String
>()
{
/*String result = redisTemplate.execute(new RedisCallback<String>() {
@Override
@Override
public String doInRedis(RedisConnection connection) throws DataAccessException {
public String doInRedis(RedisConnection connection) throws DataAccessException {
JedisCommands commands = (JedisCommands) connection.getNativeConnection();
JedisCommands commands = (JedisCommands) connection.getNativeConnection();
...
@@ -104,7 +103,8 @@ public class SolrGoodsController {
...
@@ -104,7 +103,8 @@ public class SolrGoodsController {
return Rjx.jsonOk();
return Rjx.jsonOk();
} else {
} else {
return Rjx.jsonErr();
return Rjx.jsonErr();
}
}*/
return
Rjx
.
jsonOk
().
setMessage
(
"这个注释掉了"
);
}
}
@ResponseBody
@ResponseBody
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment