Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
fund-manage-sdk
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QG
fund-manage-sdk
Commits
d4bbd93a
Commit
d4bbd93a
authored
Sep 06, 2016
by
Java-Yue Chunyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mq配置
parent
69d83f9f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
166 additions
and
142 deletions
+166
-142
uiDesigner.xml
.idea/uiDesigner.xml
+124
-0
Bootstrap.java
src/main/java/cn/quantgroup/Bootstrap.java
+20
-19
Constants.java
src/main/java/cn/quantgroup/fundmanage/Constants.java
+12
-0
RabbitMq4FinancialConfig.java
...p/fundmanage/config/message/RabbitMq4FinancialConfig.java
+0
-93
RabbitMqConfig.java
.../quantgroup/fundmanage/config/message/RabbitMqConfig.java
+2
-17
fundmanage.properties
src/main/resources/config/beta/fundmanage.properties
+6
-11
logback.xml
src/main/resources/config/beta/logback.xml
+2
-2
No files found.
.idea/uiDesigner.xml
0 → 100644
View file @
d4bbd93a
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"Palette2"
>
<group
name=
"Swing"
>
<item
class=
"com.intellij.uiDesigner.HSpacer"
tooltip-text=
"Horizontal Spacer"
icon=
"/com/intellij/uiDesigner/icons/hspacer.png"
removable=
"false"
auto-create-binding=
"false"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"1"
hsize-policy=
"6"
anchor=
"0"
fill=
"1"
/>
</item>
<item
class=
"com.intellij.uiDesigner.VSpacer"
tooltip-text=
"Vertical Spacer"
icon=
"/com/intellij/uiDesigner/icons/vspacer.png"
removable=
"false"
auto-create-binding=
"false"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"6"
hsize-policy=
"1"
anchor=
"0"
fill=
"2"
/>
</item>
<item
class=
"javax.swing.JPanel"
icon=
"/com/intellij/uiDesigner/icons/panel.png"
removable=
"false"
auto-create-binding=
"false"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"3"
hsize-policy=
"3"
anchor=
"0"
fill=
"3"
/>
</item>
<item
class=
"javax.swing.JScrollPane"
icon=
"/com/intellij/uiDesigner/icons/scrollPane.png"
removable=
"false"
auto-create-binding=
"false"
can-attach-label=
"true"
>
<default-constraints
vsize-policy=
"7"
hsize-policy=
"7"
anchor=
"0"
fill=
"3"
/>
</item>
<item
class=
"javax.swing.JButton"
icon=
"/com/intellij/uiDesigner/icons/button.png"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"0"
hsize-policy=
"3"
anchor=
"0"
fill=
"1"
/>
<initial-values>
<property
name=
"text"
value=
"Button"
/>
</initial-values>
</item>
<item
class=
"javax.swing.JRadioButton"
icon=
"/com/intellij/uiDesigner/icons/radioButton.png"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"0"
hsize-policy=
"3"
anchor=
"8"
fill=
"0"
/>
<initial-values>
<property
name=
"text"
value=
"RadioButton"
/>
</initial-values>
</item>
<item
class=
"javax.swing.JCheckBox"
icon=
"/com/intellij/uiDesigner/icons/checkBox.png"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"0"
hsize-policy=
"3"
anchor=
"8"
fill=
"0"
/>
<initial-values>
<property
name=
"text"
value=
"CheckBox"
/>
</initial-values>
</item>
<item
class=
"javax.swing.JLabel"
icon=
"/com/intellij/uiDesigner/icons/label.png"
removable=
"false"
auto-create-binding=
"false"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"0"
hsize-policy=
"0"
anchor=
"8"
fill=
"0"
/>
<initial-values>
<property
name=
"text"
value=
"Label"
/>
</initial-values>
</item>
<item
class=
"javax.swing.JTextField"
icon=
"/com/intellij/uiDesigner/icons/textField.png"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"true"
>
<default-constraints
vsize-policy=
"0"
hsize-policy=
"6"
anchor=
"8"
fill=
"1"
>
<preferred-size
width=
"150"
height=
"-1"
/>
</default-constraints>
</item>
<item
class=
"javax.swing.JPasswordField"
icon=
"/com/intellij/uiDesigner/icons/passwordField.png"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"true"
>
<default-constraints
vsize-policy=
"0"
hsize-policy=
"6"
anchor=
"8"
fill=
"1"
>
<preferred-size
width=
"150"
height=
"-1"
/>
</default-constraints>
</item>
<item
class=
"javax.swing.JFormattedTextField"
icon=
"/com/intellij/uiDesigner/icons/formattedTextField.png"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"true"
>
<default-constraints
vsize-policy=
"0"
hsize-policy=
"6"
anchor=
"8"
fill=
"1"
>
<preferred-size
width=
"150"
height=
"-1"
/>
</default-constraints>
</item>
<item
class=
"javax.swing.JTextArea"
icon=
"/com/intellij/uiDesigner/icons/textArea.png"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"true"
>
<default-constraints
vsize-policy=
"6"
hsize-policy=
"6"
anchor=
"0"
fill=
"3"
>
<preferred-size
width=
"150"
height=
"50"
/>
</default-constraints>
</item>
<item
class=
"javax.swing.JTextPane"
icon=
"/com/intellij/uiDesigner/icons/textPane.png"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"true"
>
<default-constraints
vsize-policy=
"6"
hsize-policy=
"6"
anchor=
"0"
fill=
"3"
>
<preferred-size
width=
"150"
height=
"50"
/>
</default-constraints>
</item>
<item
class=
"javax.swing.JEditorPane"
icon=
"/com/intellij/uiDesigner/icons/editorPane.png"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"true"
>
<default-constraints
vsize-policy=
"6"
hsize-policy=
"6"
anchor=
"0"
fill=
"3"
>
<preferred-size
width=
"150"
height=
"50"
/>
</default-constraints>
</item>
<item
class=
"javax.swing.JComboBox"
icon=
"/com/intellij/uiDesigner/icons/comboBox.png"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"true"
>
<default-constraints
vsize-policy=
"0"
hsize-policy=
"2"
anchor=
"8"
fill=
"1"
/>
</item>
<item
class=
"javax.swing.JTable"
icon=
"/com/intellij/uiDesigner/icons/table.png"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"6"
hsize-policy=
"6"
anchor=
"0"
fill=
"3"
>
<preferred-size
width=
"150"
height=
"50"
/>
</default-constraints>
</item>
<item
class=
"javax.swing.JList"
icon=
"/com/intellij/uiDesigner/icons/list.png"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"6"
hsize-policy=
"2"
anchor=
"0"
fill=
"3"
>
<preferred-size
width=
"150"
height=
"50"
/>
</default-constraints>
</item>
<item
class=
"javax.swing.JTree"
icon=
"/com/intellij/uiDesigner/icons/tree.png"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"6"
hsize-policy=
"6"
anchor=
"0"
fill=
"3"
>
<preferred-size
width=
"150"
height=
"50"
/>
</default-constraints>
</item>
<item
class=
"javax.swing.JTabbedPane"
icon=
"/com/intellij/uiDesigner/icons/tabbedPane.png"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"3"
hsize-policy=
"3"
anchor=
"0"
fill=
"3"
>
<preferred-size
width=
"200"
height=
"200"
/>
</default-constraints>
</item>
<item
class=
"javax.swing.JSplitPane"
icon=
"/com/intellij/uiDesigner/icons/splitPane.png"
removable=
"false"
auto-create-binding=
"false"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"3"
hsize-policy=
"3"
anchor=
"0"
fill=
"3"
>
<preferred-size
width=
"200"
height=
"200"
/>
</default-constraints>
</item>
<item
class=
"javax.swing.JSpinner"
icon=
"/com/intellij/uiDesigner/icons/spinner.png"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"true"
>
<default-constraints
vsize-policy=
"0"
hsize-policy=
"6"
anchor=
"8"
fill=
"1"
/>
</item>
<item
class=
"javax.swing.JSlider"
icon=
"/com/intellij/uiDesigner/icons/slider.png"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"0"
hsize-policy=
"6"
anchor=
"8"
fill=
"1"
/>
</item>
<item
class=
"javax.swing.JSeparator"
icon=
"/com/intellij/uiDesigner/icons/separator.png"
removable=
"false"
auto-create-binding=
"false"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"6"
hsize-policy=
"6"
anchor=
"0"
fill=
"3"
/>
</item>
<item
class=
"javax.swing.JProgressBar"
icon=
"/com/intellij/uiDesigner/icons/progressbar.png"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"0"
hsize-policy=
"6"
anchor=
"0"
fill=
"1"
/>
</item>
<item
class=
"javax.swing.JToolBar"
icon=
"/com/intellij/uiDesigner/icons/toolbar.png"
removable=
"false"
auto-create-binding=
"false"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"0"
hsize-policy=
"6"
anchor=
"0"
fill=
"1"
>
<preferred-size
width=
"-1"
height=
"20"
/>
</default-constraints>
</item>
<item
class=
"javax.swing.JToolBar$Separator"
icon=
"/com/intellij/uiDesigner/icons/toolbarSeparator.png"
removable=
"false"
auto-create-binding=
"false"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"0"
hsize-policy=
"0"
anchor=
"0"
fill=
"1"
/>
</item>
<item
class=
"javax.swing.JScrollBar"
icon=
"/com/intellij/uiDesigner/icons/scrollbar.png"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"6"
hsize-policy=
"0"
anchor=
"0"
fill=
"2"
/>
</item>
</group>
</component>
</project>
\ No newline at end of file
src/main/java/cn/quantgroup/Bootstrap.java
View file @
d4bbd93a
package
cn
.
quantgroup
;
package
cn
.
quantgroup
;
import
cn.quantgroup.fundmanage.Constants
;
import
org.apache.commons.cli.*
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.orm.jpa.EntityScan
;
import
org.springframework.boot.orm.jpa.EntityScan
;
import
org.springframework.cache.annotation.EnableCaching
;
import
org.springframework.cache.annotation.EnableCaching
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.*
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.EnableAspectJAutoProxy
;
import
org.springframework.context.annotation.PropertySource
;
import
org.springframework.data.jpa.repository.config.EnableJpaRepositories
;
import
org.springframework.data.jpa.repository.config.EnableJpaRepositories
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession
;
import
org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
/**
/**
* Created by Rocky on 2016/8/31.
* Created by Rocky on 2016/8/31.
*/
*/
@ComponentScan
(
basePackages
=
"cn.quantgroup"
)
@ComponentScan
(
basePackages
=
{
"cn.quantgroup.fundmanage"
}
)
@EntityScan
(
basePackages
=
{
"cn.quantgroup.fundmanage.entity"
})
@EntityScan
(
basePackages
=
{
"cn.quantgroup.fundmanage.entity"
})
@EnableAutoConfiguration
@EnableAutoConfiguration
@EnableTransactionManagement
@EnableJpaRepositories
(
basePackages
=
{
"cn.quantgroup.fundmanage.repository"
})
@EnableJpaRepositories
(
basePackages
=
{
"cn.quantgroup.fundmanage.repository"
})
@SpringBootApplication
@PropertySource
({
"classpath:application.properties"
,
@PropertySource
({
"classpath:application.properties"
,
"classpath:fundmanage.properties"
})
"classpath:fundmanage.properties"
})
@EnableAspectJAutoProxy
@EnableTransactionManagement
@EnableScheduling
@EnableAsync
@EnableAsync
@EnableAspectJAutoProxy
@Configuration
@Configuration
@SpringBootApplication
public
class
Bootstrap
{
public
class
Bootstrap
{
/*
public static void parseOptions(String[] args) throws ParseException {
public
static
void
parseOptions
(
String
[]
args
)
throws
ParseException
{
Options
opt
=
new
Options
();
Options
opt
=
new
Options
();
Option
worker
=
new
Option
(
"w"
,
"worker"
,
true
,
"total workers"
);
Option
worker
=
new
Option
(
"w"
,
"worker"
,
true
,
"total workers"
);
worker
.
setRequired
(
true
);
worker
.
setRequired
(
true
);
...
@@ -40,27 +44,24 @@ public class Bootstrap {
...
@@ -40,27 +44,24 @@ public class Bootstrap {
CommandLineParser
parser
=
new
DefaultParser
();
CommandLineParser
parser
=
new
DefaultParser
();
CommandLine
commandLine
=
parser
.
parse
(
opt
,
args
,
true
);
CommandLine
commandLine
=
parser
.
parse
(
opt
,
args
,
true
);
if
(!
commandLine
.
hasOption
(
"w"
)
||
!
commandLine
.
hasOption
(
"cw"
))
{
if
(!
commandLine
.
hasOption
(
"w"
)
||
!
commandLine
.
hasOption
(
"cw"
))
{
System.out.println("must with --worker and --currentWorker args specified");
throw
new
ParseException
(
"must with --worker and --currentWorker args specified"
);
System.exit(-1);
}
}
String
value
=
commandLine
.
getOptionValue
(
"worker"
);
String
value
=
commandLine
.
getOptionValue
(
"worker"
);
if
(
StringUtils
.
isNumeric
(
value
)
&&
StringUtils
.
isNotEmpty
(
value
))
{
if
(
StringUtils
.
isNumeric
(
value
)
&&
StringUtils
.
isNotEmpty
(
value
))
{
Constants
.
Concurrent
.
WORKERS
=
Long
.
valueOf
(
value
);
Constants
.
Concurrent
.
WORKERS
=
Long
.
valueOf
(
value
);
}
else
{
}
else
{
System.out.println("--worker must be a number");
throw
new
ParseException
(
"--worker must be a number"
);
System.exit(-1);
}
}
value
=
commandLine
.
getOptionValue
(
"currentWorker"
);
value
=
commandLine
.
getOptionValue
(
"currentWorker"
);
if
(
StringUtils
.
isNumeric
(
value
)
&&
StringUtils
.
isNotEmpty
(
value
))
{
if
(
StringUtils
.
isNumeric
(
value
)
&&
StringUtils
.
isNotEmpty
(
value
))
{
Constants
.
Concurrent
.
CURRENT_WORKER
=
Long
.
valueOf
(
value
);
Constants
.
Concurrent
.
CURRENT_WORKER
=
Long
.
valueOf
(
value
);
}
else
{
}
else
{
System.out.println("--currentWoker must be a number");
throw
new
ParseException
(
"--currentWoker must be a number"
);
System.exit(-1);
}
}
}
*/
}
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
throws
ParseException
{
//
parseOptions(args);
parseOptions
(
args
);
SpringApplication
.
run
(
Bootstrap
.
class
,
args
);
SpringApplication
.
run
(
Bootstrap
.
class
,
args
);
}
}
}
}
src/main/java/cn/quantgroup/fundmanage/Constants.java
0 → 100644
View file @
d4bbd93a
package
cn
.
quantgroup
.
fundmanage
;
/**
* 常量
*/
public
interface
Constants
{
class
Concurrent
{
public
static
Long
CURRENT_WORKER
;
public
static
Long
WORKERS
;
}
}
src/main/java/cn/quantgroup/fundmanage/config/message/RabbitMq4FinancialConfig.java
deleted
100644 → 0
View file @
69d83f9f
package
cn
.
quantgroup
.
fundmanage
.
config
.
message
;
import
org.springframework.amqp.core.Binding
;
import
org.springframework.amqp.core.BindingBuilder
;
import
org.springframework.amqp.core.DirectExchange
;
import
org.springframework.amqp.core.Queue
;
import
org.springframework.amqp.rabbit.connection.CachingConnectionFactory
;
import
org.springframework.amqp.rabbit.core.RabbitAdmin
;
import
org.springframework.amqp.rabbit.core.RabbitTemplate
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
/**
* Created by Rocky on 2016/9/5.
*/
@Configuration
public
class
RabbitMq4FinancialConfig
{
@Value
(
"${rabbitmq.financial.exchange}"
)
private
String
financialExchange
;
@Value
(
"${rabbitmq.connection.host}"
)
private
String
host
;
@Value
(
"${rabbitmq.connection.port}"
)
private
Integer
port
;
@Value
(
"${rabbitmq.connection.user}"
)
private
String
user
;
@Value
(
"${rabbitmq.connection.password}"
)
private
String
password
;
@Value
(
"${rabbitmq.connection.virtual-host.financial}"
)
private
String
virtualHost
;
@Value
(
"${rabbitmq.connection.queue.baitiaoOrder}"
)
private
String
baitiaoOrderQueue
;
private
static
volatile
CachingConnectionFactory
cachingConnectionFactory2
;
// @Bean(name = "financialConnection")
private
CachingConnectionFactory
cachingConnectionFactory
()
{
CachingConnectionFactory
connectionFactory
=
new
CachingConnectionFactory
(
host
,
port
);
connectionFactory
.
setChannelCacheSize
(
1024
);
connectionFactory
.
setCacheMode
(
CachingConnectionFactory
.
CacheMode
.
CONNECTION
);
connectionFactory
.
setChannelCacheSize
(
180
*
1000
);
connectionFactory
.
setConnectionCacheSize
(
1024
);
connectionFactory
.
setUsername
(
user
);
connectionFactory
.
setPassword
(
password
);
connectionFactory
.
setVirtualHost
(
virtualHost
);
connectionFactory
.
setPublisherReturns
(
false
);
connectionFactory
.
setPublisherConfirms
(
false
);
return
connectionFactory
;
}
@Bean
(
name
=
"financialRabbitAdmin"
)
public
RabbitAdmin
rabbitAdmin
()
{
// public RabbitAdmin rabbitAdmin(@Qualifier("financialConnection")CachingConnectionFactory cachingConnectionFactory) {
if
(
cachingConnectionFactory2
==
null
)
{
cachingConnectionFactory2
=
cachingConnectionFactory
();
}
return
new
RabbitAdmin
(
cachingConnectionFactory2
);
}
@Bean
(
name
=
"financialExchange"
)
public
DirectExchange
directExchange
()
{
return
new
DirectExchange
(
financialExchange
,
true
,
false
);
}
@Bean
(
name
=
"baitiaoOrder"
)
public
Queue
baitiaoOrderQueue
(){
return
new
Queue
(
baitiaoOrderQueue
);
}
@Bean
(
name
=
"baitiaoOrderBinding"
)
public
Binding
baitiaoOrderBinding
(
@Qualifier
(
"financialRabbitAdmin"
)
RabbitAdmin
rabbitAdmin
,
@Qualifier
(
"baitiaoOrder"
)
Queue
baitiaoOrder
,
@Qualifier
(
"financialExchange"
)
DirectExchange
directExchange
)
{
Binding
binding
=
BindingBuilder
.
bind
(
baitiaoOrder
).
to
(
directExchange
).
with
(
baitiaoOrder
.
getName
());
rabbitAdmin
.
declareBinding
(
binding
);
return
binding
;
}
@Bean
(
name
=
"financialRabbitTemplate"
)
public
RabbitTemplate
financialRabbitTemplate
()
{
// public RabbitTemplate contractTemplate(@Qualifier("financialConnection")ConnectionFactory connectionFactory) {
if
(
cachingConnectionFactory2
==
null
)
{
cachingConnectionFactory2
=
cachingConnectionFactory
();
}
RabbitTemplate
template
=
new
RabbitTemplate
(
cachingConnectionFactory2
);
template
.
setExchange
(
financialExchange
);
return
template
;
}
}
src/main/java/cn/quantgroup/fundmanage/config/message/RabbitMqConfig.java
View file @
d4bbd93a
...
@@ -19,12 +19,9 @@ import org.springframework.context.annotation.Configuration;
...
@@ -19,12 +19,9 @@ import org.springframework.context.annotation.Configuration;
*/
*/
@Configuration
@Configuration
public
class
RabbitMqConfig
{
public
class
RabbitMqConfig
{
@Value
(
"${baitiaodebt.rabbitmq.queue.quanarorder}"
)
@Value
(
"${fundmanage.rabbitmq.queue.waiting}"
)
private
String
queueName
;
@Value
(
"${fundmanage.rabbitmq.queue.success}"
)
private
String
sucQueueName
;
private
String
sucQueueName
;
@Value
(
"${
fundmanage.rabbitmq.exchange
}"
)
@Value
(
"${
baitiaodebt.rabbitmq.exchange.quanarorder
}"
)
private
String
fundmanageExchange
;
private
String
fundmanageExchange
;
@Value
(
"${rabbitmq.connection.host}"
)
@Value
(
"${rabbitmq.connection.host}"
)
private
String
host
;
private
String
host
;
...
@@ -63,18 +60,6 @@ public class RabbitMqConfig {
...
@@ -63,18 +60,6 @@ public class RabbitMqConfig {
return
new
DirectExchange
(
fundmanageExchange
);
return
new
DirectExchange
(
fundmanageExchange
);
}
}
@Bean
(
name
=
"contractQueue"
)
public
Queue
contractQueue
()
{
return
new
Queue
(
queueName
);
}
@Bean
(
name
=
"contractBinding"
)
public
Binding
bindingRepay
(
@Qualifier
(
"blackHoleAmqpAdmin"
)
AmqpAdmin
amqpAdmin
,
@Qualifier
(
"contractQueue"
)
Queue
contractQueue
,
@Qualifier
(
"fundmanageExchange"
)
DirectExchange
directExchange
)
{
Binding
binding
=
BindingBuilder
.
bind
(
contractQueue
).
to
(
directExchange
).
with
(
contractQueue
.
getName
());
amqpAdmin
.
declareBinding
(
binding
);
return
binding
;
}
@Bean
(
name
=
"contractSucQueue"
)
@Bean
(
name
=
"contractSucQueue"
)
public
Queue
contractSucQueue
()
{
public
Queue
contractSucQueue
()
{
return
new
Queue
(
sucQueueName
);
return
new
Queue
(
sucQueueName
);
...
...
src/main/resources/config/beta/fundmanage.properties
View file @
d4bbd93a
# rabbitmq
# rabbitmq
fundmanage.rabbitmq.queue.waiting
=
waiting_generate
baitiaodebt.rabbitmq.queue.quanarorder
=
qunar_baitiaodebt
fundmanage.rabbitmq.queue.success
=
generate_success
baitiaodebt.rabbitmq.exchange.quanarorder
=
baitiaodebt_orderinfo
fundmanage.rabbitmq.exchange
=
contract
rabbitmq.connection.host
=
192.168.192.153
rabbitmq.connection.host
=
192.168.192.243
rabbitmq.connection.port
=
5672
rabbitmq.connection.port
=
5672
rabbitmq.connection.user
=
rabbit_admin
rabbitmq.connection.user
=
rabbitadmin
rabbitmq.connection.password
=
abc1234
rabbitmq.connection.password
=
123456
rabbitmq.connection.virtual-host
=
/black_hole
rabbitmq.connection.virtual-host
=
baitiao_debt
rabbitmq.connection.virtual-host.financial
=
financial_system
rabbitmq.connection.queue.baitiaoOrder
=
baitiaoOrder
rabbitmq.financial.exchange
=
fs
fundmanage.stopkey
=
test
\ No newline at end of file
src/main/resources/config/beta/logback.xml
View file @
d4bbd93a
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
<configuration>
<configuration>
<!-- 文件输出日志 (文件大小策略进行文件输出,超过指定大小对文件备份)-->
<!-- 文件输出日志 (文件大小策略进行文件输出,超过指定大小对文件备份)-->
<appender
name=
"FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<appender
name=
"FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
/
home/quant_grou
p/logs/fund_manage.log
</file>
<file>
/
tm
p/logs/fund_manage.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
/
home/quant_grou
p/logs/fund_manage.log.%d{yyyy-MM-dd}.bak
</fileNamePattern>
<fileNamePattern>
/
tm
p/logs/fund_manage.log.%d{yyyy-MM-dd}.bak
</fileNamePattern>
<maxHistory>
30
</maxHistory>
<maxHistory>
30
</maxHistory>
</rollingPolicy>
</rollingPolicy>
<layout
class=
"ch.qos.logback.classic.PatternLayout"
>
<layout
class=
"ch.qos.logback.classic.PatternLayout"
>
...
...
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