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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
src/main/java/cn/timer/api/Application.java
+13
-4
No files found.
src/main/java/cn/timer/api/Application.java
View file @
e1a7b739
...
...
@@ -16,14 +16,21 @@ import com.alibaba.fastjson.serializer.SerializerFeature;
import
com.alibaba.fastjson.support.config.FastJsonConfig
;
import
com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter
;
import
cn.hutool.core.net.NetUtil
;
@MapperScan
(
"cn.timer.api.dao"
)
// 扫描的mapper
//@ComponentScan(basePackages = {"cn.timer.api.controller"})
@SpringBootApplication
@EnableScheduling
@EnableTransactionManagement
public
class
Application
{
public
class
Application
{
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
);
}
...
...
@@ -47,7 +54,8 @@ public class Application{
// 5.返回HttpMessageConverters对象
return
new
HttpMessageConverters
(
converter
);
}
// extends SpringBootServletInitializer
// extends SpringBootServletInitializer
@Autowired
private
RestTemplateBuilder
restTemplateBuilder
;
...
...
@@ -57,7 +65,8 @@ public class Application{
}
// @Override
// protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
// return builder.sources(Application.class);
// protected SpringApplicationBuilder configure(SpringApplicationBuilder
// builder) {
// 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