Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

redis maxheap配置修改 #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wang1010meng wants to merge 1 commit into coldwalker:master
base: master
Choose a base branch
Loading
from wang1010meng:master
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/main/java/geektime/im/lecture/redis/EmbededRedis.java
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ public class EmbededRedis {

@Value("${spring.redis.port}")
private int redisPort;
@Value("${spring.redis.maxheap}")
private String maxheap;

private RedisServer redisServer;

@PostConstruct
public void startRedis() throws IOException {
redisServer = new RedisServer(redisPort);
redisServer = RedisServer.builder().setting("maxheap "+maxheap).port(redisPort).setting("bind localhost").build();
redisServer.start();
}

Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/application.yml
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ spring:
ddl-auto: update

redis:
host: localhost
host: 127.0.0.1
port: 6379
maxheap: 200m

websocket:
connector:
Expand Down

AltStyle によって変換されたページ (->オリジナル) /