Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
9be0bcc8
Commit
9be0bcc8
authored
Nov 01, 2020
by
季圣华
Browse files
增加项目成功的地址打印
parent
abf50e47
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/jsh/erp/ErpApplication.java
View file @
9be0bcc8
package
com.jsh.erp
;
import
com.jsh.erp.utils.ComputerInfo
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.core.env.Environment
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
java.io.IOException
;
@SpringBootApplication
@MapperScan
(
basePackages
=
{
"com.jsh.erp.datasource.mappers"
}
)
@MapperScan
(
"com.jsh.erp.datasource.mappers"
)
@ServletComponentScan
@EnableScheduling
public
class
ErpApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
ErpApplication
.
class
,
args
);
public
static
void
main
(
String
[]
args
)
throws
IOException
{
ConfigurableApplicationContext
context
=
SpringApplication
.
run
(
ErpApplication
.
class
,
args
);
Environment
environment
=
context
.
getBean
(
Environment
.
class
);
System
.
out
.
println
(
"启动成功,访问地址:http://"
+
ComputerInfo
.
getIpAddr
()
+
":"
+
environment
.
getProperty
(
"server.port"
)
+
",测试用户:jsh,密码:123456"
);
}
}
Write
Preview
Supports
Markdown
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