草庐IT

auto-managed

全部标签

java - spring security 中 auto-config=true 有什么用

在SpringSecurity中auto-config=true有什么用。在哪种情况下我们应该使用它。使用auto-config=true的实际用途是什么? 最佳答案 auto-config="true"等价于:因此它为您提供了一个非常基本的启动安全配置。来源:https://docs.spring.io/spring-security/site/docs/3.1.x/reference/springsecurity-single.html#ns-auto-config 关于java-s

Spring:注解等价于 security:authentication-manager 和 security:global-method-security

在XML配置中,我可以使用security命名空间来启用对安全性的支持,例如:我尝试使用没有XML的Spring,只有@Configuration类。与上述XML示例类似的配置的纯Java等价物是什么? 最佳答案 编辑:2013年12月SpringSecurity3.2wasreleased和JavaConfigurationwasimplemented,所以上面的XML大致相当于:@Configuration@EnableGlobalMethodSecurity(prePostEnabled=true)publicclassSec

java - 何时使用 Spring JPA (Hibernate) Entity Manager 将连接返回到连接池?

在我的java进程中,我使用以下spring配置连接到MySql:@Configuration@EnableTransactionManagement@PropertySources({@PropertySource("classpath:/myProperties1.properties"),@PropertySource("classpath:/myProperties2.properties")})publicclassMyConfiguration{@AutowiredprotectedEnvironmentenv;/***@returnEntityManagerFactory

Spring JSF 集成 : how to inject a Spring component/service in JSF managed bean?

我知道托管bean像Controller一样工作,因为您唯一的任务是将View层与模型“链接”。要将bean用作托管bean,我必须声明@ManagedBean注释,这样做我可以直接与bean通信JSF。如果我想在这个managedBean中注入(inject)一些组件(来自Spring),我有两种可能的方法:选择ManagedBean中的属性(如“BasicDAOdao”)并声明@ManagedProperty(#{"basicDAO"})属性(property)之上。这样做,我正在注入(inject)bean"basicDAO"来自ManagedBean中的Spring。在Mana

java - Autowiring 失败 : Not an managed Type

我的文凭项目有一个大问题,如果你们能帮助我,我会非常高兴!我做了一个Maven多模块项目并有3个“核心项目”NaviClean:(父)NaviCleanDomain:包含域模型以及我的所有实体和NaviCleanServer需要的接口(interface)MeinRemoteDienst和NaviCleanCleint用于HessianprotocolNaviCleanClient:包含GUI和Hessian连接到NaviCleanServerNaviCleanServer:这是我的存储库,我与数据库的连接以及接口(interface)einRemoteDienst的实现NaviCle

java - 追查 Spring 的 "not eligible for auto-proxying"的原因

当您开始弄乱Spring的自动代理的东西时,您经常会遇到记录在案的这种行为:ClassesthatimplementtheBeanPostProcessorinterfacearespecial,andsotheyaretreateddifferentlybythecontainer.AllBeanPostProcessorsandtheirdirectlyreferencedbeanswillbeinstantiatedonstartup,aspartofthespecialstartupphaseoftheApplicationContext,thenallthoseBeanPos

spring - spring.jpa.hibernate.ddl-auto 属性在 Spring 中是如何工作的?

我正在开发我的SpringBoot应用程序项目,并注意到,有时我的另一台服务器(SQLServer)上的数据库会出现连接超时错误。当我尝试使用FlyWay进行一些脚本迁移时,尤其会发生这种情况,但经过多次尝试后它仍然有效。然后我注意到我没有在属性文件中指定spring.jpa.hibernate.ddl-auto。我做了一些研究,发现建议添加spring.jpa.hibernate.ddl-auto=create-drop正在开发中。并将其更改为:spring.jpa.hibernate.ddl-auto=none在生产中。但我实际上并不了解它是如何工作的,以及hibernate如何使

MySql 不能使列 auto_increment

我有一个包含4列的“Bestelling”表:“Id”(PK)、“KlantId”、“Datum”、“BestellingsTypeId”,现在我想将列ID设为auto_increment,但是,当我尝试这样做时那,我得到这个错误:ERROR1062:ALTERTABLEcausesauto_incrementresequencing,resultinginduplicateentry'1'forkey'PRIMARY'SQLStatement:ALTERTABLE`aafest`.`aafest_bestelling`CHANGECOLUMN`Id``Id`INT(11)NOTNUL

mysql - mysql中的SERIAL和AUTO_INCREMENT有什么区别

我遇到了两种在mysql中自动增加id的方法。一个是SERIAL,另一个是AUTOINCREMENT。所以假设我想创建一个表myfriends。我可以通过以下两种方式创建它:1)mysql>createtablemyfriends(idintprimarykeyauto_increment,frnd_namevarchar(50)notnull);2)mysql>createtablemyfriends(idserialprimarykey,frnd_namevarchar(50)notnull);两者有什么区别?或有什么方法比其他方法有优势吗?请帮忙。 最

mysql - 在 mysql 表 auto_increment 中创建一个 ID(事后)

我从另一个开发人员那里获得了一个数据库。他没有在任何表上使用auto_incrementers。它们都有主键ID,但他在代码中手动完成了所有递增操作。我现在可以把它们变成Auto_incrementers吗?哇,非常好,非常感谢。它在我的一张table上运行顺利。但是第二张表,我收到此错误...将'.\DBNAME#sql-6c8_62259c'重命名为'.\DBNAME\dealer_master_events'时出错 最佳答案 例如,这是一个具有主键但不是AUTO_INCREMENT的表:mysql>CREATETABLEfoo