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
ca0b5f60
Commit
ca0b5f60
authored
5 years ago
by
邓实川
Committed by
chenzg
3 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
application
parent
cf673e40
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 @
ca0b5f60
...
@@ -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,7 +54,8 @@ public class Application{
...
@@ -47,7 +54,8 @@ 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
// return builder.sources(Application.class);
// builder) {
// return builder.sources(Application.class);
// }
// }
}
}
This diff is collapsed.
Click to expand it.
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