Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
e1a7b739
Commit
e1a7b739
authored
Mar 25, 2020
by
邓实川
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
application
parent
dde86583
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
src/main/java/cn/timer/api/Application.java
+11
-2
No files found.
src/main/java/cn/timer/api/Application.java
View file @
e1a7b739
...
@@ -16,14 +16,21 @@ import com.alibaba.fastjson.serializer.SerializerFeature;
...
@@ -16,14 +16,21 @@ import com.alibaba.fastjson.serializer.SerializerFeature;
import
com.alibaba.fastjson.support.config.FastJsonConfig
;
import
com.alibaba.fastjson.support.config.FastJsonConfig
;
import
com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter
;
import
com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter
;
import
cn.hutool.core.net.NetUtil
;
@MapperScan
(
"cn.timer.api.dao"
)
// 扫描的mapper
@MapperScan
(
"cn.timer.api.dao"
)
// 扫描的mapper
//@ComponentScan(basePackages = {"cn.timer.api.controller"})
//@ComponentScan(basePackages = {"cn.timer.api.controller"})
@SpringBootApplication
@SpringBootApplication
@EnableScheduling
@EnableScheduling
@EnableTransactionManagement
@EnableTransactionManagement
public
class
Application
{
public
class
Application
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
final
Integer
port
=
8089
;
if
(!
NetUtil
.
isUsableLocalPort
(
port
))
{
System
.
err
.
printf
(
"端口%d被占用了,无法启动%n"
,
port
);
System
.
exit
(
1
);
}
SpringApplication
.
run
(
Application
.
class
,
args
);
SpringApplication
.
run
(
Application
.
class
,
args
);
}
}
...
@@ -47,6 +54,7 @@ public class Application{
...
@@ -47,6 +54,7 @@ public class Application{
// 5.返回HttpMessageConverters对象
// 5.返回HttpMessageConverters对象
return
new
HttpMessageConverters
(
converter
);
return
new
HttpMessageConverters
(
converter
);
}
}
// extends SpringBootServletInitializer
// extends SpringBootServletInitializer
@Autowired
@Autowired
private
RestTemplateBuilder
restTemplateBuilder
;
private
RestTemplateBuilder
restTemplateBuilder
;
...
@@ -57,7 +65,8 @@ public class Application{
...
@@ -57,7 +65,8 @@ public class Application{
}
}
// @Override
// @Override
// protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
// protected SpringApplicationBuilder configure(SpringApplicationBuilder
// builder) {
// return builder.sources(Application.class);
// return builder.sources(Application.class);
// }
// }
}
}
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