在我的web开发过程中,我只是在我的eclipse IDE中关闭我的web应用程序,大约一分钟,我刚刚在我的eclipse控制台中看到了一个警告.
WARNING: The web application [/Spring.MVC] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Sep 06, 2014 8:31:55 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
WARNING: The web application [/Spring.MVC] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native …Run Code Online (Sandbox Code Playgroud) 考虑下面的课程
产品(抽象根类)
@Entity
@Table(name="PRODUCT")
@Inheritance(strategy=InheritanceType.JOINED)
@DiscriminatorColumn(name="PRODUCT_TYPE")
public abstract class Product {
@Id
@GeneratedValue
@Column(name = "product_ent_id", insertable = false)
private int productEntId;
}
Run Code Online (Sandbox Code Playgroud)
汽车(扩展产品的另一个父类)
@Entity
@Table(name="CAR")
@DiscriminatorValue(value="Car")
@PrimaryKeyJoinColumn(name="car_ent_id")
@Inheritance(strategy=InheritanceType.JOINED)
@DiscriminatorColumn(name="CAR_TYPE")
public abstract class Car extends Product {
@Column(name = "car_ent_id", insertable = false, updatable = false)
private int carEntId;
}
Run Code Online (Sandbox Code Playgroud)
Speeder(扩展Car的层次结构的最后一个孩子)
@Entity
@Table(name="SPEEDER")
@DiscriminatorValue(value="Speeder")
@PrimaryKeyJoinColumn(name="speeder_ent_id")
public class Speeder extends Car {
@Column(name = "speeder_ent_id", insertable = false, updatable = false)
private int speederEntId;
}
Run Code Online (Sandbox Code Playgroud)
当JPA使用鉴别器将我的对象模型映射到我的数据模型时,在单个父对子层次结构中使用鉴别器对我来说很好,鉴别器值被正确设置,但是当我添加另一层次的层次结构时,Speeder-extends- Car-extend-Product …
我正在开发一个应用程序,如果使用这段代码启用模拟位置设置,用户将无法使用它
if (Settings.Secure.getString(context.getContentResolver(),
Settings.Secure.ALLOW_MOCK_LOCATION).equals("0"))
return false;
else
return true;
Run Code Online (Sandbox Code Playgroud)
好吧,它在我从KitKat到Marshmallow系统的大多数测试设备上运行良好,直到我在使用Marshmallow OS的这个设备上尝试我的应用程序,模拟设置显然是OFF,但上面的代码一直告诉我模拟设置为ON这是一个错误吗?还是我错过了什么?
android ×1
gps ×1
hibernate ×1
inheritance ×1
jdbc ×1
jpa ×1
location ×1
memory-leaks ×1
mysql ×1
spring ×1