springboot 的application.properties 一些常用的属性

spring.datasource.url=jdbc:oracle:thin:@localhost:1521:orcl
spring.datasource.username=scott
spring.datasource.password=tiger
spring.datasource.driver-class-name=oracle.jdbc.OracleDriver

#日志的级别
logging.level.root=INFO
logging.level.org.springframework.web=INFO
logging.level.org.hibernate=INFO


mysource.url=jdbc:oracle:thin:@localhost:1521:orcl
mysource.username=scott
mysource.password=tiger
mysource.driverClassName=oracle.jdbc.OracleDriver

#tomcat 端口 上下文路径  字符集  request response UTF-8
server.port=8888
server.context-path=/sb
server.tomcat.uri-encoding=UTF-8
spring.http.encoding.charset=UTF-8

#http://localhost:8888/sb/health 查看springboot健康状况是否良好
#http://localhost:8888/sb/beans  类似于struts<s:debug>
#http://localhost:8888/sb/dump dump出线程和内存使用情况
#http://localhost:8888/sb/env  java和springboot的环境变量
#关闭actutor的安全认证
management.security.enabled=false
#启动url shutdown
endpoints.shutdown.enabled=true
#这个是传值给前台把他转成 下面那种格式的字符串
spring.jackson.time-zone=GMT+8
spring.jackson.date-format=yyyy-MM-dd


#启动url shutdown
endpoints.shutdown.enabled=true
要通过post去关闭可以远程关闭

<body>
     hello jsp
     
     <form action="${pageContext.request.contextPath}/shutdown" method="post">
        <input type="submit" value="关闭"/>
     </form>
     
  </body>



<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>cn.et</groupId>
  <artifactId>springboot</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.4.RELEASE</version>
   </parent>
   <dependencies>
        <!-- 表示可以发布web程序 自动启动一个tomcat -->
	    <dependency>
	        <groupId>org.springframework.boot</groupId>
	        <artifactId>spring-boot-starter-web</artifactId>
	    </dependency>
	    <!-- 添加转译jsp的jar -->
	    <dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-tomcat</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.tomcat.embed</groupId>
			<artifactId>tomcat-embed-jasper</artifactId>
			<scope>provided</scope>
		</dependency>
		
		<!-- 操作数据源 -->
		<dependency>
		    <groupId>org.springframework.boot</groupId>
		    <artifactId>spring-boot-starter-data-jpa</artifactId>
		</dependency>
		<dependency>
		    <groupId>oracle</groupId>
		    <artifactId>oracle</artifactId>
		    <version>3.2.8</version>
			<scope>system</scope>
		    <systemPath>C:\app\Administrator\product\11.2.0\dbhome_1\jdbc\lib\ojdbc6.jar</systemPath>
		</dependency>
		<!-- dbcp数据源 -->
	    <dependency>
			<groupId>commons-dbcp</groupId>
			<artifactId>commons-dbcp</artifactId>
			<version>1.4</version>
		</dependency>
		<!--健康检查的框架-->
		<dependency>
	        <groupId>org.springframework.boot</groupId>
	        <artifactId>spring-boot-starter-actuator</artifactId>
	    </dependency>
	</dependencies>
</project>



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值